Announcement

Collapse
No announcement yet.

Flat Toolbar & background color

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

  • Flat Toolbar & background color

    I want to create a toolbar with flat style buttons but when I use %TBSTYLE_FLAT in

    hToolbar = CreateToolbarEx(hWnd, %WS_CHILD Or %TBSTYLE_TOOLTIPS or %TBSTYLE_FLAT, _
    %ID_TOOLBAR, 21, %NULL, hBmp, tbb(0), 10, 0, 0, 24, 24, Len(TBBUTTON))

    the toolbar background becomes white although the buttons assume a flat style.
    Does anyone know how to fix this?

    Thanks,

    Heber J Silva



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

  • #2
    Try setting the flat style after the toolbar has been created, like:
    Code:
      LOCAL fstyle AS LONG
      fStyle = GetWindowLong(hToolbar, %GWL_STYLE)
      fStyle = fStyle OR %TBSTYLE_FLAT
      fStyle = SetWindowLong(hToolbar, %GWL_STYLE, fStyle)

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

    Comment


    • #3
      heber jorge;

      also check out this rebar demo ...

      http://www.powerbasic.com/support/pb...ad.php?t=22562

      regards,
      jules

      ------------------
      Best regards
      Jules
      www.rpmarchildon.com

      Comment


      • #4
        Borje,

        Yes! It worked fine after removing the %TBSTYLE_FLAT from the parameters
        list of the CreateToolBarEx() function and adding your code.
        By the way, I'd like to congratulate you for your excellent POFFS v1.3 program.
        Do you intend to periodically update the databases from the PB forums?

        Thank you very much,

        Heber

        Jules,
        I'm going to try your Rebar example.

        Thank you!

        Heber


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

        Comment


        • #5
          Thank you, yes. It will be updated. I have some other things to
          take care of here first, but as soon as I can, I will do it. Must
          do an update procedure for it too, so people don't have to download
          the entire databases each time..


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

          Comment

          Working...
          X