Click here to Skip to main content
15,890,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to make a splitted frame? Pin
Olgun27-Jul-05 23:01
Olgun27-Jul-05 23:01 
AnswerRe: How to make a splitted frame? Pin
Mohammed F. Salem28-Jul-05 0:30
Mohammed F. Salem28-Jul-05 0:30 
GeneralRe: How to make a splitted frame? Pin
David Crow28-Jul-05 5:24
David Crow28-Jul-05 5:24 
GeneralRe: How to make a splitted frame? Pin
Olgun28-Jul-05 23:23
Olgun28-Jul-05 23:23 
QuestionHow do i convert CString from MFC application to String in Win32 application Pin
santoshskulkarni27-Jul-05 20:46
santoshskulkarni27-Jul-05 20:46 
AnswerRe: How do i convert CString from MFC application to String in Win32 application Pin
Bob Stanneveld27-Jul-05 21:06
Bob Stanneveld27-Jul-05 21:06 
GeneralRe: How do i convert CString from MFC application to String in Win32 application Pin
santoshskulkarni27-Jul-05 22:14
santoshskulkarni27-Jul-05 22:14 
GeneralRe: How do i convert CString from MFC application to String in Win32 application Pin
Bob Stanneveld27-Jul-05 22:55
Bob Stanneveld27-Jul-05 22:55 
Hello,

See the following code examples and see the difference between the CRT and the STL:
// example using the STL and streams
double dValue = 99.9;
std::stringstream sstr;
sstr << _T("This is some string with a double: ") << dValue << std::endl;

// example using the CTR
double dValue = 99.9;
TCHAR szBuf[1024] = {0};
_sntprintf(szBuf, 1023, _T("This is some string with a double: %f", dValue);


Some differences of the STL compared to the CRT are:
<list>
  • You don't have to use buffer magic, the STL does it for you
  • You don't have to use range checking as much as with the CRT
  • The syntax looks more clean
    D'Oh! | :doh: I remember now a nice CString replacement written by another CPian: CStdString[^]. You can use this class instead of the MFC CString without too much hassle. Big Grin | :-D

    Behind every great black man...
                ... is the police. - Conspiracy brother


    Blog[^]

  • GeneralRe: How do i convert CString from MFC application to String in Win32 application Pin
    santoshskulkarni28-Jul-05 0:58
    santoshskulkarni28-Jul-05 0:58 
    GeneralRe: How do i convert CString from MFC application to String in Win32 application Pin
    John R. Shaw28-Jul-05 5:30
    John R. Shaw28-Jul-05 5:30 
    GeneralCView and Dialog Pin
    Mohammed F. Salem27-Jul-05 20:35
    Mohammed F. Salem27-Jul-05 20:35 
    GeneralRe: CView and Dialog Pin
    Cool Ju27-Jul-05 21:18
    Cool Ju27-Jul-05 21:18 
    GeneralRe: CView and Dialog Pin
    Mohammed F. Salem27-Jul-05 22:22
    Mohammed F. Salem27-Jul-05 22:22 
    GeneralRe: CView and Dialog Pin
    Cool Ju27-Jul-05 23:09
    Cool Ju27-Jul-05 23:09 
    GeneralRe: CView and Dialog Pin
    Mohammed F. Salem27-Jul-05 23:58
    Mohammed F. Salem27-Jul-05 23:58 
    GeneralRe: CView and Dialog Pin
    Satishkumar.B28-Jul-05 1:58
    Satishkumar.B28-Jul-05 1:58 
    GeneralRe: CView and Dialog Pin
    Mohammed F. Salem28-Jul-05 2:32
    Mohammed F. Salem28-Jul-05 2:32 
    GeneralRe: CView and Dialog Pin
    David Crow28-Jul-05 5:34
    David Crow28-Jul-05 5:34 
    GeneralRe: CView and Dialog Pin
    David Crow28-Jul-05 5:31
    David Crow28-Jul-05 5:31 
    GeneralRe: CView and Dialog Pin
    David Crow28-Jul-05 5:37
    David Crow28-Jul-05 5:37 
    GeneralRe: CView and Dialog Pin
    Mohammed F. Salem28-Jul-05 7:13
    Mohammed F. Salem28-Jul-05 7:13 
    GeneralRe: CView and Dialog Pin
    David Crow28-Jul-05 7:23
    David Crow28-Jul-05 7:23 
    GeneralRe: CView and Dialog Pin
    Mohammed F. Salem28-Jul-05 9:30
    Mohammed F. Salem28-Jul-05 9:30 
    GeneralRe: CView and Dialog Pin
    David Crow28-Jul-05 9:41
    David Crow28-Jul-05 9:41 
    GeneralRe: CView and Dialog Pin
    Mohammed F. Salem28-Jul-05 9:54
    Mohammed F. Salem28-Jul-05 9:54 

    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.