Click here to Skip to main content
14,700,256 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: serial port access and communication using c Pin
Orjan Westin9-Oct-14 1:58
professionalOrjan Westin9-Oct-14 1:58 
GeneralRe: serial port access and communication using c Pin
xenotron9-Oct-14 2:08
Memberxenotron9-Oct-14 2:08 
GeneralRe: serial port access and communication using c Pin
Orjan Westin9-Oct-14 5:50
professionalOrjan Westin9-Oct-14 5:50 
GeneralRe: serial port access and communication using c Pin
Orjan Westin9-Oct-14 1:55
professionalOrjan Westin9-Oct-14 1:55 
QuestionEnable a control/window in an MFC dialog, Resolved Pin
bkelly138-Oct-14 15:02
Memberbkelly138-Oct-14 15:02 
AnswerRe: Enable a control/window in an MFC dialog, Resolved Pin
Richard MacCutchan8-Oct-14 22:41
mveRichard MacCutchan8-Oct-14 22:41 
GeneralRe: Enable a control/window in an MFC dialog, Resolved Pin
bkelly139-Oct-14 1:34
Memberbkelly139-Oct-14 1:34 
Questioncontrol ID not found, Resolved Pin
bkelly135-Oct-14 15:25
Memberbkelly135-Oct-14 15:25 
Windows 7, Visual Studio 2008, MFC, C++, dialog
Making this short, after failing elsewhere I created a test project. The dialog has one edit box with the default ID of IDC_EDIT1. A button was created and the following code added for that button.
void Cvs_2008_get_port_numberDlg::OnBnClickedButton1()
{
    UINT port_number;
    BOOL status = FALSE;
    int  last_error = 0;

    port_number = m_box_get_port_number.GetDlgItemInt( IDC_EDIT1, &status );
    last_error = GetLastError(); 
}


Run the code, type in 123 in the edit box, press the button, and port_number gets zero. last_error gets value 1421, Control ID not found.

Some searching indicated that there may be a windows problem: http://www.errorfixes.net/error-1421-windows-7.php[^]
But I find myself skeptical of that.

Do I have a simple error that I can correct? Or is this a deeper problem?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com


AnswerRe: control ID not found Pin
Richard MacCutchan6-Oct-14 0:46
mveRichard MacCutchan6-Oct-14 0:46 
GeneralRe: control ID not found Pin
bkelly136-Oct-14 15:52
Memberbkelly136-Oct-14 15:52 
GeneralRe: control ID not found Pin
Richard MacCutchan6-Oct-14 22:33
mveRichard MacCutchan6-Oct-14 22:33 
GeneralResolved Pin
bkelly137-Oct-14 15:31
Memberbkelly137-Oct-14 15:31 
GeneralRe: Resolved Pin
Richard MacCutchan7-Oct-14 23:24
mveRichard MacCutchan7-Oct-14 23:24 
QuestionStruct with Vector<BYTE> size different in VS2013 Pin
Jacobkingsly1-Oct-14 19:15
MemberJacobkingsly1-Oct-14 19:15 
QuestionRe: Struct with Vector<BYTE> size different in VS2013 Pin
Richard MacCutchan1-Oct-14 22:31
mveRichard MacCutchan1-Oct-14 22:31 
AnswerRe: Struct with Vector<BYTE> size different in VS2013 Pin
Jacobkingsly2-Oct-14 0:05
MemberJacobkingsly2-Oct-14 0:05 
GeneralRe: Struct with Vector<BYTE> size different in VS2013 Pin
Richard MacCutchan2-Oct-14 0:13
mveRichard MacCutchan2-Oct-14 0:13 
GeneralRe: Struct with Vector<BYTE> size different in VS2013 Pin
Jacobkingsly2-Oct-14 0:26
MemberJacobkingsly2-Oct-14 0:26 
GeneralRe: Struct with Vector<BYTE> size different in VS2013 Pin
Richard MacCutchan2-Oct-14 0:29
mveRichard MacCutchan2-Oct-14 0:29 
GeneralRe: Struct with Vector<BYTE> size different in VS2013 Pin
Jacobkingsly2-Oct-14 0:31
MemberJacobkingsly2-Oct-14 0:31 
GeneralRe: Struct with Vector<BYTE> size different in VS2013 Pin
Richard MacCutchan2-Oct-14 0:35
mveRichard MacCutchan2-Oct-14 0:35 
AnswerRe: Struct with Vector<BYTE> size different in VS2013 Pin
Vi21-Oct-14 22:56
MemberVi21-Oct-14 22:56 
GeneralRe: Struct with Vector<BYTE> size different in VS2013 Pin
Jacobkingsly2-Oct-14 0:11
MemberJacobkingsly2-Oct-14 0:11 
AnswerRe: Struct with Vector<BYTE> size different in VS2013 Pin
Shao Voon Wong1-Oct-14 22:56
mvaShao Voon Wong1-Oct-14 22:56 
GeneralRe: Struct with Vector<BYTE> size different in VS2013 Pin
Jacobkingsly2-Oct-14 0:11
MemberJacobkingsly2-Oct-14 0:11 

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.