Solved

MFC messages: How do I get lparam and wparam?

Posted on 1998-01-13
1
1,413 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 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
haveThree challenge 22 123
twoTwo  challenge 35 112
building a service to accessed via telnet client, want colors ? 4 95
Work with App store 7 90
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 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