Solved

ON_THREAD_MESSAGE

Posted on 2000-02-24
2
1,344 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:nogueira
2 Comments
 
LVL 8

Accepted Solution

by:
VinExpert earned 100 total points
ID: 2554183
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
0
 

Author Comment

by:nogueira
ID: 2555256
thanks,
Vin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
GIF file bit manipulation for color change 5 107
bigDiff challenge 17 84
post4 challenge 28 93
withoutTen challenge 14 100
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now