CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: int -> CString

  1. #1
    Join Date
    Apr 1999
    Posts
    34

    int -> CString

    What's the best way to convert int to CString? I did it this way (ASCII) and I was looking for a better method:

    GetListCtrl().SetItemText(i, 1, CString(pInfo->m_nTeamNumber + 48));


  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: int -> CString

    Three steps:

    CString strTemp;
    strTemp.Format("%d", pInfo->m_nTeamNumber);
    GetListCtrl().SetItemText(i, 1, strTemp);

    Regards,

    Paul McKenzie


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured