Click to See Complete Forum and Search --> : CProperty Sheet


Jayakumar
August 24th, 1999, 01:35 AM
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

Burlacu Ovidiu
August 24th, 1999, 01:52 AM
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