CWnd::OnContextMenu函数(右键单击弹出快捷菜单)

简介: CWnd::OnContextMenu函数(右键单击弹出快捷菜单)

CWnd::OnContextMenu

afx_msg void OnContextMenu( CWnd* pWnd, CPoint pos );


参数说明


pWnd


Handle to the window in which the user right clicked the mouse. This can be a child window of the window receiving the message. For more information about processing this message, see the Remarks section.


用户右击鼠标的窗口的句柄。这可以是接收到消息的窗口的一个子窗口。有关处理这个消息的更多信息参见说明部分。


pos


Position of the cursor, in screen coordinates, at the time of the mouse click.


点击鼠标时光标的位置,用屏幕坐标表示


备注


Called by the framework when the user has clicked the right mouse button (right clicked) in the window. You can process this message by displaying a context menu using theTrackPopupMenu.


当用户在窗口中点击鼠标右键(右击)时,框架调用这个函数。你可以处理这个消息,使用TrackPopupMenu显示上下文菜单。


If you do not display a context menu you should pass this message onto theDefWindowProc function. If your window is a child window,DefWindowProc sends the message to the parent. Otherwise, DefWindowProc displays a default context menu if the specified position is in the window's caption.


如果你没有显示上下文菜单,你必须将这个消息传递给DefWindowProc函数。如果你的窗口是一个子窗口,DefWindowProc将这个消息发送给父窗口;否则,如果指定的位置是在窗口的标题上,则DefWindowProc显示一个缺省的上下文菜单。

相关文章
|
9月前
|
存储
selenium+python:点击元素、alert弹框、鼠标操作(左键点击、右键点击、双击、鼠标悬浮)、下拉选项框、窗口切换等操作的处
selenium+python:点击元素、alert弹框、鼠标操作(左键点击、右键点击、双击、鼠标悬浮)、下拉选项框、窗口切换等操作的处
|
容器
对话框和窗口的区别
“窗口”与“对话框”有什么区别?                       计算机类稿件的一大特点是文中的图很多。在这大量的图中,系统软件或应用软件的“界面”、“窗口”、“对话框”、“提示框”等的截图又占了很大的比例。
4204 0
menuStrip鼠标经过自动显示菜单
//--------------------------------------------------------------------------------- private void Form1_Load(object sender, EventArgs e) { this.
1020 0