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
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
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