Announcement

Collapse
No announcement yet.

DDT Statusbar

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

  • DDT Statusbar

    How do I create a Statusbar on a non-resizable dialog created with
    Dialog New ... Style %WS_POPUP or %WS_CAPTION
    any help appreciated


    ------------------
    Fred
    mailto:[email protected][email protected]</A>
    http://www.oxenby.se

    Fred
    mailto:[email protected][email protected]</A>
    http://www.oxenby.se

  • #2
    Fred,

    Inlcude COMMCTRL.INC in your code and create the statusbar using...

    GLOBAL hStatBar AS DWORD

    hStatBar is the new statusbar handle. You'll need it to write
    new text in it.

    hStatBar = CreateStatusWindow(_
    %WS_CHILD OR %WS_VISIBLE OR %WS_CLIPSIBLINGS OR %CCS_NOPARENTALIGN OR %CCS_BOTTOM OR %CCS_NORESIZE, _
    "Statusbar",_
    hWnd,_
    NextCtrlID)

    ...where hWnd is the handle of the form you want it in, and,
    NextCtrlID is a unique ID number for the new statusbar. Say 3000

    You can also add %SBARS_SIZEGRIP to the styles so that you have a
    size grip at the bottom right corner of it.

    To write into the pane, use something like...

    LOCAL tmpstr AS STRING

    tmpstr = "this is a status bar"
    SendMessage hStatBar, %SB_SETTEXT, 0, STRPTR(tmpstr)

    Hope this helps. I havn't tested it, but it should work.

    -Michael-

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

    Comment


    • #3
      Thanks Michael,
      It was a non-Resizable DDT-Dialog.
      But %CCS_NOPARENTALIGN was the style I was looking for
      Note that SBARS_SIZEGRIP will make the statusbar resizable.


      ------------------
      Fred
      mailto:[email protected][email protected]</A>
      http://www.oxenby.se

      Fred
      mailto:[email protected][email protected]</A>
      http://www.oxenby.se

      Comment

      Working...
      X