当点击窗口的最小化按钮的时候,发的是什么消息?

junegone 2002-11-18 03:59:24
当点击窗口的最小化按钮的时候,发的是什么消息?
...全文
68 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingcom_xu 2002-11-18
  • 打赏
  • 举报
回复
WM_SIZE
The WM_SIZE message is sent to a window after its size has changed.

A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window
UINT uMsg, // WM_SIZE
WPARAM wParam, // resizing flag
LPARAM lParam // client area
);
Parameters
wParam
Specifies the type of resizing requested. This parameter can be one of the following values. Value Meaning
SIZE_MAXHIDE Message is sent to all pop-up windows when some other window is maximized.
SIZE_MAXIMIZED The window has been maximized.
SIZE_MAXSHOW Message is sent to all pop-up windows when some other window has been restored to its former size.
SIZE_MINIMIZED The window has been minimized.
SIZE_RESTORED The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.


lParam
The low-order word of lParam specifies the new width of the client area.
The high-order word of lParam specifies the new height of the client area.

Return Values
If an application processes this message, it should return zero.

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.

Although the width and height of a window are 32-bit values, the lParam parameter contains only the low-order 16 bits of each.

Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winuser.h; include Windows.h.

See Also
Windows Overview, Window Messages, HIWORD, LOWORD, MoveWindow, SetScrollPos

ixMind 2002-11-18
  • 打赏
  • 举报
回复
可能是先发送WM_SYSCOMMAND吧
LIFEForSoft 2002-11-18
  • 打赏
  • 举报
回复
WM_SIZE

具体看MSDN

15,976

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧