开发者

C++ Windows add option to menu

开发者 https://www.devze.com 2023-04-09 09:03 出处:网络
In windows, when you click the small icon in the upp开发者_Go百科er left of the window, you get a menu with Move, Minimize, Maximize, and Close options.

In windows, when you click the small icon in the upp开发者_Go百科er left of the window, you get a menu with Move, Minimize, Maximize, and Close options.

Is there anyway I can add my own options to that menu?


Absolutely.

GetSystemMenu(hWindow, FALSE) gets you menu handle and you are free to modify it.

A nice way is to add a separator and append your additional items like "About...". ATL code snippet is here: http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/FilterGraphSpy/GraphBuilderCallbackPropertySheet.h#ln1392 lines 1392-1396.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号