Why does the SetScrollInfo() function sends a WM_SIZE message to WndProc() ?
EDIT Apparently, this is a bug in the WinAPI. The WM_SIZE message was being sent because I forgot to include the WS_HSCROLL | WS_VSCROLL
WS_HSCROLL | WS_VSCROLL
styles in the window creation. Once that was corrected, the WM_SIZE isn't being sent anymore. Thanks.
Since this is a documented feature, it's likely not a bug.
From http://msdn.microsoft.com/en-us/library/windows/desktop/ms632646.aspx :
Remarks
If the
SetScrollPos
orMoveWindow
function is called for a child window as a result of theWM_SIZE
message, thebRedraw
orbRepaint
parameter should be nonzero to cause the window to be repainted.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.