Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to restrict the number of Objects created ?? Pin
cp987620-May-07 19:42
cp987620-May-07 19:42 
AnswerRe: How to restrict the number of Objects created ?? Pin
led mike20-May-07 19:19
led mike20-May-07 19:19 
AnswerRe: How to restrict the number of Objects created ?? Pin
Ravi Bhavnani20-May-07 20:22
professionalRavi Bhavnani20-May-07 20:22 
AnswerRe: How to restrict the number of Objects created ?? Pin
CPallini20-May-07 20:48
mveCPallini20-May-07 20:48 
QuestionScrollbar problem Pin
Aint20-May-07 17:51
Aint20-May-07 17:51 
AnswerRe: Scrollbar problem Pin
Nelek20-May-07 20:50
protectorNelek20-May-07 20:50 
GeneralRe: Scrollbar problem Pin
Aint20-May-07 22:02
Aint20-May-07 22:02 
QuestionCString to const *char or clr Pin
Star0920-May-07 16:49
Star0920-May-07 16:49 
Hello,

Can someone please tell me how to convert from CString to const* char?

I used the following from msdn website:
<br />
    // Convert to a char*<br />
    const size_t newsize = 100;<br />
    char nstring[newsize];<br />
    strcpy_s(nstring, orig);<br />
    strcat_s(nstring, " (char *)");<br />
    cout << nstring << endl;


But it requires that I compile with clr. When I do that, my classx.cpp (all my class function) are considered errors.

When I don't modify the property of my solution to clr, I still get two errors:

fatal error C1190: managed targeted code requires a '/clr' option

Is there any other way to convert without using clr?

Thank you.

--Star
AnswerRe: CString to const *char or clr Pin
Christian Graus20-May-07 18:37
protectorChristian Graus20-May-07 18:37 
AnswerRe: CString to const *char or clr Pin
Manoj Kumar Rai20-May-07 20:17
professionalManoj Kumar Rai20-May-07 20:17 
AnswerRe: CString to const *char or clr Pin
prasad_som20-May-07 20:23
prasad_som20-May-07 20:23 
AnswerRe: CString to const *char or clr Pin
prasad_som20-May-07 20:20
prasad_som20-May-07 20:20 
QuestionCustom Caption in XP Pin
maxus9920-May-07 15:53
maxus9920-May-07 15:53 
AnswerRe: Custom Caption in XP Pin
Hamid_RT20-May-07 18:48
Hamid_RT20-May-07 18:48 
GeneralRe: Custom Caption in XP Pin
maxus9921-May-07 3:19
maxus9921-May-07 3:19 
QuestionSQL transaction rollback problem Pin
Moonis Ahmed20-May-07 15:12
Moonis Ahmed20-May-07 15:12 
AnswerRe: SQL transaction rollback problem Pin
zhang80060520-May-07 19:37
zhang80060520-May-07 19:37 
GeneralRe: SQL transaction rollback problem Pin
Moonis Ahmed20-May-07 19:50
Moonis Ahmed20-May-07 19:50 
GeneralRe: SQL transaction rollback problem Pin
Moonis Ahmed22-May-07 22:55
Moonis Ahmed22-May-07 22:55 
Questiondirect3d in layered wnd Pin
johny_d20-May-07 10:26
johny_d20-May-07 10:26 
QuestionHow to get hWnd in MFC? Pin
bankai12320-May-07 7:40
bankai12320-May-07 7:40 
AnswerRe: How to get hWnd in MFC? Pin
Hamid_RT20-May-07 7:57
Hamid_RT20-May-07 7:57 
AnswerRe: How to get hWnd in MFC? Pin
prasad_som20-May-07 20:16
prasad_som20-May-07 20:16 
QuestionPolygons / PtInRegion Pin
m.dietz20-May-07 6:49
m.dietz20-May-07 6:49 
Question_CrtSetBreakAlloc does nothing! Pin
dum20-May-07 6:37
dum20-May-07 6:37 

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.