Well,
the WCHAR data type contains a 16-bit Unicode character[
^] and a BYTE is an 8-bit
unsigned char
. In other words, WCHAR is twice the size of BYTE. If there is any relevant data in the upper half of the WCHAR, it will be lost, since only the lower is assigned to the BYTE.
If you are sure the upper half has no data you care about, you can avoid the warning by using an explicit cast, which tells the compiler you know what you are doing:
WCHAR ch = 0x0132;
BYTE b1 = ch;
BYTE b2 = (BYTE)ch;
BYTE b3 = static_cast<byte>(ch);