Announcement

Collapse
No announcement yet.

Height of menu + toolbar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Height of menu + toolbar

    There is a %WS_POPUP window (without border), which includes menu and toolbar (autosize) only.
    dyBitMap in CreateToolbarEx = Y pixels.
    How much pixels in height (minimum) should have this window ?

    GetSystemMetrics(%SM_CYMENU) + Y (dyBitmap) + what ???

    #2
    Semen,

    If you have the handle of the toolbar, just use GetWindowRect and
    calculate the current toolbar height, it should work OK.

    Regards,

    [email protected]

    ------------------
    hutch at movsd dot com
    The MASM Forum - SLL Modules and PB Libraries

    http://www.masm32.com/board/index.php?board=69.0

    Comment


      #3
      Yep but you need client2screen to determine it

      This retrieves the X and Y from the client like getwindowrect

      X - windowrect.nLeft etc..

      ------------------

      Comment


        #4
        Thanks, guys.
        I tried to use Steve's suggestion (Win95b), using GetWindowRect.
        .nTop for parent window = 25
        .nTop for Toolbar = 44 = 25 + CYMENU - Ok
        But .nBottom is 72 for two variants: dyBitmap = 24 and dyBitmap = 48 !!!

        It looks that it's necessary to add 12 pixels todyBitmap for classic view. But what means these 12 pixels ?
        I can imagine 4 * CYFIXEDFRAME. But it's fantasy only.

        Ps. Unfortunatelly, Windows doesn't reduce client's area, during attaching toolbar. So attempts to understand toolbar's height using client's coordinates also failed.

        [This message has been edited by Semen Matusovski (edited June 07, 2000).]

        Comment


          #5
          Adjust menu on my site (VB!) does show you something about this..



          ------------------

          Comment


            #6
            Steve --
            I'm sorry. Your idea works fine.
            I calculated .nBottom - .nTop imm. after CreateToolbarEx.
            It was a mistake. After SendMessage hToolbar, %TB_AUTOSIZE, 0, 0 .nBottom - .nTop = 36, like I expected.
            Thanks.

            ------------------

            Comment

            Working...
            X
            😀
            🥰
            🤢
            😎
            😡
            👍
            👎