鼠标不点在对话框上 对话框关闭程序演示
来源:互联网 发布:手机片头制作软件 编辑:程序博客网 时间:2024/06/05 00:55
注:
CWnd::MapWindowPoints
void MapWindowPoints( CWnd* pwndTo, LPRECT lpRect ) const;
void MapWindowPoints( CWnd* pwndTo, LPPOINT lpPoint, UINT nCount ) const;
参数说明
pwndTo
Identifies the window to which points are converted. If this parameter is NULL, the points are converted to screen coordinates.
标识了指定点要被转换到的窗口。如果这个参数为NULL,则该点被转换为屏幕坐标。
lpRect
Specifies the rectangle whose points are to be converted. The first version of this function is available only for Windows 3.1 and later.
指定了要转换的点所在的矩形。这个函数的第一个版本仅在Windows 3.1和以后的版本中有效。
lpPoint
A pointer to an array of POINT structures that contain the set of points to be converted.
执行POINT结构数组的指针,其中包含要转换的点。
nCount
Specifies the number of POINT structures in the array pointed to by lpPoint.
指定了lpPoint指向的数组中POINT结构的数目。
备注
Converts (maps) a set of points from the coordinate space of the CWnd to the coordinate space of another window.
这个函数将一系列点从CWnd的坐标空间转换(映射)到其它窗口的坐标空间
MK_LBUTTON :鼠标左键在移动的时候是按下的
给个例子:
void CDlgVolume::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CRect rc;
GetClientRect(&rc);
//afxDump << rc << "/n";
if(!rc.PtInRect(point)){// Because mouse is captured, so if mouse is out of dlg
ReleaseCapture();
m_SliderReturnValue=(-m_Slider.GetPos());
// useless ?
MapWindowPoints(GetParent(),&point,1);
EndDialog(0);
GetParent()->PostMessage(WM_LBUTTONDOWN,MK_LBUTTON,(LPARAM)((point.y<<16)+point.x));
//
afxDump << "1st /n";
return;
}
m_xOffset=point.x-rc.left;
m_yOffset=point.y-rc.top;
CDialog::OnLButtonDown(nFlags, point);
}
//鼠标不点在对话框上 对话框关闭程序演示
- 鼠标不点在对话框上 对话框关闭程序演示
- Android——点击对话框上按钮不关闭对话框
- Android——点击对话框上按钮不关闭对话框
- Android——点击对话框上按钮不关闭对话框
- Android——点击对话框上按钮不关闭对话框
- 如何在对话框中响应回车键而不关闭对话框
- 在对话框上按回车键,enter 关闭对话框
- 蓝牙对话框不关闭
- VC实现 鼠标在对话框外点击关闭窗口
- 在程序运行时用鼠标调整对话框上的控件
- 在程序运行时用鼠标调整对话框上的控件
- Android:实现点击AlertDialog上按钮时不关闭对话框
- 实现点击AlertDialog上按钮时不关闭对话框
- Android:实现点击AlertDialog上按钮时不关闭对话框
- 对话框在循环时关闭对话框
- MFC对话框程序关闭顺序
- 当鼠标点击对话框以外时自动关闭对话框
- 在基于对话框程序中按下Esc键不会关闭程序按下回车键不会关闭程序
- 先注册才能看到产品列表的插件!!
- PostgreSQL函数用法
- 数据窗口事件中DWO的解释说明
- 整合wordpress的插件!!
- 笔记本的输入设备
- 鼠标不点在对话框上 对话框关闭程序演示
- SoapUI中使用Groovy修改请求消息&校验返回消息
- TDD相关测试框架
- 装饰器模式
- 自动交叉产品
- GridView的主从表编辑和新增
- C++字符统计
- MySQL拾遗
- Android培训班(56)Dalvik虚拟机的入口点