Posted on 2000-02-24
Last Modified: 2013-11-20
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?

Antonio Nogueira
Question by:nogueira
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

VinExpert earned 100 total points
ID: 2554183

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.

Author Comment

ID: 2555256

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question