Hi all

See this from the API definition:


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?


ps In fact I have noticed that LBN_DBLCLK is not defined in any of the include files, so how can it be checked?
Posted on 2006-01-19 20:17:33 by WongDai
For that matter, i always create a separate WNDPROC for the list box and trap the WM_LBUTTONDBLCLK message
Posted on 2006-01-19 22:10:58 by XCHG
LBN_DBLCLK      equ 2

In Windows.inc - well, in mine at least :-/

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

;untested code - should work. Good luck.
Posted on 2006-01-19 22:16:09 by JimmyClif
Well done Jimmy

It worked a treat!

(You were correct about it being in Windows.inc - don't know how I missed it.)


Posted on 2006-01-19 22:53:12 by WongDai