Re: how to convert an unsigned short to an unsigned char?
From: Bruce Eitman \(eMVP\) (beitmannospam_at_NOSPAM_applieddata.NOSPAM_net)
Date: 01/12/05
- Next message: carlos: "Help me with the edit text."
- Previous message: Emmanuel Viollet: "Windows Mobile 2003 and MFC versions hell..."
- In reply to: JJ: "how to convert an unsigned short to an unsigned char?"
- Next in thread: r_z_aret_at_pen_fact.com: "Re: how to convert an unsigned short to an unsigned char?"
- Reply: r_z_aret_at_pen_fact.com: "Re: how to convert an unsigned short to an unsigned char?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 08:10:18 -0500
You are asking about some very basic C/C++ programming. Usually covered in
chapter 1 or 2 of a C/C++ Programming book. So I would start by learning
the language.
unsigned short Short;
unsigned char Char;
Char = (unsigned char) Short; // NOTE: You are loosing a byte of data, so
only do this if using the
// unsigned short was a
mistake in the first place.
CString to unsigned char -> really can't be done and doesn't make any sense.
What I think you want to do is look into UNICODE. I suspect that you don't
know anything about UNICODE or that Windows CE uses UNICODE. So you are
trying to use char, when you should be using TCHAR.
-- Bruce Eitman (eMVP) Senior Engineer beitman AT applieddata DOT net Applied Data Systems www.applieddata.net An ISO 9001:2000 Registered Company Microsoft WEP Gold-level Member
- Next message: carlos: "Help me with the edit text."
- Previous message: Emmanuel Viollet: "Windows Mobile 2003 and MFC versions hell..."
- In reply to: JJ: "how to convert an unsigned short to an unsigned char?"
- Next in thread: r_z_aret_at_pen_fact.com: "Re: how to convert an unsigned short to an unsigned char?"
- Reply: r_z_aret_at_pen_fact.com: "Re: how to convert an unsigned short to an unsigned char?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|