Hello, :eek
I have a dialog box with vertical and horizontal scrollbars.
The scrollbars are using for displaying part of loaded image.
When the user resize the dialog box I treat the WM_SIZE message.
During the statement of this message I call EnableScrollBar, ShowScrollBar and SetScrollInfos and it seems it generates
WM_SIZE message too. So the original WM_SIZE message never finished.
How can I set the scroll bars in this case ?
Thanks.
Check the "hwnd" of the WM_SIZE message?
Or you may have to use MoveWindow to tell the scrollbar to move/size without generating wm_size messages (not that I'm sure why it's doing that anyway.)
In the WM_SIZE message if I use these functions, it genertaes an other WM_SIZE message.
Here is the code :
push ESB_DISABLE_BOTH
push SB_BOTH
push DWord Ptr [hWnd]
push OFFSET $ + 10
jmp EnableScrollBar
after EnableScrollBar, I receive an other WM_SIZE message.
I don't kknow how to do
Do I have to treat the WM_SIZE for resizing nested scroll bars ?
When the user resizes the window do I receive a WM_xSCROLL message ? or the same ?
In this case during the process of this message I use the previous functions ?
What type of Scrollbars you use ?
System scrollbars or scrollbar controls ?
Manos.
I use system scrollbars.
When you use system scrollbars,the system automatic resize the scrollbars
and place these in the correct place.
The only think that you have to do is to use: SetScrollInfo in WM_SIZE.
Manos.