Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting DblClick Select out of a multiselect listbox
#2
does this help

Function Dialog4
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str lb3
out
lb3= "hey[]you[]there"
if(!ShowDialog("Dialog4" &Dialog4 &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ListBox 0x54230109 0x200 2 34 96 48 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030202 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case LBN_DBLCLK<<16|3
,int dblclickd=LB_SelectedItem(lParam)
,if(SendMessage(lParam LB_GETSEL _i 0) = 0)
,,LB_SelectItem lParam dblclickd 1
,str txt
,for _i 0 LB_GetCount(lParam)
,,if(SendMessage(lParam LB_GETSEL _i 0) = 1)
,,,LB_GetItemText lParam _i &txt
,,,out "%s is selected" txt

,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)