CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CProperty Sheet

  1. #1
    Join Date
    Aug 1999
    Location
    India
    Posts
    8

    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


  2. #2
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured