Thanks Roger Stoltz for help I found a function that called all the time. I put the ReadFile() there. The function is DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam). Right click on the dialog>Classwizard from Messages Maps tab choose DefWindowProc under Messages. Add function then edit code :cool: .
A
awwase
@awwase
Posts
-
The best place for ReadFile() -
The best place for ReadFile()Hi all, I'm writing a program using VC++ 6.0. The program is send and receives messages - string - via serial port. I used Overlapped mode for the communication. The program does not know when the data will come. i.e. if there is a data coming from the serial port at any time, read it. I used MFC in this project, so where is the best place for ReadFile() so that it checks if there is any data coming from serial port?? Thanks in advance What I learned is still a dot in the programming world