请教,win32 api 编程中,WM_MENUDRAG消息的参数不明白,以及如响应?谢谢!

解决方案 »

  1.   

    wParam
    Specifies the position of the item where the drag operation began. 
    lParam
    Handle to the menu containing the item. win32中都是在窗口函数中响应
      

  2.   

    http://msdn.microsoft.com/en-us/library/ms647606(VS.85).aspx
      

  3.   

    WM_MENUDRAG    WPARAM wParam
        LPARAM lParam;
    ParameterswParam
    Specifies the position of the item where the drag operation began. 
    lParam
    Handle to the menu containing the item. 
    Return Value
    The application should return one of the following values.
    MND_CONTINUE Menu should remain active. If the mouse is released, it should be ignored. 
    MND_ENDMENU Menu should be ended. ResThe application can call the DoDragDrop function in response to this message.To create a drag-and-drop menu, call SetMenuInfo with MNS_DRAGDROP. Notification RequirementsMinimum DLL Version None 
    Header Declared in Winuser.h, include Windows.h 
    Minimum operating systems Windows 98, Windows 2000 是否需要翻译?
      

  4.   

    WM_MENUDRAG 
    当用户拖拽菜单项时,菜单的属主窗口收到该消息。 
    参数: 
    wParam  :指定被拖拽的菜单项位置 
    lParam : 包含该项的菜单句柄
      

  5.   

    返回值: 
    MND_CONTINUE         菜单仍然激活。如果鼠标被释放,它将被忽略 
    MND_ENDMENU         菜单结束 
      
    说明: 
    应用程序在响应该消息时可以调用DoDragDrop函数。 
    为了创建一个支持拖拽的菜单,要用MNS_DRAGDROP风格调用SetMenuInfo 
      

  6.   

    可是WIN32 API 根本找不到MENUINFO这个结构体,而只有MENUITEMINFO结构体,无法设置MNS_DRAGDROP风格,MSDN里也找到MENUINFO结构体。