views:

1205

answers:

3

I'm using VS2005 with "using Unicode Character Set" option

typedef unsigned char       BYTE;  
typedef unsigned long       DWORD;

BYTE       m_bGeraet[0xFF];
DWORD      m_dwAdresse[0xFF];

How do i make the code work?

MessageBox (m_bGeraet[0], _T("Display Content"));  
MessageBox (m_dwAdresse[0], _T("Display Content"));
A: 

If it's essential that BYTE is 1-byte then you have to (optionally) convert your byte strings to wide strings using mbstowcs.

Ashalynd
+1  A: 
Heath Hunnicutt
A: 
//easy way for bytes is to do this

CString sTemp;

sTemp.Format("my byte = %d", bySomeVal);

MessageBox(sTemp);

//for a DWORD try

sTemp.Format("Dword is %lu", dwSomeVal);

MessageBox(sTemp);

if you using MessageBox, i would suggest soetming like AfxMessageBox...

Nate Gates