开发者

CMFCCaptionBar with multiple buttons?

I made a subclass of CMFCCaptionBar in what has so far been a vain attempt to make it do something more useful than just having a single icon, single text field, and single button while still maintaining the same look, feel, and other GUI functionality.

Reference: http://msdn.microsoft.com/en-us/library/bb983960%28v=vs.90%29.aspx

Example:

CMFCCaptionBar with multiple buttons?

Haven't really figured out anything that works yet as it seems pretty locked down. You can remove things but can't really add things as far as I can tell. What I'd like to be able to do is add different icons from an CImageList and formatted text on multi开发者_Go百科ple buttons dynamically. Then provide a context menu with additional options when each button is clicked that corresponds to data the button represents.

If there is a way to make a horizontal CTreeCtrl or CListCtrl layout on a toolbar that functions similarly I'm game to try that out too but I tried subclassing CMFCReBar and putting a custom CDialogBar on it and that didn't play very nicely with the ribbon control and other things in use. Actually that's putting it nicely is was basically a nightmare and waste of time.

This is for navigating a parent child relationships of different items that will change based on the current selection in other DockablePane window views. These views vary from hierarchical, lists, 3d, and statistical representations of the items. The idea is to provide something similar to this caption bar across the top so the user can always see and interact with the currently selected object and immediate parents or children which may not always be obvious from the current view (especially in 3d).

Something like this is what I'm aiming for (use your imagination, my mspaint skills are weak)

CMFCCaptionBar with multiple buttons?

Any suggestions at all are welcome ... other than not using MFC because I'm stuck with it.


As far as I know, you can try to use a CMFCRebar and a CMFCToolbar instead. See the RebarTest demo for details

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜