简体   繁体   中英

Why does the SetScrollInfo() function sends a WM_SIZE message to WndProc()?

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 or MoveWindow function is called for a child window as a result of the WM_SIZE message, the bRedraw or bRepaint 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM