VC 无标题栏对话框移动(在OnLButtonDown里再次发送消息)

操作系统:Windows 7
软件环境:Visual C++ 2008 SP1
本次目的:实现无框移动

      所谓的无标题栏对话框,是基于对话框的工程,对话框属性Border设置为None,对话框如下所示:

为对话框添加左键点击事件,代码如下:

[cpp] view plain copy
 
  1. void CPlayerDlg::OnLButtonDown(UINT nFlags, CPoint point)  
  2. {  
  3.     // TODO: 在此添加消息处理程序代码和/或调用默认值  
  4.     SendMessage(WM_SYSCOMMAND,0xF012,0);  
  5.     CDialog::OnLButtonDown(nFlags, point);  
  6. }  

完成后,就可以拉动对话框移动。

http://blog.csdn.net/akof1314/article/details/4887773

原文地址:https://www.cnblogs.com/findumars/p/5944188.html