开发者

How do i get menu events from a menu item in the system menu of a console window?

I have added a menu item to the SystemMenu of the console window of my application which i created using the AllocConsole() function. but I could not figure out how to pro开发者_StackOverflowcess the events for the menu items I've added.

How can i process those menu events?

Thank you


Did you try overriding window proc of the console window? ie once you have obtained the window handle with GetConsoleWindow and then hooked its window proc with SetWindowLongPtr, you have to listen the WM_SYSCOMMAND message. See this article on how to process menu items from system menu.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜