Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Customizing toolbar

Customizing toolbar

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jake Palmer
    wrote on last edited by
    #1

    I am trying to make a toolbar with rearrangable buttons. After not being able to figure this out, I've settled for trying to allow my toolbar to be customized, which does drag/drop automatically. According to MSDN docs, the customize dialog sends the messages TBN_QUERYDELETE and TBN_QUERYINSERT, and expects booleans returned. If those are WM_NOTIFY messages, then I only know how to handle them with afx_msg void functions. Any help with this would be appreciated, including anything about dragging toolbar buttons :(( thanks a lot, Jake

    M J 2 Replies Last reply
    0
    • J Jake Palmer

      I am trying to make a toolbar with rearrangable buttons. After not being able to figure this out, I've settled for trying to allow my toolbar to be customized, which does drag/drop automatically. According to MSDN docs, the customize dialog sends the messages TBN_QUERYDELETE and TBN_QUERYINSERT, and expects booleans returned. If those are WM_NOTIFY messages, then I only know how to handle them with afx_msg void functions. Any help with this would be appreciated, including anything about dragging toolbar buttons :(( thanks a lot, Jake

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Store the return value in the handler's *pResult parameter. --Mike-- http://home.inreach.com/mdunn/ "Make sure that if you are using a blow torch that you don't set anything on fire."   -- Chris Maunder

      1 Reply Last reply
      0
      • J Jake Palmer

        I am trying to make a toolbar with rearrangable buttons. After not being able to figure this out, I've settled for trying to allow my toolbar to be customized, which does drag/drop automatically. According to MSDN docs, the customize dialog sends the messages TBN_QUERYDELETE and TBN_QUERYINSERT, and expects booleans returned. If those are WM_NOTIFY messages, then I only know how to handle them with afx_msg void functions. Any help with this would be appreciated, including anything about dragging toolbar buttons :(( thanks a lot, Jake

        J Offline
        J Offline
        Jake Palmer
        wrote on last edited by
        #3

        My main problem here is that when the Customize dialog begins to show, it disappears again. It's there for less than a second, and my functions to handle the query delete and insert never get called. In the message map: ON_NOTIFY(TBN_QUERYDELETE, IDR_TOOLBAR1, OnQueryDelete) ON_NOTIFY(TBN_QUERYINSERT, IDR_TOOLBAR1, OnQueryInsert) In the header file: afx_msg void OnQueryDelete(TBNOTIFY *tbn, LRESULT *result); afx_msg void OnQueryInsert(TBNOTIFY *tbn, LRESULT *result); Why is the dialog vanishing without ever calling these functions? :confused: thanks, Jake

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups