3 Jan 2011 waterbiscuit   » (Observer)

MFC - Move Form that No Title Bar Window (Dragging a dialog by clicking anywhere on it)

void CNCHitDlg::OnLButtonDown(UINT nFlags, CPoint point)
CDialog::OnLButtonDown(nFlags, point);
// fake windows into thinking your clicking on the caption, does not
// maximize on double click
PostMessage( WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM( point.x, point.y));



UINT CNCHitDlg::OnNcHitTest(CPoint point)
UINT nHitTest = CDialog::OnNcHitTest( point );
// also fake windows out, but this maximizes the window when you double
// click on it.
return (nHitTest == HTCLIENT) ? HTCAPTION : nHitTest;

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!