|
you are right
at some point realloc returns NULL !!!! why ?
the calculation of the memory size is fine i put some print messages in the code and here is the output :
DC: 0
before realloc : 0
after realloc : 323b78
DC: 1
before realloc : 323b78
after realloc : 323b78
DC: 2
before realloc : 323b78
after realloc : 323b78
DC: 3
before realloc : 323b78
after realloc : 323b20
DC: 4
before realloc : 323b20
after realloc : 323b20
DC: 5
before realloc : 323b20
after realloc : 323b20
DC: 6
before realloc : 323b20
after realloc : 323b20
DC: 7
before realloc : 323b20
after realloc : 323b20
DC: 8
before realloc : 323b20
after realloc : 323b20
DC: 9
before realloc : 323b20
after realloc : 323b20
DC: 10
before realloc : 323b20
after realloc : 323b20
DC: 11
before realloc : 323b20
after realloc : 323b20
DC: 12
before realloc : 323b20
after realloc : 323b20
DC: 13
before realloc : 323b20
after realloc : 323b20
DC: 14
before realloc : 323b20
after realloc : 323b20
DC: 15
before realloc : 323b20
after realloc : 323bc0
DC: 16
before realloc : 323bc0
after realloc : 323bc0
DC: 17
before realloc : 323bc0
after realloc : 323bc0
DC: 18
before realloc : 323bc0
after realloc : 323bc0
DC: 19
before realloc : 323bc0
<big>after realloc : 0</big>
note that if i decrease my string length its work fine !!
is there any place in the project setting the sets the allowed space for the programme ?
thanks
|
|
|
|
|
Ayman Mashal wrote: at some point realloc returns NULL !!!! why ?
Gotta love realloc()!
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
|
Three same messages
|
|
|
|
|
ok it was by mistake.... you have some answer?
harsha
|
|
|
|
|
|
ok question is.. i hav a list control in my dialog and i should have provision to select all the entries in it on Ctrl+A down like it happens in standard windows dialogs
harsha
|
|
|
|
|
When you click on the listctrl(Ctrl+A) it selects all items what problem?
|
|
|
|
|
no its not selecting automatically like that.....
harsha
|
|
|
|
|
Hi harsh,
When I wa clicking on my program (Ctrl+A) all items are selected,and then when I want to read them use of GetFirstSelectedItemPosition /GetNextSelectedItem
I dont have my code now,but use of this code SetItemState(Index, LVIS_SELECTED, LVIS_FOCUSED); and now what happens?And reply to me it work or no,please;)
|
|
|
|
|
how to change the background color for tab (to be same as screen)
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
|
i need to change the tab bar color and its fonts
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Hi,
on my view i have a Textbox, a Combobox and a Grid (from BCG )
If the focus is on the textbox and the user presses the PageUp Key, the focus
should be setted on the Grid
I catch the Key_Press in the PreTranslateMessage-Handler and verify if the
message is WM_KEYDOWN and the wParam is VK_PRIOR
Then a "Grid->PostMessage(WM_SETFOCUS);" should set the focus on the Grid
and after this i return directly TRUE, so that the Message is not be redirected but
"destroyed"
Does the focus re-enter on the textbox because it was a Key-Stroke?
Big thanks
|
|
|
|
|
I am never one to suggest "new GUI behavior", like having Page-Up cause a focus change( !), but have you tried using Grid->SetFocus() ? Using PostMessage(...) causes the set focus message to get queued, but other messages may execute before it affecting the focus.
You also may need to eat the WM_KEYUP message that may get sent to the grid, JIC the grid processes that message.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Grid->SetFocus() resolves the problem.
For me, it's logical that a SetFocus()/SendMessage(WM_SETFOCUS) is too early
"...causes the set focus message to get queued, but other messages may execute before it affecting the focus." --> so the keyUp is affected and after this, the grid becomes the focus.
Big thanks to you
Yeah it's strange to change the focus with PageUp, but i re-code an existing DOS-program, which
should keep all keystrokes, because all users are used to use for example this kind of behavior.
The Tab-Key should switch into the different textboxes and a PageUp siwtches to another "section" of the Window
|
|
|
|
|
Hi
how can i open and read registry keys and values from the registry editor.
if any one has source code for this than please tell me .
or any type of help will make my application to move to other module
|
|
|
|
|
Look into MSDN for keyword CRegKey
I am not ashamed to confess that I am ignorant of what I do not know.
- Marcus Tullius Cicero
|
|
|
|
|
|
Jigish Shah wrote: how can i open and read registry keys and values from the registry editor.
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I have developed one application and I want it to run continuously in background of all the process like Google Desktop application.
can any one please tell me how can I achieve this task?
|
|
|
|
|
Can you create a WindowsService[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks for your reply.
But can you please tell me under which registry key this service is stored.
Suppose my exe name is ABC.exe and i want to create service for this exe to run in background.
As you send me link on that page they have given key
HKEY-LOCAL_MACHINE\SYSTEM\SERVICES
but can you please tell me under this key where i have to put my exe or where I have to create my new key to run my service in background for ABC.exe
Thanks again!!!!
|
|
|
|
|
It is not really enough to take a normal EXE and throw it into the Services entry in the Registry. A Windows Service is a special type of executable and needs to be written as such. A Windows Service supports control functionality, and the SCM, which manages Services, handles things like authentication and dependencies.
You should create a new Windows Service project. You should be able to use much of the boilerplate/wizard code as-is and just add your functionality to it.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|