A question!
Hello,
I recently got back to the PC side of my project and tried to access a
method of the serial class, but no intellisence comes up after the period of
my MySerial.xxx object ???
Why is this happening!
See the following line in code below:
MySerial.Read(abBuffer,sizeof(abBuffer),&dwBytesRead);
Please consider the following code!
=========================================WndProc_CW1.h
#include "Serial.h" //Header for Serial class
#include "SerialEx.h" //Header for Serial class
#include "SerialWnd.h" //Header for Serial class
===================================================
================================================
#include <windows.h>
//HEADERS PERTAINING TO THIS .CPP FILE
#include "WndProc_CW1.h" //Default header file
CSerialWnd MySerial;
LRESULT CALLBACK WndProc_CW1 (HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
//RS232 VARIABLES
static DWORD dwBytesRead = 0; //Amount of bytes read from Read
static BYTE abBuffer[8]; //Primary rs232 buffer
static TCHAR szBuffer[17]; //Secondary rs232 buffer
static int LoopCount = 0; //rs232 Read counter
//RS232 SERIAL PORT MONITOR
if (message == CSerialWnd::mg_nDefaultComMsg)
{
// A serial message occurred
const CSerialWnd::EEvent eEvent = CSerialWnd::EEvent(LOWORD(wParam));
const CSerialWnd::EError eError = CSerialWnd::EError(HIWORD(wParam));
switch (eEvent)
{
case CSerialWnd::EEventRecv:
do
{
//*********If I do: MySerial. No intellisence comes
up?????
MySerial.Read(abBuffer,sizeof(abBuffer),&dwBytesRead);
if (LoopCount == 0){
MultiByteToWideChar(CP_ACP,0,
(LPCSTR)abBuffer,8,szBuffer,17);
LoopCount ++;}
else
{/*Do nothing*/}
}while(dwBytesRead == sizeof(abBuffer));
break;
default:
break;
}
return 0;
}
else
LoopCount = 0;
.... other code ....
=================================================
Any suggestions, all appreciated!
--
Best regards
Robert