I have a modal dialog with a command bar control.
So, to enable / disable some buttons of the command bar control I use the
OnUpdate???(CCmdUI* pCmdUI) function.
So, after I found out that the OnUpdate???(CCmdUI* pCmdUI) function
will not be called automatic (in the idle loop), I added the line
m_pWndEmptyCB->OnUpdateCmdUI((CFrameWnd *)this, TRUE); each time in the
program where I change the command bar state.
It works fine, always the right buttons are enabled / disabled.
I have only one problem!
Sometimes the wrong button icons (disabled/enabled icons)
are painted on the buttons.
When I have a disabled button it could be, that it have a "enabled icon".
And when I have a enabled button, it could be that it have a "disabled icon".
When I click on the enabled button, the right icon (enabled icon) will be painted!
Any idea to fix that problem??? It looks like missing a (re)painting message of the
command bar!
(I am working with embedded Visual C++ 3.0)
--
Nice greets, Daniel.
So, to enable / disable some buttons of the command bar control I use the
OnUpdate???(CCmdUI* pCmdUI) function.
So, after I found out that the OnUpdate???(CCmdUI* pCmdUI) function
will not be called automatic (in the idle loop), I added the line
m_pWndEmptyCB->OnUpdateCmdUI((CFrameWnd *)this, TRUE); each time in the
program where I change the command bar state.
It works fine, always the right buttons are enabled / disabled.
I have only one problem!
Sometimes the wrong button icons (disabled/enabled icons)
are painted on the buttons.
When I have a disabled button it could be, that it have a "enabled icon".
And when I have a enabled button, it could be that it have a "disabled icon".
When I click on the enabled button, the right icon (enabled icon) will be painted!
Any idea to fix that problem??? It looks like missing a (re)painting message of the
command bar!
(I am working with embedded Visual C++ 3.0)
--
Nice greets, Daniel.