By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,781 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,781 IT Pros & Developers. It's quick & easy.

call a control's invoke from other window form

P: 91
Hi,

I have a problem to call a richText control's invoke from other window form while program background work. however if I implement the background work under the same window form as the control, it's no problem.

The debug error message shows, it need to get the window's handle before call it's invoke. Is there anyone has the experience of this problem and any sample codes for multi-thread implement.'
'
many thanks
qf
Nov 21 '06 #1
Share this Question
Share on Google+
3 Replies


100+
P: 267
Hi,

I have a problem to call a richText control's invoke from other window form while program background work. however if I implement the background work under the same window form as the control, it's no problem.

The debug error message shows, it need to get the window's handle before call it's invoke. Is there anyone has the experience of this problem and any sample codes for multi-thread implement.'
'
many thanks
qf
hi

usually controls are part of a project, while objects are part of a form.
to address objects in another form, use the full path name. that includes the formname as well.
Nov 21 '06 #2

P: 91
Hi
Thanks for the quick reply. Yes, I did include the formname, otherwise it will fail compile. The code actually look like this: formABC.richText.invoke(...), any other idea?

Thanks.
qf
Nov 21 '06 #3

P: 91
By the way, do you know how to get a window handle, any sample codes?

Thanks.
qf
Nov 21 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.