Hi all
See this from the API definition:
LBN_DBLCLK
idListBox = (int) LOWORD(wParam); // identifier of list box
hwndListBox = (HWND) lParam; // handle of list box
I want to check whether a list box entry has been double clicked, but I don't understand how to implement this. I know how to check the low word for the correct value, but where do I specify the idListBox?
At the moment I am checking (under WM_COMMAND) whether the listbox id is stored in eax, then checking the low word for LBN_DBLCLK.
Am I going about it the correct way, or do I have it all wrong?
Wongdai
ps In fact I have noticed that LBN_DBLCLK is not defined in any of the include files, so how can it be checked?
See this from the API definition:
LBN_DBLCLK
idListBox = (int) LOWORD(wParam); // identifier of list box
hwndListBox = (HWND) lParam; // handle of list box
I want to check whether a list box entry has been double clicked, but I don't understand how to implement this. I know how to check the low word for the correct value, but where do I specify the idListBox?
At the moment I am checking (under WM_COMMAND) whether the listbox id is stored in eax, then checking the low word for LBN_DBLCLK.
Am I going about it the correct way, or do I have it all wrong?
Wongdai
ps In fact I have noticed that LBN_DBLCLK is not defined in any of the include files, so how can it be checked?
For that matter, i always create a separate WNDPROC for the list box and trap the WM_LBUTTONDBLCLK message
LBN_DBLCLK equ 2
In Windows.inc - well, in mine at least :-/
;untested code - should work. Good luck.
In Windows.inc - well, in mine at least :-/
.IF uMsg == WM_COMMAND
mov eax, wParam
movzx edx, ax ; edx has LOWORD == ID of ListBox
shr eax, 16 ; eax has now a notification value.
.IF edx == IDListBox && eax == LBN_DBLCLK
;someone doubleclicked
.ENDIF
.ENDIF
;untested code - should work. Good luck.
Well done Jimmy
It worked a treat!
(You were correct about it being in Windows.inc - don't know how I missed it.)
Thanks
Wongdai
It worked a treat!
(You were correct about it being in Windows.inc - don't know how I missed it.)
Thanks
Wongdai