Hi Guys,
I want to create WM_SIZE message.. But I failed in some situation otherwise my code works fine.. Can anybody help me to create WM_SIZE message.
I post sample below , how i create WM_SIZE message..
Sorry, my question was meant to be more along the lines of what is the reason you want your program to raise a WM_SIZE event?. I was going to suggest, as Lamblion, the SetWindowPos() API if it was simple changes to window size.
The method you posted doesn't look wrong (doesn't look like it would do anything though), so under what situations does it fail?
Do you want to resize the window? If you do, WM_SIZE doesn't work for this. In MSDN Online, you can read that WM_SIZE is "sent to a window after its size has changed". This means that WM_SIZE is just a notification and cannot and will not trigger a change in the window's size.
yes that should work perfectly but i think what you want to do makes no sense as WM_SIZE notifies change in windows height or width, maximize,minimize...etc..
what i mean is that it's used for retrieving message about windows width,height..etc not for giving....
anyways, it would be better if you could say in what situation does this fail ????