Click here to Skip to main content
15,920,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detecting 16/32 bit DLLs Pin
Dudi Avramov15-Dec-02 2:12
Dudi Avramov15-Dec-02 2:12 
GeneralRe: Detecting 16/32 bit DLLs Pin
Victor Boctor1-Feb-03 2:52
Victor Boctor1-Feb-03 2:52 
GeneralArhh.... Tree Problem.... Pin
Nick Parker12-Dec-02 12:39
protectorNick Parker12-Dec-02 12:39 
GeneralRe: Arhh.... Tree Problem.... Pin
Rage13-Dec-02 1:14
professionalRage13-Dec-02 1:14 
Question_bstr_t with CString::Format()? Pin
Member 9612-Dec-02 11:26
Member 9612-Dec-02 11:26 
AnswerRe: _bstr_t with CString::Format()? Pin
Dave Bryant12-Dec-02 12:01
Dave Bryant12-Dec-02 12:01 
GeneralRe: _bstr_t with CString::Format()? Pin
Member 9612-Dec-02 13:06
Member 9612-Dec-02 13:06 
AnswerRe: _bstr_t with CString::Format()? Pin
Alvaro Mendez12-Dec-02 12:07
Alvaro Mendez12-Dec-02 12:07 
This should work:

strThis.Format("%s", (LPCTSTR)_bstrThat);

However, this is also perfectly fine:

strThis = _bstrThat;

or

strThis.Format("%s",CString(_bstrThat));

I don't know where you get this: there are dozens of com calls to construct each CString required in the format function. Did you actually step through the CString or bstr_t code? And even if all those calls are being made, like you say, so what? Are they really slow?

Yet other ways:

USES_CONVERSION;<br />
strThis.Format("%s", W2A(_bstrThat));


or perhaps even:

strThis.Format("%S", _bstrThat);
Regards,
Alvaro


Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
GeneralRe: _bstr_t with CString::Format()? Pin
Member 9612-Dec-02 13:03
Member 9612-Dec-02 13:03 
GeneralVolume Event or Notification Pin
Terry Denham12-Dec-02 11:20
Terry Denham12-Dec-02 11:20 
GeneralRe: Volume Event or Notification Pin
-Dy12-Dec-02 23:31
-Dy12-Dec-02 23:31 
Generalhelp Pin
imran_rafique12-Dec-02 9:59
imran_rafique12-Dec-02 9:59 
GeneralRe: help Pin
Alvaro Mendez12-Dec-02 10:28
Alvaro Mendez12-Dec-02 10:28 
GeneralRe: help Pin
Alvaro Mendez12-Dec-02 10:34
Alvaro Mendez12-Dec-02 10:34 
GeneralRe: help Pin
imran_rafique13-Dec-02 9:30
imran_rafique13-Dec-02 9:30 
GeneralSTUPID PROBLEM Pin
Sunnygirl12-Dec-02 9:15
Sunnygirl12-Dec-02 9:15 
GeneralRe: STUPID PROBLEM Pin
Alvaro Mendez12-Dec-02 9:26
Alvaro Mendez12-Dec-02 9:26 
GeneralRe: STUPID PROBLEM Pin
Sunnygirl12-Dec-02 9:30
Sunnygirl12-Dec-02 9:30 
GeneralRe: STUPID PROBLEM Pin
Alvaro Mendez12-Dec-02 9:41
Alvaro Mendez12-Dec-02 9:41 
GeneralRe: STUPID PROBLEM Pin
Sunnygirl12-Dec-02 9:52
Sunnygirl12-Dec-02 9:52 
GeneralRe: STUPID PROBLEM Pin
Alvaro Mendez12-Dec-02 9:59
Alvaro Mendez12-Dec-02 9:59 
GeneralRe: STUPID PROBLEM Pin
Sunnygirl12-Dec-02 10:07
Sunnygirl12-Dec-02 10:07 
GeneralRe: STUPID PROBLEM Pin
Ted Ferenc12-Dec-02 9:36
Ted Ferenc12-Dec-02 9:36 
GeneralRe: STUPID PROBLEM Pin
Sunnygirl12-Dec-02 9:43
Sunnygirl12-Dec-02 9:43 
GeneralRe: STUPID PROBLEM Pin
Ted Ferenc12-Dec-02 10:24
Ted Ferenc12-Dec-02 10:24 

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.