程序最小化消息截取,下面那个是啊?

s446721902 2011-01-14 10:41:23
<00190> 002F0898 S .WM_MOUSEACTIVATE hwndTopLevel:002F0898 nHittest:HTCAPTION uMsg:WM_LBUTTONDOWN
<00191> 002F0898 R .WM_MOUSEACTIVATE fuActivate:MA_NOACTIVATE
<00192> 002F0898 S .WM_SETCURSOR hwnd:002F0898 nHittest:HTCAPTION wMouseMsg:WM_LBUTTONDOWN
<00193> 002F0898 R .WM_SETCURSOR fHaltProcessing:False
<00194> 002F0898 P WM_NCLBUTTONDOWN nHittest:HTCAPTION xPos:746 yPos:97
<00195> 002F0898 S .WM_WINDOWPOSCHANGING lpwp:0012FBE4
<00196> 002F0898 S ..WM_GETMINMAXINFO lpmmi:0012F6AC
<00197> 002F0898 R ..WM_GETMINMAXINFO lpmmi:0012F7D8
<00198> 002F0898 R .WM_WINDOWPOSCHANGING
<00199> 002F0898 S .WM_NCCALCSIZE fCalcValidRects:True lpncsp:0012FB84
<00200> 002F0898 R .WM_NCCALCSIZE fuValidRect:0000 lpncsp:0012FCD8
<00201> 002F0898 S .WM_WINDOWPOSCHANGING lpwp:0012FBE4
<00202> 002F0898 R .WM_WINDOWPOSCHANGING
<00203> 002F0898 S .WM_ACTIVATEAPP fActive:True dwThreadID:00000000
<00204> 002F0898 R .WM_ACTIVATEAPP
<00205> 002F0898 S .WM_NCACTIVATE fActive:True
<00206> 002F0898 R .WM_NCACTIVATE
<00207> 002F0898 S .WM_ACTIVATE fActive:WA_ACTIVE fMinimized:True hwndPrevious:(null)
<00208> 002F0898 S ..WM_ACTIVATETOPLEVEL fActive:True dwThreadID:0012F94C
<00209> 002F0898 R ..WM_ACTIVATETOPLEVEL
<00210> 002F0898 R .WM_ACTIVATE
<00211> 002F0898 S .WM_NCPAINT hrgn:00000001
<00212> 002F0898 R .WM_NCPAINT
<00213> 002F0898 S .WM_WINDOWPOSCHANGED lpwp:0012FBE4
<00214> 002F0898 S ..WM_MOVE xPos:33536 yPos:33536
<00215> 002F0898 R ..WM_MOVE
<00216> 002F0898 S ..WM_SIZE fwSizeType:SIZE_MINIMIZED nWidth:0 nHeight:0
...全文
210 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
向立天 2011-03-01
  • 打赏
  • 举报
回复
您好
我是本版版主
此帖已多日无人关注
请您及时结帖
如您认为问题没有解决可按无满意结帖处理
另外本版设置了疑难问题汇总帖
并已在版面置顶
相关规定其帖子中有说明
您可以根据规定提交您帖子的链接
如您目前不想结帖只需回帖说明
我们会删除此结帖通知

见此回复三日内无回应
我们将强制结帖
相关规定详见界面界面版关于版主结帖工作的具体办法
阿呆_ 2011-01-16
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 idle_ 的回复:]

WM_WINDOWPOSCHANGING

LPARAM的WINDOWPOS.flags里包含了undocumented SWP_SYTLECHANGED标记,然后可以通过发送WM_GETMINMAXINFO得知具体是将要最大化还是将要最小化
[/Quote]

此时最小化还未发生
tigerMayDo 2011-01-15
  • 打赏
  • 举报
回复
PostMessage(WM_SYSCOMMAND, SC_MINIMIZE);
lyingbo 2011-01-15
  • 打赏
  • 举报
回复
最后一项 002F0898 S ..WM_SIZE fwSizeType:SIZE_MINIMIZED nWidth:0 nHeight:0是你要的最小化
Eleven 2011-01-15
  • 打赏
  • 举报
回复
WM_SYSCOMMAND Notification

--------------------------------------------------------------------------------

A window receives this message when the user chooses a command from the Window menu (formerly known as the system or control menu) or when the user chooses the maximize button, minimize button, restore button, or close button.

Syntax


WM_SYSCOMMAND

WPARAM wParam
LPARAM lParam;

Parameters

wParam
Specifies the type of system command requested. This parameter can be one of the following values.
SC_CLOSE
Closes the window.
SC_CONTEXTHELP
Changes the cursor to a question mark with a pointer. If the user then clicks a control in the dialog box, the control receives a WM_HELP message.
SC_DEFAULT
Selects the default item; the user double-clicked the window menu.
SC_HOTKEY
Activates the window associated with the application-specified hot key. The lParam parameter identifies the window to activate.
SC_HSCROLL
Scrolls horizontally.
SC_KEYMENU
Retrieves the window menu as a result of a keystroke. For more information, see the Remarks section.
SC_MAXIMIZE
Maximizes the window.
SC_MINIMIZE
Minimizes the window.
SC_MONITORPOWER
Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer.
The lParam parameter can have the following values:

1 - the display is going to low power

2 - the display is being shut off

SC_MOUSEMENU
Retrieves the window menu as a result of a mouse click.
SC_MOVE
Moves the window.
SC_NEXTWINDOW
Moves to the next window.
SC_PREVWINDOW
Moves to the previous window.
SC_RESTORE
Restores the window to its normal position and size.
SC_SCREENSAVE
Executes the screen saver application specified in the [boot] section of the System.ini file.
SC_SIZE
Sizes the window.
SC_TASKLIST
Activates the Start menu.
SC_VSCROLL
Scrolls vertically.
lParam
The low-order word specifies the horizontal position of the cursor, in screen coordinates, if a window menu command is chosen with the mouse. Otherwise, this parameter is not used.
The high-order word specifies the vertical position of the cursor, in screen coordinates, if a window menu command is chosen with the mouse. This parameter is –1 if the command is chosen using a system accelerator, or zero if using a mnemonic.
阿呆_ 2011-01-15
  • 打赏
  • 举报
回复
WM_WINDOWPOSCHANGING

LPARAM的WINDOWPOS.flags里包含了undocumented SWP_SYTLECHANGED标记,然后可以通过发送WM_GETMINMAXINFO得知具体是将要最大化还是将要最小化
s446721902 2011-01-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zwfgdlc 的回复:]
拦截WM_SYSCOMMAND消息。
当wParam等于SC_MINIMIZE时窗口最小化,等于SC_MAXIMIZE时窗口最大化
[/Quote]
我的00190> 002F0898 S .WM_MOUSEACTIVATE hwndTopLevel:002F0898 nHittest:HTCAPTION uMsg:WM_LBUTTONDOWN
这条消息是鼠标点击最小化按钮的响应,spy++拦截了所以的消息,包括WM_SYSCOMMAND
s446721902 2011-01-15
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 q342210738 的回复:]
最后一项 002F0898 S ..WM_SIZE fwSizeType:SIZE_MINIMIZED nWidth:0 nHeight:0是你要的最小化
[/Quote]
最后一项已经是最小化结束了,在onsize表示下状态而已的吧
zwfgdlc 2011-01-14
  • 打赏
  • 举报
回复
拦截WM_SYSCOMMAND消息。
当wParam等于SC_MINIMIZE时窗口最小化,等于SC_MAXIMIZE时窗口最大化

15,980

社区成员

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

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