Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use of "EndThread" to end a sub-function in .exe ?
#2
use thread handle instead 
Macro EndThreadSub
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 132 84 "Dialog" "4"
;3 Static 0x54000000 0x0 40 10 56 12 "Text"
;4 Button 0x54032000 0x0 16 24 103 37 "Click here to stop count (works in QM but not in .exe, different thread name ?)"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C00 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,int- hThread=mac("sub.counting" "" hDlg)
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 4 ;;Click here to stop count
,EndThread("" hThread)
ret 1

#sub counting
function hdlg
rep
,_i+1
,_s=F"{_i}";_s.setwintext(id(3 hdlg))
,1


Messages In This Thread
RE: Use of "EndThread" to end a sub-function in .exe ? - by Kevin - 05-18-2021, 11:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)