Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to receive WM_COMMNOTIFY in VC++ 1.52?

Posted on 1997-05-02
1
Medium Priority
?
428 Views
Last Modified: 2013-11-20
I'm using VC++ 1.52 to write a program that will read data from the serial port. How can I add WM_COMMNOTIFY to my message map when it doesn't show in ClassWizard?
0
Comment
Question by:pdoughty
[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
 

Accepted Solution

by:
pjn earned 100 total points
ID: 1301287
Just add the following to your header file:

afx_msg LRESULT OnCommNotify(WPARAM wParam, LPARAM lParam);

In your cpp file:

ON_MESSAGE(WM_COMM_NOTIFY, OnCommNotify)

And:

LRESULT CYourClass::OnCommNotify(WPARAM wParam, LPARAM lParam)
{
  //whatever

return 0L;

}

The class to put it in should be whichever class you call EnableCommNotification for.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
In this post we will learn different types of Android Layout and some basics of an Android App.
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 Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

722 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