We''re trying to set up toolbars in our MDI application, and our current result looks as though when the toolbar loses focus, its title bar becomes "greyed out" with Windows colors of "Inactive Titlebar".
Does anyone know the proper window style to use upon creation, that will result in a toolbar with behavior similar to Paintshop Pro / Photoshop / VC++ / (insert app name here) toolbars that appear as though they never lose focus and are always in the foreground?
Thanks!
MatrixCubed http://MatrixCubed.org
I believe you''re looking for a docking toolbar. The one I''m currently working on is working great, and here''s the styles and stuff I have set up:
m_pToolBar is a CToolBar member of my mainframe. It''s actually my main toolbar, which is why it''s IDR_MAINFRAME, you use whatever your toolbar resource ID is.
In Mainframe, because this is the mainframe''s toolbar, at the create: m_pToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
m_pDataToolBar.LoadToolBar(IDR_MAINFRAME);
m_pDataToolBar.EnableDocking(CBRS_ALIGN_ANY);
Then for your frame window, (mainframe for me, whatever frame you want it to dock in for you), you have to set up docking as well, with just a EnableDocking(CBRS_ALIGN_ANY); DockControlBar(&m_pToolBar); which belongs right after the above.
Let me know if you have any problems.
-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Hmmm well the problem here is that we''re not using MFC or the MS windowing classes, just the straight controls and their messages (there''s a good reason for this; essentially MFC is not an option). I need to know the style for creating a dock-less window that has the behavior of a toolbar in that it appears to never lose focus (i.e. be set in the background).