CDC::DrawText and Japanese

DrawText call does not display Japanese text (only weird ASCII characters) 
while SetWindowText on a button for example displays correct Japanese. What 
could be the problem(s)?

Thanx for any help,
Dr. Jorgy

0
DrJorgy (2)
5/8/2006 10:00:02 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
538 Views

Similar Articles

[PageSpeed] 6

Not all fonts support full unicode character range - try changing DC
font.

Igor Green
http://www.grigsoft.com/
Compare It! + Synchronize It! - files and folders comparison never was
easier!

0
grigsoft1 (42)
5/8/2006 12:55:44 PM
I tried multiple fonts, no different result...

"grigsoft@gmail.com" wrote:

> Not all fonts support full unicode character range - try changing DC
> font.
> 
> Igor Green
> http://www.grigsoft.com/
> Compare It! + Synchronize It! - files and folders comparison never was
> easier!
> 
> 
0
DrJorgy (2)
5/8/2006 2:49:01 PM
It doesn't matter how many fonts you try, you have to use a font that has Japanese
characters in it.  Try the font Arial Unicode MS.
					joe

On Mon, 8 May 2006 07:49:01 -0700, Dr. Jorgy <DrJorgy@discussions.microsoft.com> wrote:

>I tried multiple fonts, no different result...
>
>"grigsoft@gmail.com" wrote:
>
>> Not all fonts support full unicode character range - try changing DC
>> font.
>> 
>> Igor Green
>> http://www.grigsoft.com/
>> Compare It! + Synchronize It! - files and folders comparison never was
>> easier!
>> 
>> 
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
-- 
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
0
newcomer (15978)
5/9/2006 4:19:29 AM
Reply:

Similar Artilces:

CDC::Rectangle and client area
Hello, Lets say that place a rectangle border on the client area at 10,10,45,45. And lets say that client area is 200x200 or so. How can I make the recangle border resize itself in proportion to the changes of the client area? In other words, lets say I resize the client to 250x200 etc. How can I adjust the border of the rectangle to widen itself? What would the formula look like to figure out the percentage of adjustment? This is pretty simple arithmetic. You have a rectangle which is 10,10, 45, 45. Therefore it is a 35x35 rectangle. It represents 35/200 of the area, and it starts 10/...

Japanese Version of MSCRM
Hi folks, I have a few questions regarding MSCRM3.0 for a client in Japan: 1. I have heard that the the Japanese version of MSCRM3.0 will be released in Japan in September 2007. It has already been released in the US. Is there a way a partner can buy it from the US for a client in Japan? 2. My second question is: On the same screen, the user needs to input data in English script on one field and Japanese script on another field? 3. My client's database is Oracle. Since Microsoft does not support Oracle, I can convince them to migrate to MS SQL Server. How should I go about this one time...

Getting CDC
I want to display something in the OnUpdate method, how do I get a handle to the CDC from here? news.microsoft.com wrote: > I want to display something in the OnUpdate method, how do I get a handle to > the CDC from here? > > This sounds like a beginner's mistake. You can call GetDC, but that is poor design and probably won't work the way you intend. Painting in OnUpdate will be lost after the window is minimized/restored or covered/uncovered. The default OnUpdate solves this problem by calling Invalidate(). Then the painting is done in the resulting OnDraw,...

CDC::arc() with big pen crash on win98
Hi, I've encountered a problem that occurs only under Win98: I have a dc object and I'm trying to draw an arc (I'm using the CDC::arc() function). I'm using a pen that has a big width. The problem is that it crashes sometimes (only when the arc is big and only a small part of it is displayed). I tried to look in the knowledge base for this kind of bug and I found something but it was a Win95 bug. How can I know when the CDC::arc() function will crash? For example, I had a problem when the bounding rectangle was bigger than 32767 (it crashed also under Win98) but since I knew wh...

Help! Japanese characters display as Question Marks in OWA
I have a VIP who needs to be able to read his e-mail via OWA. He is unable to read e-mail with Japanese character content via OWA. The subject lines are perfect Japanese characters, but the body of the message is all question marks and weird symbols. When he connects to another office's OWA mail server, using the same pc, he can see the Japanese characters in both the subject line and the body of the message just fine. Internally, when he uses the Outlook 2002 client, he sees the Japanese characters in the body and subject line with no problem as well. The problem only occurs when v...

which CDC
Hello, I am a bit confused as to which dc to call in the following situation. I have a dialog app with a static control on it that I am using to paint a graph on. I am doing the drawing in the lbuttondown function in the dialog class. My qestion is how do I call the device context to paint on the static control. Do I use the CClientDC dc(this); to get the device context of the dialog and do the drawing using this dc, or do I call CClinetDC dc(&m_myStaticControl); or dc = m_myStaticControl.GetDC(); to get the dc of the control, and use it to do the drawing? Are all these ...

DrawText with DT_WORDBREAK: DT_CALCRECT computes too small a height
Hello, I'm trying to print a number of possibly long strings using an MFC application. The strings are to be broken into lines using DrawText's DT_WORDBREAK mode. In order to determine the number of print pages required for all the strings, I use DT_CALCRECT to determine the total height of all strings without actually doing any output. I'm using a function like this: // Prints a string beginning at the indicated y position // on the page. xSize is the width of the page. // Print indicates if we actually want to do any output // (Print=true) or simply compute the output height //...

Problem with DrawText in XP
Problem with DrawText in XP Question: I have developed a MFC program, which is calling many times the DrawText function. With Windows 98, ME and NT there is no problem but with XP the characters painted by the last call to DrawText in OnPaint appear very slowly on the screen. I 'm using Visual C++ 6.0 with service pack 5. I use MFC in a static library. How can I solve this problem? { size = pDC->GetTextExtent(pNode->m_str); pDC->SetTextColor(m_crOverlay); pDC->DrawText(pNode->m_str, rect, DT_SINGLELINE | DT_LEFT | DT_VCENTER); rect.left += size.cx; rect.le...

HDC and CDC
I am attempting for the first time to use CreateDibSection and am puzzled as to how to use HDC within the MFC framework. I can't see that CDC returns a handle, so I am wondering if these two are mutually exclusive. Is there a bridge between the handle and the class? "Steve Russell" <srussell@removethisinnernet.net> wrote in message news:uQoa24INEHA.624@TK2MSFTNGP11.phx.gbl... > I am attempting for the first time to use CreateDibSection and am puzzled as > to how to use HDC within the MFC framework. I can't see that CDC returns a > handle, so I am wonderin...

Japanese Addresses in Contacts
I have Outlook 2007, Japanese language pack is installed (as well as US english). My wife is Japanese and we are sending out our holiday cards, so I opened up her calendar pst file in my Outlook to try and mail merge envelope addresses, and all the Japanese addresses are gibberish ASCII codes. How do I get outlook to recognize and display the Japapese addresses? ...

Strange CDC::MoveTo and CDC::MoveTo performance problem
Hi, I am writing a chart drawing program and encountered a strange performance problem with CDC::MoveTo and CDC::LineTo function calls. To avoid flickering, the program does the drawing on a memory device context(m_DrawDC) and then BitBlt to the real display device. Here is the code fragment: void CView::OnDraw(CDC* pDC) { .... if(m_DrawDC.CreateCompatibleDC(pDC)) { ... for(INT n=0;n<m_DataSeriesArray.GetSize();n++) { m_DataSeriesArray[n].PlotLine(&m_DrawDC); } ... pDC->BitBlt(0, 0, ClientRect.Width(), ClientRect.Height(), &m_DrawDC, 0, 0, SRCCOPY); } m_Dr...

CDC:TextOut and Plus or Minus Sign
I am using MSVC 7.1.3088 on MS XP 5.1 service pack 2. I am trying to write the plaus or misu sign to a display window using CDC:TextOut. I can write the symbol to a character buffer using sprintf(csText, "%s (%c%f %s)", csLabel, 177, fError, csUnits); which gives me "Elevation (=B17.926902 Meters)" in csText. However, when I try to write it to the window using TextOut(DeviceContext, (int)(pWindowPoint.x), (int)(pWindowPoint.y), (LPCTSTR)csText, (int)stStringlength); I get a rectangle where the =B1 (plus or minus) sign should be. Is there a way I can write the PM sign to ...

Pb CDC::Arc
Hello, I have a problem with this function of the GDI -> CDC::Arc. The arc is drawn, but there is also a line joining the 2 extremities of the arc. I don't want to have this line. Thank you for your help, Christophe, Christophe, Arc should not do this. Perhaps you could show the code where you are drawing the arc? Johan Rosengren Abstrakt Mekanik AB "Christophe Jacquelin" <cjacquel@club-internet.fr> a �crit dans le message de news:401ab231$0$6976$7a628cd7@news.club-internet.fr... > Hello, > > I have a problem with this function of the GDI -> CDC::Arc....

Japanese menus
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel I bought a Mac because of the ease of switching languages. My wife is Japanese and I want to be able to switch languages on the menus for her in Office like the system switches. Is this possible? "JapanTim@officeformac.com" wrote: > I bought a Mac because of the ease of switching languages. My wife is Japanese > and I want to be able to switch languages on the menus for her in Office like > the system switches. Is this possible? Have you considered setting up a new User for your wife. It's so ea...

trouble with CDC
I'm doing a program that needs to capture bitmaps off a window of another program. I'm doing okay except I have an intermittent failure. I admit I'm not testing for all the possible MFC error returns at this early stage, but even I did I'm not sure how I'd deal with this error. My piece of code looks like this. CDC m_memoryDc; CBitmap m_bitmap; void CMyDlg::GrabRect(CWnd *pWnd, CRect rc) { CDC * pSourceDc = pWnd->GetDC(); Sleep(50); // !!!!! need this or the crash happens almost right away m_bitmap.Detach(); m_bitmap.CreateCompatibleBitmap(pS...

CDC::SelectObject
Dear people, I'd like to select bitmaps into a device context created by CreateCompatibleDC. My problem is that if I select a bitmap stored in a CImageList, the result from SelectObject is Null indicating failure. But if I select a bitmap loaded with LoadBitmap from a resource, I can select it into the same DC without problems. What am I doing wrong? Any suggestions appreciated! At the point where you select the bitmap, it needs to be a valid bitmap. You have not shown the code you are using, so it is hard to tell what you have done. joe On Fri, 5 Dec 2008 02:51:42 -0800 (PST), F...

Transferring control of CClientDC to CDC
Hi, I have a class MSWinDisplayManager which I want to take a CClientDC device context so that it's member functions can perform drawing routines on it. I want the class to have it's own CClientDC member which all the methods have access to draw on. My constructor looks like this: MSWinDisplayManager::MSWinDisplayManager(CClientDC& win) { private_win.attach(win); } This is called by the user like: CClientDC dlg(this); MSWinDisplayManager wdm(dlg); then I want to do things like: wdm.drawCars(); The problem I have is that private_win isn't getting control of the device ...

CDC.TextOut
Dear All! Has anyone had problems with the screen flickering using the CDC member fuction "TextOut", with an update rate of 1000 Hz using on-screen counters in the View's OnDraw() function, or anything else ? -- Engineering On Mon, 12 Mar 2007 02:13:18 -0700, C Hill MBSC <CHillMBSC@discussions.microsoft.com> wrote: >Dear All! > >Has anyone had problems with the screen flickering using the CDC member >fuction "TextOut", with an update rate of 1000 Hz using on-screen counters in >the View's OnDraw() function, or anything else ? If I reca...

CDC::SelectClipRgn
Hi, I have to draw a line (using MoveTo and LineTo) that has to be clipped to a portion of the screen. The starting and ending coordinates are on opposite ends outside the visible area. Clipping it does the trick of showing only a portion of the line within the area it is supposed to draw in. When using a printer DC to print (standard print preview of an MDI application) the clipping doesn't seem to work, so the line gets drawn all over the place.. even outside the paper boundaries in print-preview. What can I do about this? It would be quite a hassle to have to calculate the 'inte...

CDC same as CClientDC
Are they the same? -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.5 ^ ^ 12:38:01 up 4 days 21:28 3 users load average: 1.03 1.03 1.00 ? ? (CSSA): http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/ Not exactly, no. CClientDC is derived from CDC. -- Jonathan Wood SoftCircuits Programming http://www.softcircuits.com "Man-wai Chang ToDie (33.6k)" <toylet.toylet@gmail.com> wrote in message news:%23M5oQPiFJHA.4304@TK2MSFTNGP02.phx.gbl... > &g...

why i can not use CDC::TransparentBlt
I am using VC 6.0 sp6 the sdk is the most latest but when i use CDC::TransparentBlt the complier report error the error message is: G:\myproject\game004\Man.cpp(72) : error C2039: 'TransparentBlt' : is not a member of 'CDC' d:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(636) : see declaration of 'CDC' Error executing cl.exe. Exactly what error do you get? -- Regards, Nish [VC++ MVP] http://www.voidnish.com http://blog.voidnish.com "howyougen" <take..care@tom.com> wrote in message news:OpvMMsFjFHA.132@TK2MSFTNGP10.p...

CDC problems
Ok this is really starting to mess things up for me and ive searched the msdn library until my head hurts, so ive decided to ask you guys. Theres two things im having problems with: 1) Copying an image to a temporary CDC, then stretching it onto another CDC. For example this code generates runtime errors for me (while if i use this->GetDC() it does not): CImage cImg; CDC dcImg, dcTemp; dcImg.Attach(cImg.GetDC()); dcTemp.CreateCompatibleDC(this->GetDC()); dcTemp.StretchBlt(0, 0, 250, 250, &dcImg, 0, 0, 100, 100, SRCCOPY); 2) this->GetDC() will not let me change the brush, p...

CDC::m_hAttribDC
Hi, I still have to see a purpose for this data member. With the exception of CMetafileDC, m_hDC is always equals to m_hAttribDC. In my applications, all it does is adding overhead in all the functions that first check if (m_hDC == m_hAttrib) and then check if ( m_hAttrib != NULL). Does someone has a concrete example of where m_hAttribDC is actually helpful? Thank you, olanglois, The attribute DC is also used for print previews. I assume you are doing something really bizarre if you often need to check equality the way you describe. Johan Rosengren Abstrakt Mekanik AB <olanglois@s...

CDC Help!
One of the common shapes that seems to be missing from the CDC members is the arrow. Is there a good way to do arrows? I need to create arrows around the circumference of a circle pointing toward the center of the circle. Any hints on how this is best done? Ron H. ----------------- www.Newsgroup-Binaries.com - *Completion*Retention*Speed* Access your favorite newsgroups from home or on the road ----------------- I'm not sure if CDC has any line caps. In the past I used GDI+ to draw arrows and different kind of line caps. IMHO, the default line caps don't scale very well, so ...

CDC/HDC????
I am trying to develop a print screen utility for a windows CE program. I am writing it in Embedded VC++ and running into some weirdness. My plan of action is to use GetClientRect() to find the location of the window, then loop through each pixel in that region and perform a GetPixel() to get the RGB value. My problem is that I need a HDC in order to perform GetPixel(). I used GetActiveWindow() to get an HWND, then used FromWindow() to get a CWnd pointer. I then tried the following line to get an HDC. HDC hdc=pWnd->GetWindowDC(); When I compile though I get the following error. erro...