Chipdlg is the Idd_hip_dialog class Chipdlg *m_hipdlg; Define First
M_hipdlg=new Chipdlg (this);
M_hipdlg->create (Idd_hip_dialog,this); Create dialog box
CRect Rcdlgs;
M_hipdlg->getwindowrect (RCDLGS); Gets the size of the Rect dialog box for the dialog box
ScreenToClient (RCDLGS); Turn the value of the screen to the corresponding actual value
int cx = GetSystemMetrics (Sm_cxscreen); Get the screen resolution
int cy = GetSystemMetrics (Sm_cyscreen);
CX CY, which is the value of x, 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 of the MoveWindow parameters are the X, y position of the dialog box
Three or four is the size of the dialog box, the last one without a tube.
M_hipdlg->setwindowpos (&wndtopmost,cx-rcdlgs.width (), Cy-rcdlgs.height (), Rcdlgs.width (), RcDlgs.Height (), Swp_nosize);
SetWindowPos first I wrote the meaning to make the dialog box top. I'm not going to write anything if I have to.
The back 4 is the same as MoveWindow.
The last one is the attribute I fill not let him change the size, the attribute has a lot, but cannot fill nomove, no//Can not move ...
MoveWindow and SetWindowPos choose one. Recommended latter
M_hipdlg->showwindow (Sw_show);
Okay, the dialog is in the lower right corner, and if the upper-left corner is
M_hipdlg->setwindowpos (&wndtopmost,0,0,rcdlgs.width (), Rcdlgs.height (), swp_nosize);