Announcement

Collapse
No announcement yet.

Status bar triangular pattern corner...

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

  • Status bar triangular pattern corner...

    I have the following dialog box, I prefer it not be resizeable at all.

    Dialog New 0, g_Mine,,, 180,125, %WS_MINIMIZEBOX Or %WS_CAPTION Or %WS_SYSMENU Or %WS_EX_LEFT To hDlg
    'Dialog New 0,g_Mine,,, 180,120, %WS_OVERLAPPEDWINDOWNOMAX Or %WS_CAPTION Or %WS_SYSMENU Or %WS_THICKFRAME To hDlg

    The WS_OVERLAPPEDWINDOWNOMAX is simply the overlapped minus the maximize box....but I can still resize the box of course, and I don't want that..

    However, the status bar I have on this has the nice pattern with the triangular shape on the lowr right corner...is that for resizing only or is there a way to get that without a resizable dialog box?

    I think it's eiter not possible or is a matter of how the dialog is created...

    Thanks

    Scott

    -------------
    Scott
    mailto:[email protected][email protected]</A>
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    The "SizeGrip" or "SizeBox" (as it is known) can be created in two ways - either the status bar contains a %SBARS_SIZEGRIP style, or you are using a scrollbar control to create it (%SBS_SIZEGRIP).

    A SizeGrip itself is not "related" to a dialog or window style - it can only be a child control (or is part of a status bar child control). When a scrollbar sizegrip is dragged, you have to programatically move the control within the dialog in response to %WM_SIZE messages. With a statusbar control, you need to forward %WM_SIZE messages to statusbar itself, so the statusbar control should move the grip as the statusbar resizes to fit the dialog.

    You can certainly place one of these in a non-resizable dialog, but it would certainly be strange!

    If you want your dialog to not be resizable and yet the dialog uses a thickframe style, you need to intercept %WM_GETMINMAXINFO in the dialog/window callback and set the minimum and maximum window/dialog sizes in the MINMAXINFO structure that is pointed to by LPARAM (or CBLPARAM if this is a DDT dialog). This works but the cursor will change to a resizing-arrow as it touches the edges of the dialog/window - not an aesthetically pleasing effect.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      It is also possible to keep a resizable dialog from resizing by using the GetSystemMenu and DeleteMenu APIs to kill the %SC_SIZE system menu item.

      And if you intercept the WM_SETCURSOR message in your callback function, you can use the SetCursor API to specify the arrow cursor, and the undesirable cursor-change will be eliminated.

      -- Eric

      ------------------
      Perfect Sync: Perfect Sync Development Tools
      Email: mailto:[email protected][email protected]</A>

      "Not my circus, not my monkeys."

      Comment


      • #4
        Good point Eric - I sometimes forget about the effects of removing system menu items such as SIZE, MOVE, etc.


        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Wow, now that is in depth!
          I know it is strange, but it's a small app and without the sizegrip it LOOKS strange (To me)...

          I am going to try to implement all of the above, just for the learning curve...

          BTW, the app is on the freeware page, it's the initiatesystemshutdown api being used (Fantastic API under 2000/NT!!!)..

          http://www.tngbbs.com

          Thanks!!
          Scott

          ------------------
          Scott
          mailto:[email protected][email protected]</A>
          Scott Turchin
          MCSE, MCP+I
          http://www.tngbbs.com
          ----------------------
          True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

          Comment


          • #6
            Aha! I found my problem, I was using %SBS_SIZEGRIP and not %SBARS_SIZEGRIP

            Yeah, it does look a little strange, Perhaps I will just leave it the way it is....




            Scott

            ------------------
            Scott
            mailto:[email protected][email protected]</A>
            Scott Turchin
            MCSE, MCP+I
            http://www.tngbbs.com
            ----------------------
            True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

            Comment

            Working...
            X