-
CProperty Sheet
I have developed a property sheet base applicaiton. In that i have three page and each page have some edit control to accept data from the user. I have done the validation in OnKillAcitve(). My proble is if the validation fails I have to make the same sheet as active sheet and set the focus to the edit box in which the validation failed
-
Re: CProperty Sheet
Try this:
BOOL CPage1::OnKillActive()
{
UpdateData();
if( failed_edit )
{
AfxMessageBox("Edit failed!");
CWnd *pWndCtrl = GetDlgItem( IDC_MYEDIT );
pWndCtrl->SetFocus();
return false;
}
return CPropertyPage::OnKillActive();
}
Let me know if this help u
Regards,
Ovidiu