.else

mov eax, wParam
shr eax, 16



.if eax == STN_CLICKED
.if wParam == CMD_PLAY



.elseif wParam == CMD_PAUSE
invoke MessageBox, hWin, addr szAppName, 0, 0

.elseif wParam == CMD_STOP
invoke MessageBox, hWin, addr szAppName, 0, 0

.elseif wParam == CMD_REPEAT
invoke MessageBox, hWin, addr szAppName, 0, 0

.elseif wParam == CMD_SHUFFLE
invoke MessageBox, hWin, addr szAppName, 0, 0

.elseif wParam == MENU_MAIL
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_ZIP
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_DOCS
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_IRC
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_PDA
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_SCHOOL
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_HACKZONE
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_SYS
invoke MessageBox, hWin, addr szAppName, 0, 0
.elseif wParam == MENU_SETUP
invoke MessageBox, hWin, addr szAppName, 0, 0


.elseif wParam == MENU_EXIT
invoke SendMessage, hWin, WM_DESTROY, 0, 0


.elseif wParam == CMD_MENU
call CreatePopupMenu
mov hMenu, eax

invoke AppendMenu, hMenu, MF_STRING, MNU_PLAYFILES, addr szMenuPlayFiles
invoke AppendMenu, hMenu, MF_STRING, MNU_PLAYDIR, addr szMenuPlayDir
invoke AppendMenu, hMenu, MF_SEPARATOR, 0, 0
invoke AppendMenu, hMenu, MF_STRING, MNU_EXIT, addr szMenuExit

invoke TrackPopupMenu, hMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hWin, 0

.endif
.elseif eax == LBN_DBLCLK
.if wParam == LV_MAIN
invoke MessageBox, hWin, addr szAppName, 0, 0
.endif
.endif
.endif


THE DOUBLE CLICK DOESN"T WORK
what wron with the piece of code ? i can't seem to get it right :(
pls help:confused:
Posted on 2002-09-12 05:09:50 by Bolle
This is just a guess, but did you use the LB_NOTIFY window style when you created the ListView (or if it's a dialog resource, in the rsrc file)?

Remarks

Only a list box that has the LBS_NOTIFY style will send this notification message.
Posted on 2002-09-12 18:46:51 by Will
icezelion's has usefull tut, read them! it helpfull if ur coding in asm/vc

.elseif uMsg==WM_NOTIFY
push edi
mov edi,lParam
assume edi:ptr NMHDR
mov eax,.hwndFrom
.if eax==hList // handle of ur listview
.if .code==NM_DBLCLK // type of message sent to listview
assume edi:ptr NM_LISTVIEW
;........invoke SendMessage....to get whatever u want.

note, if u want text from a listview u need to tell which item/subitem to read from and use the LVM_GETITEM message

i.e:


invoke SendMessage,hList,LVM_GETNEXTITEM,-1, LVNI_FOCUSED
mov lvi.iItem,eax
mov lvi.iSubItem,0
mov lvi.imask,LVIF_TEXT
lea eax,buffer
mov lvi.pszText,eax
mov lvi.cchTextMax,256
invoke SendMessage,hList,LVM_GETITEM,0,addr lvi
invoke MessageBox,0, addr buffer,addr AppName,MB_OK

btw,
will posted about the LB_NOTIFY, this aint true since ListView doesn't have this
style in its properties, and there fore u need to use the WM_NOTIFY to send messages to the listview.
LisBox is NOT lIstView :)
Posted on 2002-09-13 01:02:12 by wizzra
Sorry Bolle. I skimmed through your post pretty quickly, saw the "LBN_DBLCLK" and remembered something that hung me up in the past on that so I looked it up in the api help file. Wizzra is absolutely correct in his advice.
Posted on 2002-09-13 07:38:28 by Will