Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute the selected item in turn
#2
I changed the smart dialog box to a simple dialog box, which can achieve the effect I want, but it is very troublesome, is there a simpler method? I want to use smart dialogs, any suggestions for perfecting this feature code are welcome. Smile


Macro Macro2
Code:
Copy      Help
;start
str L=
;;sub.m1
;;sub.m2
;;sub.m3
;;sub.m4
;;sub.m5

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;5 ListBox 0x54230109 0x200 64 16 96 86 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""

str controls = "5"
str lb5
lb5=L
if(!ShowDialog(dd 0 &controls)) ret

out
out lb5

if lb5=10000
,sub.m1

if lb5=11000
,sub.m1
,sub.m2
,
if lb5=11100
,sub.m1
,sub.m2
,sub.m3
,
goto start

;#sub DlgProc
;function# hDlg message wParam lParam
;
;sel message
,;case WM_INITDIALOG
,;case WM_DESTROY
,;case WM_COMMAND goto messages2
;ret
;;messages2
;sel wParam
,;case IDOK
,;min hDlg
,;ret 0
,;case IDCANCEL
;ret 1

#sub m1

MES m.timeout=5; m.style="OCa"; m.default='C'
mes("this is m1" "" m)


#sub m2

MES m.timeout=5; m.style="OCa"; m.default='C'
mes("this is m2" "" m)


#sub m3

MES m.timeout=5; m.style="OCa"; m.default='C'
mes("this is m3" "" m)


#sub m4

MES m.timeout=5; m.style="OCa"; m.default='C'
mes("this is m4" "" m)


#sub m5

MES m.timeout=5; m.style="OCa"; m.default='C'
mes("this is m5" "" m)

The above method is not reliable. If I re-add the list item, the operation of executing the code should be re-modified.  Sad


Messages In This Thread
Execute the selected item in turn - by win - 04-15-2019, 10:46 PM
RE: Execute the selected item in turn - by win - 04-17-2019, 01:19 AM
RE: Execute the selected item in turn - by win - 04-17-2019, 12:13 PM
RE: Execute the selected item in turn - by Kevin - 04-18-2019, 11:53 PM
RE: Execute the selected item in turn - by win - 04-19-2019, 12:08 AM
RE: Execute the selected item in turn - by Kevin - 04-19-2019, 12:36 AM
RE: Execute the selected item in turn - by win - 04-19-2019, 01:15 AM
RE: Execute the selected item in turn - by Kevin - 04-19-2019, 02:24 AM
RE: Execute the selected item in turn - by win - 04-19-2019, 02:39 AM
RE: Execute the selected item in turn - by Kevin - 04-19-2019, 02:40 AM
RE: Execute the selected item in turn - by win - 04-19-2019, 02:43 AM
RE: Execute the selected item in turn - by win - 04-19-2019, 11:04 PM
RE: Execute the selected item in turn - by Kevin - 04-20-2019, 12:32 AM
RE: Execute the selected item in turn - by win - 04-20-2019, 01:00 AM
RE: Execute the selected item in turn - by Kevin - 04-20-2019, 02:02 AM
RE: Execute the selected item in turn - by win - 04-20-2019, 02:44 AM
RE: Execute the selected item in turn - by win - 04-23-2019, 01:47 AM
RE: Execute the selected item in turn - by win - 04-27-2019, 04:15 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)