Menu using ATL
ATL / WTL / STL
2
Posts
2
Posters
0
Views
1
Watching
-
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...
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