Click here to Skip to main content
15,888,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert const wchar* to const byte* Pin
Rajesh R Subramanian6-Oct-09 23:26
professionalRajesh R Subramanian6-Oct-09 23:26 
GeneralRe: convert const wchar* to const byte* Pin
CPallini6-Oct-09 23:43
mveCPallini6-Oct-09 23:43 
GeneralRe: convert const wchar* to const byte* Pin
Rajesh R Subramanian6-Oct-09 23:49
professionalRajesh R Subramanian6-Oct-09 23:49 
AnswerRe: convert const wchar* to const byte* Pin
Rajesh R Subramanian6-Oct-09 23:21
professionalRajesh R Subramanian6-Oct-09 23:21 
GeneralRe: convert const wchar* to const byte* Pin
Rakesh56-Oct-09 23:39
Rakesh56-Oct-09 23:39 
QuestionRe: convert const wchar* to const byte* Pin
Rajesh R Subramanian6-Oct-09 23:43
professionalRajesh R Subramanian6-Oct-09 23:43 
AnswerRe: convert const wchar* to const byte* Pin
Rakesh57-Oct-09 0:00
Rakesh57-Oct-09 0:00 
GeneralRe: convert const wchar* to const byte* Pin
CPallini7-Oct-09 0:28
mveCPallini7-Oct-09 0:28 
Rakesh5 wrote:
if i say, const wchar* test = L"hello";
const BYTE* test1 = (const BYTE*)test; o/p will be 'h' alone..


If you do need to convert the wide char string into a char one, then use a conversion macro instead, for instance (assuming a ANSI build, like yours):
const wchar_t * wstrTest = L"Hello";
CW2A strTest( wstrTest );
AfxMessageBox( strTest);


Rakesh5 wrote:
my seniors have used a functions in which they have typecast like wat i have mentioned in the first message..

I hope your seniors know what they are doing.

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: convert const wchar* to const byte* Pin
Rakesh57-Oct-09 2:08
Rakesh57-Oct-09 2:08 
GeneralRe: convert const wchar* to const byte* Pin
CPallini7-Oct-09 2:16
mveCPallini7-Oct-09 2:16 
GeneralRe: convert const wchar* to const byte* Pin
Rajesh R Subramanian7-Oct-09 0:29
professionalRajesh R Subramanian7-Oct-09 0:29 
AnswerRe: convert const wchar* to const byte* Pin
KarstenK7-Oct-09 1:24
mveKarstenK7-Oct-09 1:24 
AnswerRe: convert const wchar* to const byte* Pin
David Crow7-Oct-09 3:17
David Crow7-Oct-09 3:17 
GeneralRe: convert const wchar* to const byte* Pin
Rajesh R Subramanian7-Oct-09 3:23
professionalRajesh R Subramanian7-Oct-09 3:23 
GeneralRe: convert const wchar* to const byte* Pin
David Crow7-Oct-09 3:26
David Crow7-Oct-09 3:26 
GeneralRe: convert const wchar* to const byte* Pin
Rajesh R Subramanian7-Oct-09 3:30
professionalRajesh R Subramanian7-Oct-09 3:30 
Questionreg interview.... Pin
thangvel6-Oct-09 21:44
thangvel6-Oct-09 21:44 
QuestionRe: reg interview.... Pin
CPallini6-Oct-09 21:49
mveCPallini6-Oct-09 21:49 
AnswerRe: reg interview.... Pin
Richard MacCutchan6-Oct-09 22:13
mveRichard MacCutchan6-Oct-09 22:13 
AnswerRe: reg interview.... Pin
Rajesh R Subramanian6-Oct-09 22:17
professionalRajesh R Subramanian6-Oct-09 22:17 
AnswerRe: reg interview.... Pin
santhosh-padamatinti7-Oct-09 0:20
santhosh-padamatinti7-Oct-09 0:20 
QuestionMaking a Thread wait and not exit after the controlling function exits Pin
Hari_166-Oct-09 21:29
Hari_166-Oct-09 21:29 
AnswerRe: Making a Thread wait and not exit after the controlling function exits Pin
Code-o-mat6-Oct-09 21:46
Code-o-mat6-Oct-09 21:46 
AnswerRe: Making a Thread wait and not exit after the controlling function exits Pin
CPallini6-Oct-09 21:54
mveCPallini6-Oct-09 21:54 
AnswerRe: Making a Thread wait and not exit after the controlling function exits Pin
Rajesh R Subramanian6-Oct-09 22:05
professionalRajesh R Subramanian6-Oct-09 22:05 

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.