I want to get the cx and cy during OnInitDialog of a CDialog.
I can do this with the following code:
myDialog::OnInitDialog()
{
CRect rcWindow2;
this->GetWindowRect(rcWindow2);
CSize m_szMinimum = rcWindow2.Size();
int width = m_szMinimum.cx;
int height = m_szMinimum.cy;
}
However, the cx and cy in the OnInitDialog is not the same as cx and cy which got into OnSize:
void myDialog::OnSize(UINT nType, int cx, int cy)
From OnInitDialog: cx=417, cy=348
From OnSize : cx=401, cy=310
looks like might be the borders but i can't figure it out.
Suggestions as to how to get the same xy data in OnInitDialog as is fed into OnSize would be appreciated.
Inheritance:
myDialog -> CDialog -> CWnd