Click here to Skip to main content
15,850,103 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Building a WCHAR Array, Not sure if it right Pin
David Crow14-Nov-11 3:39
David Crow14-Nov-11 3:39 
QuestionVC 6.0 MFC MDI new frame / view without caption erases Windows → New titles Pin
Vaclav_11-Nov-11 4:09
Vaclav_11-Nov-11 4:09 
AnswerRe: VC 6.0 MFC MDI new frame / view without caption erases Windows → New titles Pin
Richard MacCutchan11-Nov-11 6:27
mveRichard MacCutchan11-Nov-11 6:27 
GeneralRe: VC 6.0 MFC MDI new frame / view without caption erases Windows → New titles Pin
Vaclav_11-Nov-11 7:09
Vaclav_11-Nov-11 7:09 
GeneralRe: VC 6.0 MFC MDI new frame / view without caption erases Windows → New titles Pin
Richard MacCutchan11-Nov-11 7:38
mveRichard MacCutchan11-Nov-11 7:38 
QuestionBeginner with C++ - Need helps with overload member function error Pin
LongDuyTran10-Nov-11 20:21
LongDuyTran10-Nov-11 20:21 
AnswerRe: Beginner with C++ - Need helps with overload member function error Pin
Chuck O'Toole10-Nov-11 21:30
Chuck O'Toole10-Nov-11 21:30 
GeneralRe: Beginner with C++ - Need helps with overload member function error Pin
LongDuyTran11-Nov-11 3:19
LongDuyTran11-Nov-11 3:19 
That was my bad in typing. I also have that part.
I also wanna ask you guys more questions.
"void CXbeefixedDlg::InitComboBox()
{
// ComboBox ComPort
m_cboComport.ResetContent();
m_cboComport.AddString("COM1");
m_cboComport.AddString("COM2");
m_cboComport.AddString("COM3");
m_cboComport.AddString("COM4");
m_cboComport.SetCurSel(2);
// ComboBox BitRate
m_cboBitrate.ResetContent();
m_cboBitrate.InsertString(0,"1200");
m_cboBitrate.InsertString(1,"2400");
m_cboBitrate.InsertString(2,"4800");
m_cboBitrate.InsertString(3,"9600");
m_cboBitrate.InsertString(4,"19200");
m_cboBitrate.InsertString(5,"38400");
m_cboBitrate.InsertString(6,"57600");
m_cboBitrate.InsertString(7,"115200");
m_cboBitrate.InsertString(8,"230400");
m_cboBitrate.SetCursel(3);
// Combobox Databit
m_cboDatabits.ResetContent();
m_cboDatabits.AddString("4");
m_cboDatabits.AddString("5");
m_cboDatabits.AddString("6");
m_cboDatabits.AddString("7");
m_cboDatabits.AddString("8");
m_cboDatabits.SetCurSel(0);
//Combox Stopbit
m_cboStopbits.ResetContent();
m_cboStopbits.AddString("1");
m_cboStopbits.AddString("1.5");
m_cboStopbits.AddString("2");
m_cboStopbits.SetCurSel(0);
//Combox Paritybit
m_cboParitybit.ResetContent();
m_cboParitybit.InsertSring(0,"None");
m_cboParitybit.InsertString(1,"Odd");
m_cboParitybit.InsertString(2,"Even");
m_cboParitybit.InsertString(3,"Mark");
m_cboParitybit.InsertString(4,"Space");
m_cboParitybit.SetCursel(0);

}

void CXbeefixedDlg::Settings()
{
// Check whether port was openned, Close port to setup parameter
if (m_mscomm.SetPortOpen())
m_mscomm.SetPortOpen(false);
// Initialize Port name
m_mscomm.SetCommPort(m_cboComport.GetCursel()+1);
// Initialize parameters, databits, stopbits, parity bits, flowcontrol
CString strBitrate = getCurStrInCombobox(m_cboBitrate);
CString strParitybit = getCurStrInCombobox(m_cboParitybit);
CString strStopbits = getCurStrInCombobox(m_cboStopbits);
CString strDatabits = getCurStrInCombobox(m_cboDatabits);
//Cstring strflowcontrol = getCurStrInCombobox(m_FlowControl);

CString strSetting;
strSetting.Format("%s,%c.%s,%s",strBitrate,strParitybit[1],strStopbits,strDatabits);
m_mscomm.SetSettings(strSetting);

// Other initializations
m_mscomm.SetRThreshold(1);
m_mscomm.SetInputlen(2); // Read 2 characters per once time
m_mscomm.SetInputBufferSize(1024);
m_mscomm.SetInputMode(0); // 0 - Text mode, 1 - Binary Mode
m_mscomm.SetPortOpen(true); // Open COM port

}

CString CXbeefixedDlg::getCurStrInCombobox(const CComBoBox &a)
{ CString str;
a.GetLBText(a.GetCurSel(),str);
return str;
}
"
The above is my code but I dont know the reason why my VC++ informed that GetCurSel is not a member of ComboBox class. And in the getCurStrInCombobox, it informed that missing "," before "&". Could you help me to solve this problem ?
The deadline for my project is coming so now I'm really rushed.
Thank you very much.
AnswerRe: Beginner with C++ - Need helps with overload member function error Pin
Chuck O'Toole11-Nov-11 5:41
Chuck O'Toole11-Nov-11 5:41 
GeneralRe: Beginner with C++ - Need helps with overload member function error Pin
krmed11-Nov-11 8:05
krmed11-Nov-11 8:05 
AnswerRe: Beginner with C++ - Need helps with overload member function error Pin
Stefan_Lang11-Nov-11 3:17
Stefan_Lang11-Nov-11 3:17 
QuestionWindows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
sdancer7510-Nov-11 8:55
sdancer7510-Nov-11 8:55 
AnswerRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
Richard Andrew x6410-Nov-11 9:35
professionalRichard Andrew x6410-Nov-11 9:35 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
sdancer7510-Nov-11 10:26
sdancer7510-Nov-11 10:26 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
Richard Andrew x6410-Nov-11 10:29
professionalRichard Andrew x6410-Nov-11 10:29 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
sdancer7510-Nov-11 22:51
sdancer7510-Nov-11 22:51 
AnswerRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
Chris Losinger10-Nov-11 9:36
professionalChris Losinger10-Nov-11 9:36 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
sdancer7510-Nov-11 10:29
sdancer7510-Nov-11 10:29 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
Chris Losinger10-Nov-11 11:03
professionalChris Losinger10-Nov-11 11:03 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
sdancer7510-Nov-11 22:52
sdancer7510-Nov-11 22:52 
AnswerRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
Chuck O'Toole10-Nov-11 17:35
Chuck O'Toole10-Nov-11 17:35 
AnswerRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
jschell10-Nov-11 9:38
jschell10-Nov-11 9:38 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
sdancer7510-Nov-11 10:32
sdancer7510-Nov-11 10:32 
GeneralRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
Richard MacCutchan10-Nov-11 12:33
mveRichard MacCutchan10-Nov-11 12:33 
AnswerRe: Windows has triggered a breakpoint in xxxxx, This may be due a corruption of the heap Pin
Chuck O'Toole10-Nov-11 10:42
Chuck O'Toole10-Nov-11 10:42 

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.