View Full Version : Custom Toolbar Button Controls

05-22-2013, 07:36 PM
Is this example still available anywhere:


Or is there a different / better way to do this?

I already have two custom combobox classes that I'd like to use on a toolbar.

05-26-2013, 09:36 PM
I solved this by making a new version of my classes based on the COMBO_BUTTON classes. Now I'd like to do the same with the colorwell - is there a way to put a colorwell button on the toolbar? Or do I need some class customisation again?

05-27-2013, 03:41 PM
I looked at this and found I can use SECBmpMgr to get at the HBITMAPS for my toolbars. Can I thence change the bits of the bitmaps directly? (I've got a popup colorwell to work on the button click, but I'd like to change the button bitmap to display the chosen colour). Is this the best approach?

05-29-2013, 10:30 PM
OK, I've got most of the way there by deriving a class from SECWellButton and SECWndBtn, but it isn't fully customisable - I can't add my new toolbar well button to new toolbars or resize it. What else do I need to do?

05-30-2013, 04:09 PM
I'm getting pretty good at answering my own questions!

In the OnLButtonDown handler I needed this:

BOOL bAlt = (::GetKeyState(VK_MENU) & 0x8000000L) ? TRUE : FALSE;
if (m_pToolBar->InConfigMode() || bAlt)
if (::GetCapture() != NULL)

Before handing off the message to SECWndBtn.