[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1466
  • Last Modified:

MFC messages: How do I get lparam and wparam?

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
LukeSkywalker
Asked:
LukeSkywalker
1 Solution
 
Tommy HuiEngineerCommented:
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now