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 ------
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 ------