mfc鼠标事件

https://www.cnblogs.com/findumars/p/3907635.html

 

双击触发对话框事件

void OnLButtonDblClk(UINT nFlags, CPoint point){

            m_selectid = i;
            //AfxGetMainWnd()->PostMessage(WM_USER + 10099, i, 0);
            CMenu menu;
            menu.CreatePopupMenu();     //动态创建弹出式菜单对象
            menu.AppendMenuW(MF_STRING, ID_MENU_TEXT3, _T("水平镜像"));
            menu.AppendMenuW(MF_STRING, ID_MENU_TEXT4, _T("垂直镜像"));
            ClientToScreen(&point);
            menu.TrackPopupMenu(TPM_RIGHTBUTTON, point.x, point.y, this);
            menu.Detach();
            //menu.DestroyMenu();
            return;
}

 

posted @ 2018-07-25 10:28  balder_m  阅读(256)  评论(0编辑  收藏  举报