Solved

MFC messages: How do I get lparam and wparam?

Posted on 1998-01-13
1
1,391 Views
Last Modified: 2013-11-20
All I want to do is have a function respond to some message with the wparam and lparam parameters.  But the best I can find is placing the ON_MESSAGE macro in the message map.  This doesn't give me lparam and wparam.  Any ideas?
0
Comment
Question by:LukeSkywalker
1 Comment
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
Comment Utility
ON_MESSAGE does give you WPARAM and LPARAM. You pass in a name of a function into the macro. The declaration of the function is

  LRESULT MyFunc(WPARAM wp, LPARAM lp);

So when MyFunc gets called, it passes you both the wp and lp.

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

13 Experts available now in Live!

Get 1:1 Help Now