How to use main menu handle in TrackPopupMenu()
17:57 04 Jan 2014

I am recently reading the article of Petzold Charles's Programming Windows(5th Edition), in the book's p371, it mentioned you can display a popup menu by making use of the main menu(which you created like below:)

MENUDEMO MENU DISCARDABLE
BEGIN
POPUP "&File"
   BEGIN
     MENUITEM "&New", IDM_FILE_NEW
   END
POPUP "&Edit"
  BEGIN
    MENUITEM "&Undo", IDM_EDIT_UNDO
  END
END

That the TrackPopupMenu requires a popup menu handle, and the handle acquired from above resource is not. But as the book said you can refer to MS Knowledge Base Q99806 to find the solution on how to walk around this.

I have tried to search that article but cannot find(It seems, over the years, Microsoft has moved many such articles). If anyone has a copy of it or knows the solution, would you please share it with me. Thank you for your help in advance.

winapi visual-c++