from the "case WM_SIZE"?
WM_SIZE is sent by the Windows in response to any action causing a window to be resized. You should not send it in your code. Instead you should call some API to resize a window (like MoveWindow or SetWindowPos)
from the "case WM_SIZE"?
WM_SIZE is sent by the Windows in response to any action causing a window to be resized. You should not send it in your code. Instead you should call some API to resize a window (like MoveWindow or SetWindowPos)
hsb - handle of status bar.
I tried comment "SendMessage(hsb, WM_SIZE, 0, 0);" - it didn't help me.
Last edited by AKE; October 18th, 2012 at 09:20 AM.
It doesn't matter whether it is a status bar or any other window.
Originally Posted by AKE
I tried comment "SendMessage(hsb, WM_SIZE, 0, 0);" - it didn't help me.
Well, this line must be removed because it is wrong. Either use MoveWindow or SetWindowPos or send some used defined message to the status bar window and implement its resizing while handling this message.
Now define "application close". How exactly does it happen? Without any error message? without any message in the Windows Event Viewer?
Well, you see now that posting only a small amount of code lines without showing what happened above and below these lines is often not enough. Don't you?
In case you run it in VS IDE, and some abnormal termination happens, the Studio shows you some message regarding the immediate problem. In case it does not, your app closes because of natural reasons, which might mean that some of your code closes the main window or posts WM_QUIT message to main thread. You should find that by code review alright.
Bookmarks