hello im new at visual C++, im asking for help here...
i got problem
bellow is the code, CForm1 is derived CFormView

void CForm1::OnSize(UINT nType, int cx, int cy)
{
CRect RectEDIT, RectRICHEDIT;
if(GetDlgItem(IDC_RICHEDIT)->GetSafeHwnd() &&
GetDlgItem(IDC_EDIT)->GetSafeHwnd() )
{
GetDlgItem(IDC_EDIT)->GetWindowRect(&RectEDIT);
ScreenToClient(&RectEDIT);

GetDlgItem(IDC_RICHEDIT)->GetWindowRect(&RectRICHEDIT);
ScreenToClient(&RectRICHEDIT);

GetDlgItem(IDC_EDIT)->SetWindowPos(NULL ,
0,
RectRICHEDIT.bottom,
cx - RectEDIT.left - 5 , RectEDIT.Height(),
NULL );

GetDlgItem(IDC_RICHEDIT)->SetWindowPos(NULL,
0,
0,
cx - RectRICHEDIT.left - 5 ,
cy - RectEDIT.Height() - 3 ,
NULL );
}
}

im using SDI with splitter

the situation is like this,

when the application start, the EDIT is placed in front of RICHEDIT
when i resize the form, the EDIT and RICHEDIT is placed normally where i wanted to (bellow RICHEDIT)

is there any wrong in the codes or missing something - to make the position of EDIT is bellow of RICHEDIT at start?

please can somebody help me?
thx for any opinion and forgive my bad english ^^