|
-
October 17th, 1999, 07:33 PM
#1
propertysheet - how to enable/disable buttons ?
hi,
i need to disable "OK" button of a propertysheet and i don't know how to do this .
i tried something like this :
...
int CALLBACK PropSheetProc(
HWND hwndDlg, // handle to the property sheet dialog box
UINT uMsg, // message identifier
LPARAM lParam // message parameter
)
{
((CButton *)::GetDlgItem(hwndDlg,IDOK))->EnableWindow(FALSE);
return 1;
}
...
void MySettings()
{
...
m_propsheet=new CPropertySheet(_T("My propertysheet"));
m_propsheet->m_psh.dwSize=sizeof ( PROPSHEETHEADER );
m_propsheet->m_psh.dwFlags|=PSP_USECALLBACK;
m_propsheet->m_psh.pfnCallback=PropSheetProc;
m_propsheetSession->DoModal();
...
}
...
but it not work .
thanks in advance for your help .
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
|