Click here to Skip to main content
15,917,060 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Building from the command line. Pin
David Crow24-Mar-04 3:30
David Crow24-Mar-04 3:30 
GeneralRe: Building from the command line. Pin
Prakash Nadar24-Mar-04 4:14
Prakash Nadar24-Mar-04 4:14 
GeneralRe: Building from the command line. Pin
David Crow24-Mar-04 4:20
David Crow24-Mar-04 4:20 
QuestionHow to hide or show tray icon in Windows XP Pin
Arcrest23-Mar-04 16:52
Arcrest23-Mar-04 16:52 
GeneralUpdate Bitmaps in subroutine Pin
Dimenser23-Mar-04 16:46
Dimenser23-Mar-04 16:46 
GeneralRe: Update Bitmaps in subroutine Pin
Ryan Binns23-Mar-04 17:01
Ryan Binns23-Mar-04 17:01 
GeneralRe: Update Bitmaps in subroutine Pin
Dimenser24-Mar-04 16:57
Dimenser24-Mar-04 16:57 
Generala trouble problem about CMSCOMM.OCX Pin
Grrrr23-Mar-04 16:42
Grrrr23-Mar-04 16:42 
Confused | :confused: Confused | :confused: Confused | :confused:
while i try to use atciveX control CMSCOMM.ocx with VC++6.0, i find some trouble problem.
1. must to use
'a &= 0x7F;'
because that the code received have a wrong format,but it's right after i use 'a &= 0x7F;'...
2. some code can't be received sometimes.
such as: 'thanks', only can receive 'anks'

the code as below:

void CMainFrame::OnOnCommMscomm()
{
VARIANT vat_input;
COleSafeArray oleSA_input;
LONG length, i;
BYTE data[1024] = {0};
CString msg;
char a = 0;

INT nEvent = m_Comm.GetCommEvent();
if (nEvent == 2 ) //|| nEvent == 3 || nEvent == 6)
{
oleSA_input.Clear();

memset(&vat_input, 0, sizeof(VARIANT));
vat_input = m_Comm.GetInput();
m_Comm.SetInBufferCount(0);
oleSA_input = vat_input;
length = oleSA_input.GetOneDimSize();

for (i=0; i<length; i++)
="" {
="" olesa_input.getelement(&i,="" data+i);
=""
="" a="*(char" *)(data+i);
="" &="0x7F;
" msg.format("%c",="" a);
="" m_strincomstring="" +="msg;
" }
="" }

="" m_com_edit.displayrecedatum(m_strincomstring);
="" cuartdoc*="" pdocu="(CUARTDoc*)(this-">GetActiveDocument());
if (pDocu->m_CurrentStatus == STATUS_START)
{
pDocu->DoAnalyseData((LPTSTR)(LPCTSTR)m_strINComstring);
}

m_strINComstring.Empty();
}
else if (nEvent>1000)
{
if (m_Comm.GetPortOpen())
{
m_Comm.SetPortOpen(FALSE);
}
m_Comm.SetPortOpen(TRUE);
}
}


and the setting as below:

m_Comm.SetCommPort(pComSet->ComPort);
m_Comm.SetInBufferSize(4096);
m_Comm.SetInputMode(1);
m_Comm.SetInputLen(0);
m_Comm.SetOutBufferSize(4096);
m_Comm.SetRThreshold(1);
m_Comm.SetSThreshold(0);
m_Comm.SetEOFEnable(TRUE);
m_Comm.SetDTREnable(TRUE);
m_Comm.SetHandshaking(0);
m_Comm.SetNullDiscard(FALSE);
m_Comm.SetRTSEnable(FALSE);
m_Comm.SetSettings(_T("115200, n, 8, 1"));

who can helpp me!! thanks!!!
Confused | :confused: Confused | :confused:
GeneralCapturing mouse clicks on a custom Win32 control Pin
IGx8923-Mar-04 15:35
IGx8923-Mar-04 15:35 
GeneralRe: Capturing mouse clicks on a custom Win32 control Pin
Ceri24-Mar-04 2:49
Ceri24-Mar-04 2:49 
GeneralRe: Capturing mouse clicks on a custom Win32 control Pin
IGx8924-Mar-04 3:01
IGx8924-Mar-04 3:01 
GeneralPostMessage question... Pin
rmnowick23-Mar-04 15:16
rmnowick23-Mar-04 15:16 
GeneralRe: PostMessage question... Pin
Antony M Kancidrowski24-Mar-04 0:32
Antony M Kancidrowski24-Mar-04 0:32 
GeneralRe: PostMessage question... Pin
rmnowick24-Mar-04 8:25
rmnowick24-Mar-04 8:25 
GeneralRe: PostMessage question... Pin
Roger Allen24-Mar-04 2:07
Roger Allen24-Mar-04 2:07 
Generalservice status Pin
Irish_GUI23-Mar-04 14:23
Irish_GUI23-Mar-04 14:23 
GeneralRe: service status Pin
Maksim Lepikhin23-Mar-04 15:22
Maksim Lepikhin23-Mar-04 15:22 
GeneralRe: service status Pin
Arcrest23-Mar-04 17:00
Arcrest23-Mar-04 17:00 
GeneralHandle Leak : HKLM\SYSTEM\ControlSet001\Services\DnsCache\Parameters Pin
cmk23-Mar-04 13:03
cmk23-Mar-04 13:03 
GeneralA question about reading non-data CDs Pin
Roger Wright23-Mar-04 12:20
professionalRoger Wright23-Mar-04 12:20 
GeneralRe: A question about reading non-data CDs Pin
Shog923-Mar-04 19:56
sitebuilderShog923-Mar-04 19:56 
GeneralRe: A question about reading non-data CDs Pin
Roger Wright23-Mar-04 20:52
professionalRoger Wright23-Mar-04 20:52 
GeneralRe: A question about reading non-data CDs Pin
Ceri24-Mar-04 2:54
Ceri24-Mar-04 2:54 
GeneralRe: A question about reading non-data CDs Pin
Roger Wright24-Mar-04 4:39
professionalRoger Wright24-Mar-04 4:39 
GeneralGetting a window to come forward on XP Pin
Tom Wright23-Mar-04 12:01
Tom Wright23-Mar-04 12:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.