Results 1 to 5 of 5

Thread: Custom Toolbar Button Controls

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    18

    Custom Toolbar Button Controls

    Is this example still available anywhere:

    http://kb.roguewave.com/kb/?View=entry&EntryID=222&Msg=

    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.

  2. #2
    Junior Member
    Join Date
    Aug 2010
    Posts
    18
    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?

  3. #3
    Junior Member
    Join Date
    Aug 2010
    Posts
    18
    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?

  4. #4
    Junior Member
    Join Date
    Aug 2010
    Posts
    18
    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?

  5. #5
    Junior Member
    Join Date
    Aug 2010
    Posts
    18
    I'm getting pretty good at answering my own questions!

    In the OnLButtonDown handler I needed this:

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


    Before handing off the message to SECWndBtn.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •