To do it with Win32 only, in your dialog CALLBACK function :
int xPos = LOWORD(lParam); // horizontal position of cursor
int yPos = HIWORD(lParam); // vertical position of cursor
// Drag window by clicking anywhere on it
PostMessage(dialog_handle, WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM( xPos, yPos));
How can I do the same thing but catching the view in application with CFrameWnd as main window. When I try to use both methods you've mentioned I can only move the view inside the frame, not the frame.