Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the code created by the Visual Studio edit box

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to write the code created by the Visual Studio edit box, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Before giving you a detailed introduction to the Visual Studio edit box, first let you understand the traditional software interface, and then a comprehensive introduction of the Visual Studio edit box, I hope it will be useful to you. In traditional software interfaces, we simply execute a command by clicking on a menu item or a button on the toolbar. In the new Ribbon interface, we can not only click buttons, but also enter data through Visual Studio edit boxes or quickly select data through ComboBox, etc., to complete more complex interactions.

The following code demonstrates the process of creating an Visual Studio edit box:

CMFCRibbonPanel*pPanel1=pCategory- > AddPanel (_ T ("Standard")); / / create a simple edit box CMFCRibbonEdit*pBtn1=newCMFCRibbonEdit (ID_RIBBON_EBTN_1,90); pBtn1- > SetEditText (_ T ("Edit")); pPanel1- > Add (pBtn1); / / create an adjustable edit frame CMFCRibbonEdit*pBtn2=newCMFCRibbonEdit (ID_RIBBON_EBTN_2,90); pBtn2- > EnableSpinButtons (0J 99); pBtn2- > SetEditText (_ T ("0")); pPanel1- > Add (pBtn2) / / create ComboBox CMFCRibbonComboBox*pBtn3=newCMFCRibbonComboBox (ID_RIBBON_EBTN_3,TRUE,74); / / add drop-down options pBtn3- > AddItem (_ T ("ComboBox")); for (iRec0There iAddItem (str);} pBtn3- > SelectItem (0); pPanel1- > Add (pBtn3); CMFCRibbonPanel*pPanel2=pCategory- > AddPanel (_ T ("WithIconsandLabels")); / / create edit box CMFCRibbonEdit*pBtn4=newCMFCRibbonEdit with icon (ID_RIBBON_EBTN_4,90,_T ("Label:"), 0) PBtn4- > SetEditText (_ T ("Edit")); pPanel2- > Add (pBtn4); CMFCRibbonEdit*pBtn5=newCMFCRibbonEdit (ID_RIBBON_EBTN_5,90,_T ("Label:"), 1); pBtn5- > EnableSpinButtons (0Magazine 99); pBtn5- > SetEditText (_ T ("0")); pPanel2- > Add (pBtn5); CMFCRibbonComboBox*pBtn6=newCMFCRibbonComboBox (ID_RIBBON_EBTN_6,TRUE,74,_T ("Label:", 2); pBtn6- > AddItem (_ T ("ComboBox")); for (itimiziAddItem (str)) } pBtn6- > SelectItem (0); pPanel2- > Add (pBtn6); CMFCRibbonPanel*pPanel3=pCategory- > AddPanel (_ T ("Font")); / / create font selection ComboBox CMFCRibbonFontComboBox::m_bDrawUsingFont=TRUE; CMFCRibbonFontComboBox*pBtn7=newCMFCRibbonFontComboBox (ID_RIBBON_EBTN_7); pBtn7- > SelectItem (_ T ("Arial")); pPanel3- > Add (pBtn7); the above is how to write the code created by the Visual Studio edit box. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report