开发者

VC++ move borderless form

开发者 https://www.devze.com 2023-03-06 08:19 出处:网络
i\'m totally new to开发者_如何学Go C++, but anyway, how to move a borderless form (this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;)?

i'm totally new to开发者_如何学Go C++, but anyway, how to move a borderless form (this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;)?

thanks


That did it in MFC. It enabled the window to move by dragging it by any point inside the window!

void MyWnd::OnLButtonDown(UINT nFlags, CPoint point) 
{
    PostMessage( WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM( point.x, point.y));
}
0

精彩评论

暂无评论...
验证码 换一张
取 消