Dialog Bars and Buttons 
Author Message
 Dialog Bars and Buttons

Dear all,

I hope that anyone out there can help me with this
seeming simple question.

I've implemented a dialog bar with buttons on them.  I
would like to be able to disable once in a while.
I use the
m_wndDlgBar.GetDlgItem(ID_DialogBar)->EnableWindow(FALSE);
and it doesn't work.
Even if I disable it from the resource editor it still
won't be disabled.

Thanks very much for your time.

Regards
CT



Wed, 16 Feb 2005 00:09:19 GMT  
 Dialog Bars and Buttons
Have you tried simply m_wndDlgBar.EnableWindow(FALSE);  That would disable
the whole window.  If you're trying to do just one of the buttons use the ID
For the button.

Tom



Quote:
> Dear all,

> I hope that anyone out there can help me with this
> seeming simple question.

> I've implemented a dialog bar with buttons on them.  I
> would like to be able to disable once in a while.
> I use the
> m_wndDlgBar.GetDlgItem(ID_DialogBar)->EnableWindow(FALSE);
> and it doesn't work.
> Even if I disable it from the resource editor it still
> won't be disabled.

> Thanks very much for your time.

> Regards
> CT



Wed, 16 Feb 2005 00:58:06 GMT  
 Dialog Bars and Buttons
whoops,

I've typed in the wrong id for the email
What I've done is
m_wndDlgBar.GetDlgItem(ID_BUTTON1)->EnableWindow(FALSE);

Quote:
>-----Original Message-----
>Dear all,

>I hope that anyone out there can help me with this
>seeming simple question.

>I've implemented a dialog bar with buttons on them.  I
>would like to be able to disable once in a while.
>I use the
>m_wndDlgBar.GetDlgItem(ID_DialogBar)->EnableWindow
(FALSE);
>and it doesn't work.
>Even if I disable it from the resource editor it still
>won't be disabled.

>Thanks very much for your time.

>Regards
>CT
>.



Wed, 16 Feb 2005 14:23:39 GMT  
 Dialog Bars and Buttons
You need to add message handlers for CN_UPDATE_COMMAND_UI messages for all
your buttons like:

void CDlgPanelMainEditor::OnUpdateButton(CCmdUI *pCmdUI)
{
 pCmdUI->Enable(TRUE); // or  pCmdUI->Enable(FALSE);

Quote:
}

Vladimir



Quote:
> Dear all,

> I hope that anyone out there can help me with this
> seeming simple question.

> I've implemented a dialog bar with buttons on them.  I
> would like to be able to disable once in a while.
> I use the
> m_wndDlgBar.GetDlgItem(ID_DialogBar)->EnableWindow(FALSE);
> and it doesn't work.
> Even if I disable it from the resource editor it still
> won't be disabled.

> Thanks very much for your time.

> Regards
> CT



Fri, 18 Feb 2005 06:07:13 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Dialog Bars and Bitmap Buttons

2. how can i add menu and button bar to a dialog

3. Buttons on a dialog bar

4. HELP NEEDED: Modal Dialog pops up with own button in task bar

5. Detecting dialog bar being hidden by command button

6. Bitmap buttons and dialog bars

7. Launch dialog from Floating Tool Bar by double clicking on a button

8. button in dialog bar

9. Dialog Box menu bar and Media Control buttons

10. Dialog box menu bar and Media Control buttons

11. button on dialog bar always disabled?

12. Manipulating buttons on my dialog bar?

 

 
Powered by phpBB® Forum Software