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. Problem with OnToolbarDropDown

Problem with OnToolbarDropDown

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelplearning
1 Posts 1 Posters 1 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.
  • T Offline
    T Offline
    tabor25
    wrote on last edited by
    #1

    Hello, i need to realize a dropdown-button within a toolbar by using mfc70. I added the extended style TBSTYLE_EX_DRAWDARROWS to the toolbar and also i modified the style of the corresponding button (TBSTYLE_DROPDOWN). Clicking on the arrow will call the message-handler i defined in the following way : afx_msg void OnToolbarDropDown(NMHDR* pnmh, LRESULT* plRes); The message-map-entry is the following : ON_NOTIFY(TBN_DROPDOWN, AFX_IDW_TOOLBAR, OnToolbarDropDown) In the msdn-description the NMHDR-structure is defined as typedef struct tagNMHDR { HWND hwndFrom; UINT idFrom; UINT code; } NMHDR; I thought that i could read the idFrom-value to determine the resource-ID of the button where the arrow was clicked. But for different dropdown-buttons the value is always the same and it matches to no button-ID available! So how can i determine the id of the corresponding dropdown-button by using the NMHDR-structure instead of the NMTOOLBAR-structure (used in vc60)? Best regards tabor25

    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