|
-
July 24th, 1999, 05:11 AM
#1
How do I setfocus to a button in CPropertyPage
Hi,
I am trying to setfocus to the OK button or to the CANCEL button within my Property page, I cannot seem to focus on the button and also when I press return it seems to goto to the cancel button, how do I setfocus onto a different button and also has the input focus. Code below
CPropertySheet* pParent=(CPropertySheey*)GetParent();
CButton* pWndCtrl=(CButton*)pParent->GetDlgItem(IDOK);
UINT nStyle=pWndCtrl->GetButtonStyle();
nStyle=nStyle|BS_DEFPUSHBUTTON;
pWndCtrl->SetButtonStyle(nStyle);
pWndCtrl->SetFocus();
Kind Regards
Pekibu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|