|
-
October 13th, 1999, 11:33 AM
#1
Sending message to CDocument derived class member
Hi,
I have a command handler on CDocument derived class. This function creates a thread and terminates. When the thread function reaches a certain point, I would like to post a message so that one of other CDocument member function will be invoked.
The problem is, CDocument doesn't own a window and therefore I can't call PostMessage. (CDocument doesn't have a member function PostMessage)
How can I accomplish this?
Thanks
Jim
-
October 13th, 1999, 11:44 AM
#2
Re: Sending message to CDocument derived class member
hello friend,
theres an easy way, just pass the pointer of the document, as a parameter to the thread function and call its member function when needed.
Hope it helps,
Tufail Khan
-
October 13th, 1999, 12:56 PM
#3
Re: Sending message to CDocument derived class member
Thanks for the reply. But I need to post a message instead because if I call the function, the thread will be suspended until the function returns. If I post the message, the function will be invoked asynchronously.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|