Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

remi

MFC DialogBar problem

This topic is 5301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Hi,
I have the same problem, that the buttons on a dialogbar are disabled. Have you already found a solution?
I would appreciate an answer very much.

Share this post


Link to post
Share on other sites
Yeah i solved the problem but i don''t remember exactly what i did. Try adding CBRS_TOOLTIPS | CBRS_FLYBY this flag to your CToolBar''s CreateEx function.

If it doesn''t work, post your code over.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!