Solved

How to receive WM_COMMNOTIFY in VC++ 1.52?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sumDigits challenge 9 122
Doc'in system (example?) BA 7 86
scoreUp challenge 14 56
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 242
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 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

22 Experts available now in Live!

Get 1:1 Help Now