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.
精彩评论