Post by JiiPeePost by GeoffPost by JiiPeeHow can I get toolbar buttons appear as normal buttons (like was with
VS6)? I cannot find that style from the current toolbar styles. Or is
this to do with the project, what type of MFC project I create? If I
create a modern MFC project how can I change only the toolbars to have
the old style buttons but everything else stays like they are?
You create the toolbar resource in resource view in VS, reference the
filename of the toolbar bitmap containing the tool buttons, load it
with m_wndToolBar.LoadToolBar in your CMainFrame::OnCreate function.
So MFC cannot do the 3D frames automatically? Thats how it did it back
90's: you just created the toolbar bitmaps and it added the button
frames automatically. But also when the button is pressed its 3D shape
changes... are you saying I have to also now create the pressed-down
bitmaps?
No, you design them flat, Windows handles the 3D by modifying the
borders on the fly. I know if you want different states of the button
to be displayed when it's up versus down versus disabled you must draw
all states but you don't account for the border, only the face.
Post by JiiPeeBut this all was automatic 20 years ago... so why not anymore?
They've modified the look over time. I think you're referring to the
state where all the toolbar buttons looked raised until pressed. I
think Microsoft now keeps them flat until you hover the mouse over
them. I know that's how Windows 10 behaves for me. I have some apps
that never raise their buttons on hover, only background color change.
Post by JiiPeeI dont remember.... did toolbar bitmaps initially have frames in the
resource bitmaps (like the about button)? I dont think they had... they
only had the question mark bitmat WITHOUT frames and the button added
the frames/3d look on top of it.
I don't remember either. I'm looking in my collection for an example
of an old application. I know it makes a difference which version of
comctl32.dll you load and link to.
I just found one project that calls Enable3dControls() and it
generates a warning that it's deprecated (C4996) but I have not
investigated this or its effects on the project. Commenting out the
call doesn't seem to change the program's behavior.
If you want a good resource about MFC and lots of sample code, go to
http://flounder.com, Joe knew what he was doing. It's times like these
I miss him. He's disappeared from this group for quite some time now
and I fear he may be gone for good.
It's his BetterBmpButton sample that I am referring to above.