Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable a button in a dialog that host ActiveX control 1

Status
Not open for further replies.

kshea

Technical User
May 31, 2002
60
CA
Hello Everyone:

I have an ATL COM application. I created a dialog box (modal) that host ActiveX control (implementing class CAxDialogImpl). I tried to do disable buttons in the dialog like this:

HWND hwDeleteButton = GetDlgItem(IDC_DELETEBUTTON);
hwDeleteButton ->EnableWindow(FALSE);

I got “error C2039: 'EnableWindow' : is not a member of 'HWND__'”

I also got compiler complaint when using BOOL EnableWindow( HWND hWnd, BOOL bEnable );

Thank you for your help.
 
It should be in MFC so:
::EnableWindow( hwDeleteButton, FALSE );
:: says compiler / linker to use Window's EnableWindow() instead of CWnd::EnableWindow().
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top