Hi all,
I''ve have added a CDialogBar to my SDI window,but all the push button like controls are disabled,even if dynamically enable them(with the EnableWindow() function), they just remain disabled while all the other controls are working properly.
CFrameWnd *cFrame = NULL;
cFrame = this->GetParentFrame();
if(!m_GameDlgBar.Create(cFrame,
IDD_GAME_DLG_BAR,
WS_CHILD | WS_VISIBLE | CBRS_RIGHT IDD_GAME_DLG_BAR))
{
AfxMessageBox( "Unable to create m_GameDlgBar\n"
+GetErrorString());
return ;//FALSE;
};
m_GameDlgBar.EnableButtons();
and then the function EnableButton''s def.
void CGameDlgBar::EnableButtons()
{
HWND hWnd;
GetDlgItem( IDC_PASS, &hWnd);
::EnableWindow(hWnd, TRUE);
GetDlgItem( IDC_SEND, &hWnd);
::EnableWindow(hWnd, TRUE);
//m_Send.EnableWindow( TRUE );
//m_Pass.EnableWindow( TRUE );
}
Any help?
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"