Solved

How to receive WM_COMMNOTIFY in VC++ 1.52?

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
format the code in java 6 93
java ^ examples 8 65
How to convert MFC::CString to UTF8 wchar_t* 10 201
Change to event 1 111
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. …
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…
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 Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

806 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