Re: Passing parameters from main dialog to Tab's
In the main dialog's OnInitDialog() I have:
=======================================================
CString Comport = "com1";
if(!(port.OpenPort(Comport))){
MessageBox("Cannot open Communication Port.\nPlease Check Options For
Proper Setting","Error",MB_OK+MB_ICONERROR);
return true;
}
if(!(port.ConfigurePort(19200,8,0,NOPARITY,ONESTOPBIT))){
MessageBox("Cannot Configure Communication
Port","Error",MB_OK+MB_ICONERROR);
port.ClosePort();
}
else{
if(!(port.SetCommunicationTimeouts(0,260,0,0,0))){
MessageBox("Cannot Configure Communication
Timeouts","Error",MB_OK+MB_ICONERROR);
port.ClosePort();
}
}
=======================================================
//How do I use the same port functions like:
port.WriteByte(sbyte);
//within Web1a.cpp and Web2a.cpp
On Thu, 18 Oct 2012 15:58:31 -0700 (PDT), ScottMcP [MVP] wrote:
On Thursday, October 18, 2012 6:52:02 PM UTC-4, Me wrote:
I don't understand? port is originally declared in the main dialog. Where do I place this code?
Anywhere you like (after the dialogs have been created). The place where port is set to a new value would be a good place.