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

ATL / WTL / STL

 
GeneralRe: better version of strcpy() and printf() Pin
bkelly1315-Sep-12 17:23
Memberbkelly1315-Sep-12 17:23 
GeneralRe: better version of strcpy() and printf() Pin
xenotron16-Sep-12 7:54
Memberxenotron16-Sep-12 7:54 
GeneralRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 1:10
mveRichard MacCutchan16-Sep-12 1:10 
AnswerRe: better version of strcpy() and printf() Pin
Richard Andrew x6415-Sep-12 18:01
professionalRichard Andrew x6415-Sep-12 18:01 
AnswerRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 1:09
mveRichard MacCutchan16-Sep-12 1:09 
AnswerRe: better version of strcpy() and printf() Pin
xenotron16-Sep-12 2:37
Memberxenotron16-Sep-12 2:37 
AnswerRe: better version of strcpy() and printf() Pin
Stephen Hewitt18-Sep-12 1:29
MemberStephen Hewitt18-Sep-12 1:29 
Questionget a number into static text control Pin
bkelly1313-Sep-12 18:05
Memberbkelly1313-Sep-12 18:05 
Environment: Windows 7, Visual Studio 2008, MFC, CPP

Goal: start with an int, and put the character string equivilant into a text format such that a static control variable from a dialog will accept it. mp_C_Client is a pointer to a class that contains the TCP/IP code. The error code is returned as expected.l

void C_MFC_Winsock_01_Dlg::OnBnClickedBtnClientInit()
{
    bool method_status = false;
    int wsa_error_code = 0;
    TCHAR wsa_error_text[ 16 ];

    mp_C_Client = new C_Client;
	
    if( mp_C_Client != NULL )
    {
       method_status = mp_C_Client->Class_Initialize();
       wsa_error_code = mp_C_Client->Class_Get_WSA_Error_Code();
       wprintf( wsa_error_text, "%d", wsa_error_code );           // <<<< this line
       m_client_wsa_error_text.SetWindowText( wsa_error_text );
    }


Intellisense shows the control variable argument as:
m_client_wsa_error_text.SetWindowText( LPCTSTR lpszstring )


This compiles but after the wprintf the text in wsa_error_text is not as expected.
How should this be coded?

Thanks for your time

Edit: This post looked pretty good in the preview, but not good after I posted it.
And again: But now its okay. ????
AnswerRe: get a number into static text control Pin
Richard MacCutchan13-Sep-12 22:52
mveRichard MacCutchan13-Sep-12 22:52 
GeneralRe: get a number into static text control Pin
bkelly1314-Sep-12 16:00
Memberbkelly1314-Sep-12 16:00 
GeneralRe: get a number into static text control Pin
Paul M Watt14-Sep-12 16:36
mentorPaul M Watt14-Sep-12 16:36 
GeneralRe: get a number into static text control Pin
Richard MacCutchan15-Sep-12 0:02
mveRichard MacCutchan15-Sep-12 0:02 
GeneralRe: get a number into static text control Pin
bkelly1315-Sep-12 6:14
Memberbkelly1315-Sep-12 6:14 
GeneralRe: get a number into static text control Pin
Richard MacCutchan15-Sep-12 6:42
mveRichard MacCutchan15-Sep-12 6:42 
QuestionMirroring system imagelist Pin
Huzifa Terkawi11-Sep-12 16:27
MemberHuzifa Terkawi11-Sep-12 16:27 
QuestionCAsyncSocket, first application Pin
bkelly139-Sep-12 6:26
Memberbkelly139-Sep-12 6:26 
AnswerRe: CAsyncSocket, first application Pin
Paul M Watt14-Sep-12 16:47
mentorPaul M Watt14-Sep-12 16:47 
QuestionAfxGetThread vs GetCurrentThreadID Pin
kishorekumarnaik6-Sep-12 7:52
Memberkishorekumarnaik6-Sep-12 7:52 
AnswerRe: AfxGetThread vs GetCurrentThreadID Pin
Jiří Miklík7-Sep-12 1:24
MemberJiří Miklík7-Sep-12 1:24 
Questionerror C2039: 'abort' : is not a member of 'std' Pin
KASR13-Sep-12 0:35
MemberKASR13-Sep-12 0:35 
AnswerRe: error C2039: 'abort' : is not a member of 'std' Pin
Richard MacCutchan3-Sep-12 1:50
mveRichard MacCutchan3-Sep-12 1:50 
GeneralRe: error C2039: 'abort' : is not a member of 'std' Pin
KASR13-Sep-12 2:44
MemberKASR13-Sep-12 2:44 
GeneralRe: error C2039: 'abort' : is not a member of 'std' Pin
Richard MacCutchan3-Sep-12 3:21
mveRichard MacCutchan3-Sep-12 3:21 
AnswerRe: error C2039: 'abort' : is not a member of 'std' Pin
Stephen Hewitt3-Sep-12 17:54
MemberStephen Hewitt3-Sep-12 17:54 
GeneralRe: error C2039: 'abort' : is not a member of 'std' Pin
KASR13-Sep-12 20:46
MemberKASR13-Sep-12 20:46 

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.