Results 1 to 2 of 2

Thread: Status bar help

  1. #1
    ChimpFace9000
    Guest

    Post

    I just added a status bar to my window using CreateStatusWindow, now how do i split it into sections so i can display multiple information.

  2. #2
    Guest
    Send a SB_SETPARTS message to the status bar.

    SB_SETPARTS


    Sets the number of parts in a status window and the coordinate of the right edge of each part.

    SB_SETPARTS
    wParam = (WPARAM) nParts;
    lParam = (LPARAM) (LPINT) aWidths;

    Parameters
    nParts
    Number of parts to set (cannot be greater than 256).
    aWidths
    Pointer to an integer array. The number of elements is specified in nParts. Each element specifies the position, in client coordinates, of the right edge of the corresponding part. If an element is -1, the right edge of the corresponding part extends to the border of the window.
    Return Values
    Returns TRUE if successful, or FALSE otherwise.

    Requirements
    Windows NT/2000: Requires Windows NT 3.51 or later
    Windows 95/98: Requires Windows 95 or later
    Header: Declared in commctrl.h.
    After than, send a SB_SETTEXT message.

    SB_SETTEXT


    The SB_SETTEXT message sets the text in the specified part of a status window.

    SB_SETTEXT
    wParam = (WPARAM) iPart | uType;
    lParam = (LPARAM) (LPSTR) szText;

    Parameters
    iPart
    Zero-based index of the part to set. If this parameter is set to SB_SIMPLEID, the status window is assumed to be a simple window with only one part.
    uType
    Type of drawing operation. This parameter can be one of the following values: 0 The text is drawn with a border to appear lower than the plane of the window.
    SBT_NOBORDERS The text is drawn without borders.
    SBT_OWNERDRAW The text is drawn by the parent window.
    SBT_POPOUT The text is drawn with a border to appear higher than the plane of the window.
    SBT_RTLREADING The text will be displayed in the opposite direction to the text in the parent window.

    szText
    Pointer to a null-terminated string that specifies the text to set. If uType is SBT_OWNERDRAW, this parameter represents 32 bits of data. The parent window must interpret the data and draw the text when it receives the WM_DRAWITEM message. The text for each part is limited to 127 characters.
    Return Values
    Returns TRUE if successful, or FALSE otherwise.

    Remarks
    The message invalidates the portion of the window that has changed, causing it to display the new text when the window next receives the WM_PAINT message.

    Normal windows display text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that read right-to-left (RTL). If SBT_RTLREADING is set, the szText string will read in the opposite direction from the text in the parent window.

    Requirements
    Windows NT/2000: Requires Windows NT 3.51 or later
    Windows 95/98: Requires Windows 95 or later
    Header: Declared in commctrl.h.

    See Also
    SB_GETTEXT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width