Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to receive WM_COMMNOTIFY in VC++ 1.52?

Posted on 1997-05-02
1
Medium Priority
?
431 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

916 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