Click here to Skip to main content
15,901,284 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralLoading Variable in EditBox Pin
arunforce30-Jul-04 12:00
arunforce30-Jul-04 12:00 
GeneralRe: Loading Variable in EditBox Pin
Archer28230-Jul-04 12:57
Archer28230-Jul-04 12:57 
GeneralRe: Loading Variable in EditBox Pin
arunforce30-Jul-04 13:13
arunforce30-Jul-04 13:13 
GeneralRe: Loading Variable in EditBox Pin
Jaime Stuardo30-Jul-04 13:52
Jaime Stuardo30-Jul-04 13:52 
GeneralRe: Loading Variable in EditBox Pin
arunforce30-Jul-04 14:25
arunforce30-Jul-04 14:25 
GeneralNotify Messages Pin
Kosk30-Jul-04 11:47
Kosk30-Jul-04 11:47 
GeneralRe: Notify Messages Pin
Renjith Ramachandran30-Jul-04 18:18
Renjith Ramachandran30-Jul-04 18:18 
GeneralUnicode and cstring Pin
pnpfriend30-Jul-04 11:05
pnpfriend30-Jul-04 11:05 
How can I convert CString to const char*.
I have UNICODE set up in my project setting.

I tried
<br />
const char* k = (const char*)reinterpret_cast<LPCTSTR>(astring.AllocSysString())

but it only convert the very first character.
If I do just like before
const char* k = (const char*)astring;

I got following error message
<br />
c:\myDlg.cpp(490): error C2440: 'type cast' : cannot convert from 'CString' to 'const char *'<br />
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called<br />


can you help me how to convert CString to const char* so I can use atol(), atoi() function.
GeneralRe: Unicode and cstring Pin
Gary R. Wheeler30-Jul-04 12:19
Gary R. Wheeler30-Jul-04 12:19 
GeneralRe: Unicode and cstring Pin
Michael Dunn30-Jul-04 14:48
sitebuilderMichael Dunn30-Jul-04 14:48 
GeneralRe: Unicode and cstring Pin
PJ Arends30-Jul-04 23:15
professionalPJ Arends30-Jul-04 23:15 
Generalchar str[256] AND char *str = new char(256) Pin
Igor Mihailov30-Jul-04 10:44
Igor Mihailov30-Jul-04 10:44 
GeneralRe: char str[256] AND char *str = new char(256) Pin
Kosk30-Jul-04 12:01
Kosk30-Jul-04 12:01 
GeneralRe: char str[256] AND char *str = new char(256) Pin
Gary R. Wheeler30-Jul-04 12:24
Gary R. Wheeler30-Jul-04 12:24 
GeneralRe: char str[256] AND char *str = new char(256) Pin
Archer28230-Jul-04 13:03
Archer28230-Jul-04 13:03 
GeneralSetting Wallpaper Pin
Archer28230-Jul-04 10:40
Archer28230-Jul-04 10:40 
GeneralSPIF_SENDCHANGE ? Pin
bikram singh31-Jul-04 16:14
bikram singh31-Jul-04 16:14 
GeneralInitialising a items in a structure Pin
Grahamfff30-Jul-04 10:35
Grahamfff30-Jul-04 10:35 
GeneralRe: Initialising a items in a structure Pin
Kosk30-Jul-04 11:54
Kosk30-Jul-04 11:54 
GeneralRe: Initialising a items in a structure Pin
Grahamfff30-Jul-04 21:07
Grahamfff30-Jul-04 21:07 
GeneralRe: Initialising a items in a structure Pin
Gary R. Wheeler30-Jul-04 12:33
Gary R. Wheeler30-Jul-04 12:33 
GeneralRe: Initialising a items in a structure Pin
Grahamfff30-Jul-04 21:32
Grahamfff30-Jul-04 21:32 
GeneralRe: Initialising a items in a structure Pin
Gary R. Wheeler31-Jul-04 1:55
Gary R. Wheeler31-Jul-04 1:55 
GeneralRe: Initialising a items in a structure Pin
Grahamfff2-Aug-04 10:50
Grahamfff2-Aug-04 10:50 
GeneralRe: Initialising a items in a structure Pin
Sheff30-Jul-04 22:01
Sheff30-Jul-04 22:01 

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.