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