I have a dialog resource with some controls inside, mostly a user and password edit controls, bonded to a CFormView
. Such dialog is a small rectangle of 300 x 200 pixels.
When I run the application, the CFrameWindow
occupies almost all screen, so the dialog shows in top-left corner. If I try to get the rectangle dimension of CFormView
, I found that it has been expanded to visible area in CMainFrame
, no matter the original dialog size.
My question is whether is possible to keep the dialog (the CFormView
) centred in the middle of the CMainFrame
, and keep always centred even if the ON_SIZE
message is called.
Thank you.