Question : ON_THREAD_MESSAGE

Hi,
I implemented a CWInThread derived class and I wanted to receive some asynchronous messages from other threads.

I used the MFC Macro ON_THREAD_MESSAGE on my code. Whats the meaning of the two arguments of the handler member function passed to by the framework (UINT, LONG)?

afx_msg void memberFxn(UINT, LONG)

Additionaly how can I retrieve the MSG inside this function?

Thanks,
Antonio Nogueira

Answer : ON_THREAD_MESSAGE

Hi,

They R WPARAM and LAPARAM values I beleive. So Ur function will be as

afx_msg void memberFxn(WPARAM wp, LPARAM lp) ;

They r used for any additional message information. For example U can post the thread message with the
message = whatever message u want to send
next parameter = WPARAM = some addition value which means something to U.

similarly the third parameter.

Hope this gives some ideas.
VinExpert
Random Solutions  
 
programming4us programming4us