?
Solved

MFC messages: How do I get lparam and wparam?

Posted on 1998-01-13
1
Medium Priority
?
1,436 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
[X]
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
1 Comment
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1314045
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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 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