Powered by |
How to move dialog window by dragging at any point?Here we need a handle for
LRESULT CALLBACK mainDlgProc(HWND hWnd,UINT uMessage,WPARAM wParam,LPARAM lParam)
{
switch(uMessage) {
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_NCHITTEST:
return HTCAPTION;
case WM_CLOSE:
PostMessage(hWnd, WM_COMMAND, IDCANCEL,0);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
/* Some more */
default:
return DefWindowProc(hWnd, uMessage, wParam, lParam);
}
return 0;
}
Sample Win32 project for MSVC and executable are available.
|