DM_MOVEDIALOG
The DM_MOVEDIALOG message is sent to the dialog manager to move the dialog window.
Param1
TRUE - Param2 contains absolute coordinates.
FALSE - Param2 contains relative coordinates.
FALSE - Param2 contains relative coordinates.
Param2
Pointer to a COORD structure containing the new coordinates
of the upper left corner of the dialog window.
Return
The COORDstructure containing
the current coordinates of the upper left corner of the dialog window.
Remarks
In order to center the dialog window on the screen
fill the COORD structure
with -1 values and set Param1 = TRUE.
Example
// center the dialog COORD c={-1,-1}; Info.SendDlgMessage(hDlg,DM_MOVEDIALOG,TRUE,(LONG_PTR)&c); // move the dialog to the top left corner of the screen with coordinates 1,1 COORD c={1,1}; Info.SendDlgMessage(hDlg,DM_MOVEDIALOG,TRUE,(LONG_PTR)&c); // move the dialog by 2 positions to the right COORD c={2,0}; Info.SendDlgMessage(hDlg,DM_MOVEDIALOG,FALSE,(LONG_PTR)&c);
See also: