Ensuring Toolbar Visibility

This is a discussion on Ensuring Toolbar Visibility within the Windows Programming forums, part of the Platform Specific Boards category; Hello, Suppose I have a tool window with a toolbar child. I want to be able to limit resizing of ...

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,261

    Ensuring Toolbar Visibility

    Hello,

    Suppose I have a tool window with a toolbar child. I want to be able to limit resizing of the tool window so it must always display every button (with as many rows as necessary). I know it's got to do with handling WM_SIZING and using AdjustWindowRectEx to change the RECT given, but I'm not sure how to make sure every button is visible and permit adjustment to a different layout.

    So if I have a toolbar with 6 buttons on it, I could have:-
    1x6 2x3 2x4 2x5 3x2 4x2 5x2 6x1
    (Not always full rows)

    I think the main issue is that free resizing affects both axes, whereas if I only changed one at a time it would be more straightforward.

    Anyone got some input?

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Send the TB_AUTOSIZE message to your toolbar whenever your toolbar width changes, or when a button is added/removed.

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, 03:35 AM
  2. toolbar button question
    By supernater in forum Windows Programming
    Replies: 1
    Last Post: 05-25-2009, 08:24 PM
  3. Putting Images In The Toolbar
    By blueterry in forum Windows Programming
    Replies: 0
    Last Post: 06-30-2007, 10:49 AM
  4. Toolbar color
    By mrafcho001 in forum Windows Programming
    Replies: 2
    Last Post: 04-17-2006, 10:55 AM
  5. Dockable Toolbar (Like taskbar or office toolbar)
    By om3ga in forum Windows Programming
    Replies: 2
    Last Post: 11-20-2005, 02:09 AM

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