Enable The Button Control
-
Hi I am Using VS 6 And working in VC++ i want to disable the cancel button on clicking the ok button.....How to do it Edit/Delete Message
AbidBhat
CWnd* p = GetDlgItem(IDCANCEL);
p->EnableWindow(FALSE);Maxwell Chen
-
CWnd* p = GetDlgItem(IDCANCEL);
p->EnableWindow(FALSE);Maxwell Chen
Thanks But on adding these lines......it gives an error msg as error C2501: 'CWnd' : missing storage-class or type specifiers error C2501: 'p' : missing storage-class or type specifiers left of '->EnableWindow' must point to class/struct/union Error executing cl.exe.
AbidBhat
-
Thanks But on adding these lines......it gives an error msg as error C2501: 'CWnd' : missing storage-class or type specifiers error C2501: 'p' : missing storage-class or type specifiers left of '->EnableWindow' must point to class/struct/union Error executing cl.exe.
AbidBhat
Your project is Win32 type, right?
HWND h = ::GetDlgItem(hYourDlgHandle, IDCANCEL);
::EnableWindow(h, FALSE);Maxwell Chen
-
Your project is Win32 type, right?
HWND h = ::GetDlgItem(hYourDlgHandle, IDCANCEL);
::EnableWindow(h, FALSE);Maxwell Chen
-
Or if you have handle to button you dont need to use of GetDlgItem.