Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

menu item selected from createpopupmenu

Status
Not open for further replies.

Horrid

Programmer
May 20, 1999
373
I have used the Createpopupmenu command to create a new pop up window in a IE toolband project but I don't know how to check when an item is selected.
I didn't use the normal menu editor because it causes my toolband to turn into a window within the toolbar area.

here is the code to create and show the popup.

dim HMNEU as long

-----form load block ---
HMENU = CreatePopupMenu()
AppendMenu HMENU, MF_STRING, ByVal 0&, "Disply results"
AppendMenu HMENU, MF_STRING, ByVal 0&, "Login"
AppendMenu HMENU, MF_STRING, ByVal 0&, "Preferences"
------end form load block ----

------show popup block ----
Dim rec As RECT
GetWindowRect frmBand.hwnd, rec

TrackPopupMenu HMENU, TPM_LEFTALIGN, rec.Left + imgLogo.Left, rec.Top + imgLogo.Top + imgLogo.Height, 0, Me.hwnd, ByVal 0&
----end popup block ------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top