Pulldown menu size - OS2

This is a discussion on Pulldown menu size - OS2 ; Has anyone any idea how I can find the size of the rectangle created during a pull down menu. If I have a title bar with a menu item defided as IDM_FILE and use WinSendMsg(hwndMenu, MM_QUERYITEM, MPFROM2SHORT(IDM_FILE, TRUE), /* Submenu ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Pulldown menu size

  1. Pulldown menu size

    Has anyone any idea how I can find the size of the rectangle created during
    a pull down menu. If I have a title bar with a menu item defided as
    IDM_FILE and use

    WinSendMsg(hwndMenu, MM_QUERYITEM, MPFROM2SHORT(IDM_FILE, TRUE), /*
    Submenu identifier */
    (MPARAM) &mi);
    /* Pointer to MENUITEM */
    WinQueryWindowRect (mi.hwndSubMenu, &rcl)

    Then all I get is the size of the rectangle of IDM_FILE on the title bar.
    What I need is the size of the drop down menu which contains the submenu
    items.



    Keith



  2. Re: Pulldown menu size

    In article ,
    "Keith" wrote:

    >Has anyone any idea how I can find the size of the rectangle created during
    >a pull down menu. If I have a title bar with a menu item defided as
    >IDM_FILE and use
    >
    >WinSendMsg(hwndMenu, MM_QUERYITEM, MPFROM2SHORT(IDM_FILE, TRUE), /*
    >Submenu identifier */
    > (MPARAM) &mi);
    >/* Pointer to MENUITEM */
    >WinQueryWindowRect (mi.hwndSubMenu, &rcl)
    >
    >Then all I get is the size of the rectangle of IDM_FILE on the title bar.
    >What I need is the size of the drop down menu which contains the submenu
    >items.


    Hi Keith the MENUITEM structure of the item owning the drop down
    should contain the handle of the drop down itself (which is a separate
    window) once you have got the handle you can use WinQueryWindowRect()
    to get the drop down size or WinQueryWindowPos() if you need more details

    --
    bye
    Alessandro

+ Reply to Thread