Enable and disable the toolbar button!

zhaozj2021-02-16  73

Add a user interface handler

1) Follow the steps shown in Example 1 3 About the step of adding a menu command to process the function, but then use u pd e _

C O m M a n D _ U i, not C O m M M a n D.

2) Add the following code to the new handler, if you want to enable the menu item, m _ b w z d is T R u E.

Void CWZDVI E W:: O N u P D A TEE W Z D TYPE (CCMDUI * PCMDUI)

{

P C m D u i -> e n a b L E (m _ b w z d);

}

Description

■ The menu item associated with the toolbar button is enabled or disabled with the button.

■ The status of the toolbar button is not updated, and the process is only called when the application is idle. If you don't want to wait

For less than a long time, you can get a pointer to this toolbar (may be in CMA I n f R a m e), and call

Its U P D A TEE WINDOW () member function.

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

New Post(0)