Chipdlg is the idd_hip_dialog class. Chipdlg * m_hipdlg; // define it first
M_hipdlg = new chipdlg (this );
M_hipdlg-> Create (idd_hip_dialog, this); // create dialog box
Crect rcdlgs;
M_hipdlg-> getwindowrect (rcdlgs); // obtain the rect dialog box size.
Screentoclient (rcdlgs); // convert the screen value to the actual value.
Int Cx = getsystemmetrics (sm_cxscreen); // obtain the screen resolution
Int Cy = getsystemmetrics (sm_cyscreen );
CX Cy is the value of X and Y in the bottom right corner of the screen.
// M_hipdlg-> movewindow (cx-rcDlgs.Width (), cy-rcDlgs.Height (), rcdlgs. Width (), rcdlgs. Height (), true );//
// The first two parameters of movewindow are the position X and Y of the dialog box.
// The three or four items are the size of the dialog box!
M_hipdlg-> setwindowpos (& wndtopmost, cx-rcDlgs.Width (), cy-rcDlgs.Height (), rcdlgs. Width (), rcdlgs. Height (), swp_nosize );
// Setwindowpos is the first one that I wrote to top the dialog box. If necessary, I will not elaborate on it.
// The last four are the same as those of movewindow.
// The last one is the attribute that I entered so that it cannot be changed. There are many attributes, but nomove cannot be entered. No // It cannot be moved !!!
Select one for movewindow and setwindowpos. The latter is recommended.
M_hipdlg-> showwindow (sw_show );
Okay, the dialog box is in the lower right corner. If it is in the upper left corner
M_hipdlg-> setwindowpos (& wndtopmost, 0,0, rcdlgs. Width (), rcdlgs. Height (), swp_nosize );