SendMessage () Not working

SendMessage (hWnd, WM_CREATE, wParam, lParam);

Is not working. In my WM_CREATE case statement I have an if statement that checks for a bool. In another part of my code I set that bool to true then use the above line of code.

The code in the if statement isn't executed, I know this for two reasons:

-The two edit controls are not created
-I added a message box:
MessageBox (hWnd, "", "", MB_OK);
and it wasn't executed.

I also added the above message box into the WM_CREATE case statement and it was only called when the window was first shown to the user, not when the first code line (The sendmessage call) was executed.

So here is my question:
How do I get this to work:
SendMessage (hWnd, "", "", MB_OK);
Or how do I do the same thing with another block of code.

Thanks to anyone who can help :D
It would be nice to see the actual code.
But in the meantime - be aware that each time windows call your windows procedure it is a new function call.
As you know local function variables don't keep their values bewteen function calls unless they are declared static

So try making that bool variable a static one and see what happens.
Last edited on
I set it to static and the same thing happened.
post the code if you can - otherwise it's just all guesswork
Topic archived. No new replies allowed.