How to load menu?

zhaozj2021-02-16  84

Three ways:

1. Create (NULL, _T ("My Application"), WS_OVERLAPPEDWINDOW, RectDefault, NULL, MAKEINTRESOURCE (IDR_MAINFRAME));

2. LoadFrame (IDR_MAINFRAME, WS_OVERLAPPEDWINDOW, NULL, NULL);

3. CMenu Menu; menu.loadmenu (idR_mainframe); setmenu (& menu); menu.detach ();

The third method is very useful when a window is required to implement multiple menus!

Remark: If the menu changes after the form has been created, don't forget to use this function: drawmenubar ();

.. .................

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

New Post(0)