John
John

Reputation: 7890

VC++ move borderless form

i'm totally new to C++, but anyway, how to move a borderless form (this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;)?

thanks

Upvotes: 0

Views: 760

Answers (1)

Daniel Mošmondor
Daniel Mošmondor

Reputation: 19956

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));
}

Upvotes: 2

Related Questions