WM_CONTEXTMENU percolate upward
来源:互联网 发布:mac改壁纸 编辑:程序博客网 时间:2024/06/06 01:07
在学习Windows.Programming Windows with MFC, 2nd Edition时,看到第四章Menus的Menu Magic中的Context Menus小节。有一段话有些费解:
写道
If necessary, you can translate the screen coordinates passed in point into client coordinates with CWnd::ScreenToClient. It might seem curious that OnContextMenu receives a pointer identifying a window since mouse messages go to the window under the cursor. However, there's a reason. Unlike other messages, WM_CONTEXTMENU messages percolate upward through the window hierarchy if a right-click occurs in a child window (for example, a push button control) and the child window doesn't process the message. Therefore, if a window contains child windows, it could receive WM_CONTEXTMENU messages with pWnd containing a pointer to one of its children.
多读了几遍,GOOGLE了一下,
http://newdata.box.sk/bx/c/htm/ch13.htm#Heading6
发现这篇文章有个“percolating upward”。呵呵,一下子明白了,不久是说“向上转型”吗。
相应的“percolate upward through”,不就是说“WM_CONTEXTMENU消息从子窗口传递到父窗口,子窗口执行该消息”。
阅读全文
0 0
- WM_CONTEXTMENU percolate upward
- Upward Feedback session
- 上下文菜单 WM_CONTEXTMENU消息
- Percolate Up and Down
- pta Percolate Up and Down
- RPL(7):RFC6550翻译(7)---Upward Routes
- 给窗口添加右键菜单 WM_CONTEXTMENU
- 给窗口添加右键菜单 WM_CONTEXTMENU
- Elasticsearch java API (19)Percolate API
- 4-1 Percolate Up and Down
- 4-8-Percolate Up and Down
- Elasticsearch[2.0] ☞ Java Client API ☞ Percolate API
- 4-1 Percolate Up and Down (20分)
- 6-13 Percolate Up and Down(20 point(s))
- 上凹还是下凹,叫法相反的凹函数 Concave Upward and Downward
- MFC API——》WM_CONTEXTMENU、OnContextMenu (CWnd* pWnd, CPoint point) 弹出式菜单
- DockPanel去掉右键默认的菜单的方法:在该类上添加WM_CONTEXTMENU消息即可
- 创建右键菜单;加载菜单资源; WM_CONTEXTMENU;PtInRect(判断点是否在矩形内);ScreenToClient;DefWindowProc
- VB6播放MP3小程序
- svg 画图
- Linux文件与目录管理
- Flink学习笔记 --- 理解DataSet WordCount
- uva 10827 球面最大子矩形
- WM_CONTEXTMENU percolate upward
- zookeeper在win10安装闪退的问题
- Wink简介
- 基准和项目章程
- transform定位
- java itext 清空PDF标签
- [LeetCode]84Largest Rectangle in Histogram && 85Maximal Rectangle
- Oracle游标
- mysql设置max_allowed_packet