Click here to Skip to main content
15,915,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need Help with IPC in C Pin
jan larsen23-Jul-02 1:22
jan larsen23-Jul-02 1:22 
QuestionHow to convert CString to char*? Pin
nachilau22-Jul-02 11:06
nachilau22-Jul-02 11:06 
AnswerRe: How to convert CString to char*? Pin
Chris Losinger22-Jul-02 11:09
professionalChris Losinger22-Jul-02 11:09 
GeneralRe: How to convert CString to char*? Pin
Navin22-Jul-02 11:20
Navin22-Jul-02 11:20 
AnswerRe: How to convert CString to char*? Pin
Dave Bryant22-Jul-02 11:20
Dave Bryant22-Jul-02 11:20 
AnswerRe: How to convert CString to char*? Pin
paulb22-Jul-02 15:04
paulb22-Jul-02 15:04 
AnswerRe: How to convert CString to char*? Pin
GBlank22-Jul-02 20:45
sussGBlank22-Jul-02 20:45 
GeneralRe: How to convert CString to char*? Pin
vikramlinux22-Jul-02 21:08
vikramlinux22-Jul-02 21:08 
in MSDN there is one example given
Example

The following example demonstrates the use of CString::operator LPCSTR.

// If the prototype of a function is known to the compiler,
// the LPCTSTR cast operator may be invoked implicitly

CString strSports(_T("Hockey is Best!"));
TCHAR sz[1024];

lstrcpy(sz, strSports);

// If the prototype isn't known, or is a va_arg prototype,
// you must invoke the cast operator explicitly. For example,
// the va_arg part of a call to sprintf() needs the cast:

sprintf(sz, "I think that %s!\n", (LPCTSTR) strSports);

// while the format parameter is known to be an LPCTSTR and
// therefore doesn't need the cast:

sprintf(sz, strSports);

// Note that some situations are ambiguous. This line will
// put the address of the strSports object to stdout:

cout << strSports;

// while this line will put the content of the string out:

cout << (LPCTSTR) strSports;
AnswerRe: How to convert CString to char*? Pin
Williams23-Jul-02 3:19
Williams23-Jul-02 3:19 
GeneralDialog window tricks Pin
NickOne22-Jul-02 11:00
NickOne22-Jul-02 11:00 
GeneralRe: Dialog window tricks Pin
Christian Graus22-Jul-02 12:26
protectorChristian Graus22-Jul-02 12:26 
GeneralRe: Dialog window tricks Pin
Philippe Mori22-Jul-02 12:41
Philippe Mori22-Jul-02 12:41 
GeneralRe: Dialog window tricks Pin
Shog922-Jul-02 12:52
sitebuilderShog922-Jul-02 12:52 
GeneralProblems reading from registry Pin
esapp42022-Jul-02 10:12
esapp42022-Jul-02 10:12 
GeneralRe: Problems reading from registry Pin
Le centriste22-Jul-02 10:28
Le centriste22-Jul-02 10:28 
GeneralRe: Problems reading from registry Pin
Len Holgate22-Jul-02 10:47
Len Holgate22-Jul-02 10:47 
GeneralRe: Problems reading from registry Pin
esapp42022-Jul-02 11:05
esapp42022-Jul-02 11:05 
GeneralRe: Problems reading from registry Pin
Len Holgate22-Jul-02 11:44
Len Holgate22-Jul-02 11:44 
Generalautomation.. Pin
pnpfriend22-Jul-02 10:00
pnpfriend22-Jul-02 10:00 
Generalemail and www link on a dialog Pin
d.schaeflein22-Jul-02 8:39
d.schaeflein22-Jul-02 8:39 
GeneralRe: email and www link on a dialog Pin
Steve L.22-Jul-02 9:22
Steve L.22-Jul-02 9:22 
GeneralRe: email and www link on a dialog Pin
d.schaeflein22-Jul-02 22:48
d.schaeflein22-Jul-02 22:48 
GeneralC/C++ problem. Pin
Michael Liu22-Jul-02 8:38
Michael Liu22-Jul-02 8:38 
GeneralRe: C/C++ problem. Pin
Bill Wilson22-Jul-02 8:46
Bill Wilson22-Jul-02 8:46 
GeneralRe: C/C++ problem. Pin
realfly22-Jul-02 15:24
realfly22-Jul-02 15: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.