点标题栏的图标时系统发送的是什么消息?

Sephil 2001-10-29 02:56:24
我想实现点任意一个控件时得到和点点标题栏的图标的效果一样
如何做?
别告诉我用GetSysMenu和AppendMenu之类的
我想要最简单的方法
可不可以用消息?
那又是什么消息呢?
我用Spy++查过,可是好多啊,不知是哪个........
...全文
125 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Sephil 2001-10-31
  • 打赏
  • 举报
回复
???
Sephil 2001-10-30
  • 打赏
  • 举报
回复
我的意思是点标题栏左边程序的那个图标
rak 2001-10-29
  • 打赏
  • 举报
回复
WM_SYSCOMMAND
uCmdType = wParam; // type of system command requested
xPos = LOWORD(lParam); // horizontal postion, in screen coordinates
yPos = HIWORD(lParam); // vertical postion, in screen coordinates


Parameters

uCmdType

Specifies the type of system command requested. This can be one of these values:

Value Meaning
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 low-order word of lParam identifies the window to activate.
SC_HSCROLL Scrolls horizontally.
SC_KEYMENU Retrieves the window menu as a result of a keystroke.
SC_MAXIMIZE (or SC_ZOOM) Maximizes the window.
SC_MINIMIZE (or SC_ICON) Minimizes the window.
SC_MONITORPOWER Windows 95 only: Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer.
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 Executes or activates Windows Task Manager.
SC_VSCROLL Scrolls vertically.


xPos

Specifies the horizontal position of the cursor, in screen coordinates, if a window menu command is chosen with the mouse. Otherwise, the xPos parameter is not used.

yPos

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 mnenomic.



Return Values
rak 2001-10-29
  • 打赏
  • 举报
回复
用。。。WM_SYSCOMMAND 。。。
rak 2001-10-29
  • 打赏
  • 举报
回复
那要看点击什么图标呀。。。

哪个。。。
chinaha 2001-10-29
  • 打赏
  • 举报
回复
点标题栏的消息是HTCAPTION,你可以点某一个控件时产生Msg.Result=HTCAPTION,来模拟点标题栏.

13,824

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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