Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trigger action in a dialog setting event in a thread
#1
I wonder weather it is possible to trigger action on a running dialog using an event initiated in another thread. Is it likely that WM_NOTIFY feels, somehow, when an event is set by a thread?

Any advice is mostly welcome.
#2
Send or post a message in range WM_APP...0xBFFF.

another thread:
SendMessage(dialogHandle WM_APP+1 0 0)

dialog procedure:
,case WM_APP+1
,out "action"
#3
Many thanks indeed !
#4
Dear Gintaras,

I used the following code to pass parameters from the thread to the dialog :

Macro temp01
Code:
Copy      Help
type RCt ~tzuni #tam
RCt x
x.tzuni="Some string value"
x.tam=123

int dialogHandle=win("TamTiriri" "#32770")
SendMessage(dialogHandle WM_APP+1 0 &x)

to the dialog :

Function DialogExtCall
Code:
Copy      Help
,case WM_APP+1
,out "action"
,RCt* x=+lParam
,RCDlg=x.tzuni
,_i=x.tam
,out F"{RCDlg} {_i}"

It works. However, I would appreciate it, if you could confirm its correctness.
#5
Confirmed.


Forum Jump:


Users browsing this thread: 1 Guest(s)