1.去掉边框、菜单栏、标题栏
SetWindowLong(this->m_hWnd,GWL_EXSTYLE,0); // 去掉边框
this->SetMenu(NULL); // 去掉菜单栏SetWindowLong(this->m_hWnd,GWL_STYLE,0); //去掉标题栏
2. 按住鼠标拖动整个客户端
void CTCPDemoDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
PostMessage(WM_NCLBUTTONDOWN,HTCAPTION,MAKELPARAM(point.x,point.y));
CDialogEx::OnLButtonDown(nFlags, point);
}
3.绘制圆角框
GetWindowRect(&rc); // window rect in screen coords
m_rgn.CreateRoundRectRgn(rc.left,rc.top,rc.right,rc.bottom,50,50); // rounded rect w/50 pixel corners
SetWindowRgn(m_rgn,TRUE); // set window region to make rounded window