Menu

Bad message handler prototypes

2011-10-15
2013-05-13
  • Tsuda Kageyu

    Tsuda Kageyu - 2011-10-15

    Currently, CMenu class is used in some message handler prorotypes. For example,

    void OnInitMenuPopup(CMenu menuPopup, UINT nIndex, BOOL bSysMenu)
    

    But I think we should use CMenuHandle instead of CMenu, because CMenu calls DestroyMenu.

     
  • Tsuda Kageyu

    Tsuda Kageyu - 2011-10-16

    MSG_WM_SYSCOMMAND hanlder prototype is wrong too.

    // void OnSysCommand(UINT nID, LPARAM lParam)
    

    The second parameter should be CPoint.

     
  • Nenad Stefanovic

    You are correct. We will fix that.

    Thanks,
    Nenad

     

Log in to post a comment.