Still about Menubar's bug in EVC

xiaoxiao2021-03-06  19

If you manually modify the RC file, then after each additional new resource, Menubar's data will be automatically modified by IDE. Therefore, the best way is to separate the data of mebar into a separate file.

1. Create a new text file menubar.rc2.

2, enter menu data in it:

[Menubar ID] RCDATABEGIN [Menubar ID], [Top Menu Item Number], // The following is the top-level menu item I_IMAGENONE, [Menu Item ID], [Menu Item Status], [Style], [Menu Item Text Corresponding word string table ID], 0, [access number], .... End

Description:

· The number of top menus items is 1 to 2.

· Menu items are generally taken

TBSTATE_ENABLED.

· Style is generally

TrStyle_Autosize, plus popping items

TBStyle_Dropdown, otherwise plus

TBStyle_Button.

· If there is no pop-up child, the attachment is

Nombenu, otherwise 0 represents 1 item, 1 represents 2 items, and so on.

3. Open the RC file in text, join menuBar data:

3 Textinclude Discardable Begin "#include" "MenuBar.rc2" "/ r / n" "/ 0" end4, add the ID of Menubar and its menu item in resource.h.

5. Add the text and ID of each menu item in the string table resource.

转载请注明原文地址:https://www.9cbs.com/read-42721.html

New Post(0)