|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Timo Stripf
|
Jun 23, 2008 - 3:56 AM
|
Since 2.83 happens, that all dynamic control bar windows which are in document style have a wrong CtrlID? Has this any reasons?
|
|
Timo Stripf
|
Jun 23, 2008 - 1:23 PM
|
If i create dynamic toolbars with a child which has CtrlID 18 and i load the toolbar states with CExtControlBar::ProfileBarStateLoad then all childs have a CtrlID higher then 257 which are in document mode. Debug output before ProfileBarStateLoad (the first number is the ctrlid) View: 9 7B17AE8 (document mode)
View: 11 7AEB660
View: 13 7AEC2B8
View: 10 7AF2910
View: 14 7B0BE68
View: 8 7B12658
View: 18 7B0ED30 (document mode)
View: 12 7B16C30 (document mode) Debug output after ProfileBarStateLoad View: 11 7AEB660
View: 13 7AEC2B8
View: 10 7AF2910
View: 14 7B0BE68
View: 8 7B12658
View: 259 7B0ED30
View: 258 7B16C30
View: 257 7B17AE8 And a other question. How i can hide dialog toolbars from the dynamic menu which is open on a right click of the free toolbar space?
|
|
Technical Support
|
Jun 24, 2008 - 4:44 AM
|
The dialog control identifier of a dynamic control bar’s child window should be changed when it is moved into an MDI child frame window. This is required because the MDI child frame window uses dialog control identifiers for automatic repositioning the windows inside it.
The CFrameWnd::ShowControlBar() method is unavailable for toolbars and other control bars created as children of a dialog and other non-frame windows. So, you should simply hide the toolbar inside dialog by invoking toolbar’s CWnd::ShowWindow() method with the SW_HIDE parameter (You can also use CWnd::SetWindowPos() with SWP_HIDEWINDOW ) and then reposition other bars in the same dialog by invoking the dialog’s CWnd::RepositionBars() method with appropriate parameters.
We need more detailed information about the menu which should be used for showing/hiding a toolbar inside the dialog. We also need more information about the layout of dialogs and windows in your application.
|
|
Timo Stripf
|
Jun 24, 2008 - 5:31 AM
|
Thanks for you reply, but some misunderstandings. I use a SDI Application here is a screenshot of it. http://clip2net.com/clip/m7085/1214305963-clip-98kb.png#@lt;/p>
The problem of child identifier is fixed, but the problem with toolbar menu still exist. You can see 3 toolbar entries on the bottom of the menu, now my question how i can hide this entries, because they have no function.
|
|
Technical Support
|
Jun 23, 2008 - 12:53 PM
|
The dynamic control bars do not use any dialog control identifiers for searching their child windows in any mode. Dynamic bars invoke CExtDynamicControlBar::OnQueryChildHWND() to find their child window.
|
|