Solved

How to receive WM_COMMNOTIFY in VC++ 1.52?

Posted on 1997-05-02
1
411 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
1 Comment
 

Accepted Solution

by:
pjn earned 50 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 95
move a line in eclipse 3 60
Modbus - whats the maximum I can store in one register? 4 75
unix example issues 18 49
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
This video discusses moving either the default database or any database to a new volume.

746 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