Vertical rebar, not wide enough

This is a discussion on Vertical rebar, not wide enough within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to make a vertical rebar, however it doesn't resize horizontally properly. Code: ZeroMemory(&rbi,sizeof(REBARBANDINFO)); rbi.cbSize = sizeof(REBARBANDINFO); rbi.fMask = ...

  1. #1
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293

    Vertical rebar, not wide enough

    I'm trying to make a vertical rebar, however it doesn't resize horizontally properly.

    Code:
    ZeroMemory(&rbi,sizeof(REBARBANDINFO));
        rbi.cbSize = sizeof(REBARBANDINFO);
        rbi.fMask = RBBIM_CHILD|RBBIM_TEXT|RBBIM_STYLE|RBBIM_SIZE|RBBIM_CHILDSIZE;
        rbi.fStyle = RBBS_CHILDEDGE;
        rbi.cyMinChild = 1070;
        rbi.cx = 2050;
        rbi.lpText = "Controls";
        rbi.cch = lstrlen(rbi.lpText);
        cCtrls[_TOOLSREBAR].SetMetrics(REBARCLASSNAME,NULL,10,110,500,100,0,WS_CHILD|WS_VISIBLE|CCS_NOMOVEX|CCS_LEFT);
        cCtrls[_TOOLSREBAR].parent = HWND_MAIN;
    cCtrls[_TOOLSREBAR].Init();
        cCtrls[_TOOLSREBAR].SendMsg(RB_SETBARINFO,0,(LPARAM)&ri);   
     cCtrls[_TOOLSREBAR].SendMsg(RB_INSERTBAND,(WPARAM)-1,(LPARAM)&rbi);
    rebarinfo is defined a bit before that code but seeing as it is not required I left that part out.

    cCtrls[] is an array of type CTRL which is a crappy little control class I just made up to test.

    I'm sending all the required messages I believe, and I know the height and the width should be a certain value which I've set but it doesn't go any wider than one character.

  2. #2
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    Has anybody had this sort of problem before?

  3. #3
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355
    Judging by the lack of responses I'd say not many people have worked with rebars, they are explorer style tool bars right?
    Thor's self help tip:
    Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.

    OS: Windows XP
    Compiler: MSVC

  4. #4
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    Yeah

  5. #5
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355
    Well the best advice I can offer is read and re-read the MSDN stuff on them. Sorry I can't help any more.

    Edit: Bathurst huh? Cool...I'm Tasmanian, feel sorry for me. :P
    Thor's self help tip:
    Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.

    OS: Windows XP
    Compiler: MSVC

  6. #6
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    lol, ..

  7. #7
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    I had the same problem but I replaced / filled the rebar with a dialog bar.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  8. #8
    lyx
    lyx is offline
    Amateur
    Join Date
    Sep 2003
    Posts
    228
    Excuse me to interrupt but what is a dialog bar?

  9. #9
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    I've made my own control to replace the rebar, it's much easier to use and works.

    Lyx, I found this on MSDN:
    http://msdn.microsoft.com/library/de...bar_topics.asp

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cannot insert toolbar into rebar
    By supernater in forum Windows Programming
    Replies: 1
    Last Post: 06-02-2009, 04:35 AM
  2. Rebar and ToolBars
    By underline_bruce in forum Windows Programming
    Replies: 4
    Last Post: 05-25-2007, 10:48 PM
  3. Fastest way to draw a vertical line
    By CrazyNorman in forum Game Programming
    Replies: 7
    Last Post: 10-17-2006, 10:59 AM
  4. about wide character and multiple byte character
    By George2 in forum C Programming
    Replies: 3
    Last Post: 05-22-2006, 09:11 PM
  5. Rebar problems
    By Mithoric in forum Windows Programming
    Replies: 6
    Last Post: 11-19-2003, 05:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21