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. ATL / WTL / STL
  4. Menu using ATL

Menu using ATL

Scheduled Pinned Locked Moved ATL / WTL / STL
c++help
2 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.
  • N Offline
    N Offline
    nas_mit
    wrote on last edited by
    #1

    I have created a toolbar for IE and added a an edit control to it, but I couldn't add a menu control beside to the edit control. Can anybody help me, please. Thanks a lot.

    love U much...

    A 1 Reply Last reply
    0
    • N nas_mit

      I have created a toolbar for IE and added a an edit control to it, but I couldn't add a menu control beside to the edit control. Can anybody help me, please. Thanks a lot.

      love U much...

      A Offline
      A Offline
      ajitatif angajetor
      wrote on last edited by
      #2

      first, create a menu in your resource file. second, put a button to the toolbar that will open the menu up with a style BTNS_WHOLEDROPDOWN third, get a command handler handle the button's command ( WM_COMMAND message ) and lastly, write a method that creates the menu and tracks it. something like:

      HMENU hM = ::LoadMenu(ATL::_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(ID_MENU);
      HMENU hMPopUp = ::GetSubMenu(hM,0);
      // calculate the point where the menu will show
      ::TrackPopupMenu(hMPopUp,TPM_TOPALIGN,pointX,pointY,0,m_hWnd,NULL);
      

      that's the way i did it, i think you can handle the rest with the holy MSDN

      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