Click here to Skip to main content
15,894,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was doing a project in which there were many controls on a dialog box. This dialog box could display for different user interactions. At different interactions some controls on the dialog box become enable and some become disable. To do the enabling and disabling, of ActiveX Control Command Button it gave an error.i.e

C#
BOOL CWnd::EnableWindow(BOOL bEnable)
{
    ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));

    if (m_pCtrlSite == NULL)
        return ::EnableWindow(m_hWnd, bEnable);
    else
        return m_pCtrlSite->EnableWindow(bEnable);
}


if i was use this line to disable the Command Button, it go in above function .and gave Unhandled exception .
GetDlgItem(IDC_COMMANDBUTTON12)->EnableWindow(FALSE);



Please tell me what can i do to remove this error.



Thanks...
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900