Click here to Skip to main content
16,006,768 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralApi : which lists the devices on a computer Pin
brilliant10118-Mar-05 17:43
brilliant10118-Mar-05 17:43 
GeneralRe: Api : which lists the devices on a computer Pin
Gary R. Wheeler20-Mar-05 2:28
Gary R. Wheeler20-Mar-05 2:28 
GeneralWorker Thread Pin
Roger6518-Mar-05 13:12
Roger6518-Mar-05 13:12 
GeneralRe: Worker Thread Pin
PJ Arends18-Mar-05 13:27
professionalPJ Arends18-Mar-05 13:27 
GeneralRe: Worker Thread Pin
Roger6518-Mar-05 13:39
Roger6518-Mar-05 13:39 
GeneralRe: Worker Thread Pin
PJ Arends18-Mar-05 14:03
professionalPJ Arends18-Mar-05 14:03 
GeneralRe: Worker Thread Pin
Roger6518-Mar-05 14:45
Roger6518-Mar-05 14:45 
GeneralMFC: Unicode and Code Pages Pin
Jim Herren18-Mar-05 12:57
Jim Herren18-Mar-05 12:57 
I'm currently trying to convert my MFC program to display UNICODE characters. I've made all of the changes to compile and run as Unicode. To try to display the characters in japanese, I do the following:

f.SetFaceName(_T("Lucida Sans Unicode") );
f.SetCharSet( SHIFTJIS_CHARSET );
CUIFont *testFont = new CUIFont( GetSourceView(), "test source font", f.GetLOGFONT() );

oldfont = pDC->SelectObject( testFont );
pDC->ExtTextOut(x, y, ETO_CLIPPED, NULL, sNormal_First, NULL);

After changing the font and character set, the characters change, but seem to be a CJK representation of the characters. I looked at the hex value 0x82A0 which is one of the characters. In the Unicode code table of 932 (Japanese Shift-JIS), I see the character I think should be displayed with this value. After searching other Unicode code tables, I find that the character actually being displayed is from the Unicode code table 1200 (Unicode) which shows CJK Unified Ideographs. I've searched to see how to modify the code page and have had no luck. I think I need to set it to 932 instead of 1200. Anybody have any suggestions? It would be nice to write some code that does the setting dynamically so that it will work with other languages. I notice that using GetACP returns the system code page, but when it is 932 my program still displays the wrong character. Help!!


Jim Herren
Visual Inspect Debugging
Hewlett Packard
GeneralRe: MFC: Unicode and Code Pages Pin
Mike Dimmick19-Mar-05 13:19
Mike Dimmick19-Mar-05 13:19 
GeneralRe: MFC: Unicode and Code Pages Pin
Jim Herren19-Mar-05 16:38
Jim Herren19-Mar-05 16:38 
GeneralGet "Text" with Hook Pin
postler-t18-Mar-05 11:25
postler-t18-Mar-05 11:25 
GeneralRe: Get "Text" with Hook Pin
Alexander M.,19-Mar-05 4:53
Alexander M.,19-Mar-05 4:53 
GeneralRe: Get "Text" with Hook Pin
postler-t19-Mar-05 6:44
postler-t19-Mar-05 6:44 
Generalproblem with TBSTYLE_FLAT toolbar Pin
ljr2418-Mar-05 11:10
ljr2418-Mar-05 11:10 
GeneralOnSize execution, locks Pin
Vancouver18-Mar-05 11:02
Vancouver18-Mar-05 11:02 
GeneralRe: OnSize execution, locks Pin
Blake Miller18-Mar-05 11:42
Blake Miller18-Mar-05 11:42 
GeneralRe: OnSize execution, locks Pin
Vancouver18-Mar-05 11:56
Vancouver18-Mar-05 11:56 
GeneralRe: OnSize execution, locks Pin
Blake Miller18-Mar-05 12:18
Blake Miller18-Mar-05 12:18 
GeneralRe: OnSize execution, locks Pin
Vancouver18-Mar-05 15:33
Vancouver18-Mar-05 15:33 
GeneralFinal explanation Pin
Vancouver19-Mar-05 10:59
Vancouver19-Mar-05 10:59 
Generalsizeof() question Pin
BlackDice18-Mar-05 10:22
BlackDice18-Mar-05 10:22 
GeneralRe: sizeof() question Pin
Ravi Bhavnani18-Mar-05 10:27
professionalRavi Bhavnani18-Mar-05 10:27 
GeneralRe: sizeof() question Pin
BlackDice18-Mar-05 10:42
BlackDice18-Mar-05 10:42 
GeneralRe: sizeof() question Pin
Ravi Bhavnani18-Mar-05 11:21
professionalRavi Bhavnani18-Mar-05 11:21 
GeneralRe: sizeof() question Pin
Blake Miller18-Mar-05 11:44
Blake Miller18-Mar-05 11:44 

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.