Re: Right Click ColumnHeader in ListView to PopupMenu
This is the code that I have so far. But I just need to know how to test for the right click.
VB Code:
Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos
As Long) As Long
Declare Function TrackPopupMenu Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal x As Long, ByVal y As Long, ByVal nReserved As Long, ByVal hwnd As Long, lpReserved As Any) As Long
Type Rect
Left As Integer
Top As Integer
Right As Integer
Bottom As Integer
End Type
Private Sub SearchListView_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
Re: Right Click ColumnHeader in ListView to PopupMenu
Is there a windows API call to verify which button was pressed on a mouse? If not, am I going to have to sub-Class (not knowing much about what this is)
When I left click, I want it to alter the Ascending/Descending order of the items. But when I right click, I want it to show my popup window with the ability to select which columns you want to have displayed.
Please RATE posts, click the RATE button to the left under the Users Name.
Once your thread has been answered, Please use the Thread Tools and select RESOLVED so everyone knows your question has been answered.
Re: Right Click ColumnHeader in ListView to PopupMenu
Thanks for that, I looked at it a bit, i'll mess around with it after work tomorrow, and respond, or make the thread Resolved accordingly. Thanks for the input, tired and going to sleep.
Please RATE posts, click the RATE button to the left under the Users Name.
Once your thread has been answered, Please use the Thread Tools and select RESOLVED so everyone knows your question has been answered.