使用MFCToolBar进行自定义控制 [英] Custom Control with MFCToolBar

查看:151
本文介绍了使用MFCToolBar进行自定义控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有遗留应用程序和自定义工具栏现在使用CToolbar创建我将我的应用程序移植到MFC功能包。我有以下工具栏

I have legacy application and custom toolbar Created using CToolbar now i am porting my application to MFC Feature pack. i have the following tool bar

我现在面临的问题我如何在它之前添加带有标签的TextBox 并且左/右箭头带有双控制单行。

Problem i am facing now i how to Add TextBox with label before it  and left/Rght arrow with double control on single row.

再次以CMFCToolbarComboBoxButton或其他任何方式添加Line 

Secondhow to add Line in CMFCToolbarComboBoxButton or any other way to do it 




推荐答案

首先看一下< a href ="https://github.com/

first take a look at the TabControl sample for label buttons.

您可以在按钮上放置任何CWnd类型对象(请参阅CMFCToolbarComboBoxButton的源代码)。如果你已经有一个标准的控制按钮(例如CMFCToolbarComboBoxButton)和一个派生自标准控件类的类(例如一个自定义绘制的CComboBox
派生类,它将行作为项目),那么你可以查看是否标准控制按钮可让您替换内部控件(例如虚拟CMFCToolbarComboBoxButton :: CreateCombo或CMFCToolBarEditBoxButton :: CreateEdit)。 

You can place any CWnd type object on buttons (see source code of CMFCToolbarComboBoxButton). If you already have a standard control button (e.g. CMFCToolbarComboBoxButton) and a class that derives from a standard control class (e.g. A custom-draw CComboBox derived class that has lines as items) then you can look up to see if the standard control button lets you to replace the inner control (e.g. virtual CMFCToolbarComboBoxButton::CreateCombo or CMFCToolBarEditBoxButton::CreateEdit). 


这篇关于使用MFCToolBar进行自定义控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆