Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ending all threads started by dialog on dialog close/end
#1
In a running QM dialog called "testdialog" I have a button that starts the functions: "StartTestFunction_1" and "StartTestFunction_2"
If I close the dialog "testdialog" I want to close ALL the separate threads started by it. (meaning close/end: "StartTestFunction_1" and "StartTestFunction_2")

I have 2 questions

1) How I do it. Is this correct?  (It works but I need to know if this is correct approach)
Code:
Copy      Help
    case WM_CLOSE
        shutdown -6 0 "StartTestFunction_1"
        shutdown -6 0 "StartTestFunction_2"
    case WM_DESTROY
        shutdown -6 0 "StartTestFunction_1"
        shutdown -6 0 "StartTestFunction_2"

2) Is there a more effective (shorter) way to end ALL threads started through a QM dialog? (must also work in .exe)


Messages In This Thread
Ending all threads started by dialog on dialog close/end - by r0n - 11-03-2021, 10:02 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)