WM_INITMENU的WPARAM所指的主菜单句柄是所选菜单项上层菜单句柄还是菜单资源的句柄,或其他?显示一个弹出式菜单是不是显示弹出式菜单的当前菜单项还是弹出式菜单本身?WM_INITMENUPOPUP的WPARAM为弹出式菜单句柄,但LOWORD(lParam)所指的弹出式菜单索引是弹出式菜单的菜单项索引还是其他?

解决方案 »

  1.   

    WM_INITMENU的WPARAM是窗口主菜单的HMENU。
    WM_INITMENUPOPUP的LOWORD(lParam)是子菜单索引。
      

  2.   

    WM_INITMENU

      WPARAM wParam   
      LPARAM lParam    ParameterswParam
    Handle to the menu to be initialized. 
    lParam
    This parameter is not used. 
      

  3.   

    WM_INITMENUPOPUP    WPARAM wParam
        LPARAM lParam;
        
     ParameterswParam
    Handle to the drop-down menu or submenu. 
    lParam
    The low-order word specifies the zero-based relative position of the menu item that opens the drop-down menu or submenu. 
    The high-order word indicates whether the drop-down menu is the window menu. If the menu is the window menu, this parameter is TRUE; otherwise, it is FALSE. 
      

  4.   

    WM_INITMENUPOPUP    WPARAM wParam
        LPARAM lParam;
        
     ParameterswParam
    Handle to the drop-down menu or submenu. 
    lParam
    The low-order word specifies the zero-based relative position of the menu item that opens the drop-down menu or submenu. 
    The high-order word indicates whether the drop-down menu is the window menu. If the menu is the window menu, this parameter is TRUE; otherwise, it is FALSE. 
      

  5.   

    WM_INITMENUPOPUP的LOWORD(lParam)是子菜单索引,到底是哪个子菜单?窗口主菜单是指什么?
      

  6.   

    例如窗口的主菜单有File、Edit、View、Help四个子菜单,拉开File的时候就是0,Edit的时候是1,View的时候是2,Help的时候是3。
      

  7.   

    能不能举个例子解释一下这两个消息,比如主菜单有File、Edit、View、Help四个子菜单,其中File有Open、Save、Print、Exit四个子菜单项?
      

  8.   

    lparam 0 - Open , Save - 1, Print - 2, Exit - 3