My huge project need few message box in UNICODE without UNICODE compilation? - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24

Thread: My huge project need few message box in UNICODE without UNICODE compilation?

  1. #16
    Join Date
    Jan 2000
    Location
    India, Tamilnadu
    Posts
    279

    Thank you Doctor Luz. Your final sample should work as you told. menus ? But...

    Thank you Doctor Luz. Your final sample should work. But, as I have not found a suitable font for Korean and Japanese languages, still could not test it on my PC. Still searching for it.

    Will the MessageBoxW(...) also work as same ?

    Is it possible to get the DC of the menu resouce and change the menu text also in this method ?

    Thank you once again.

    Anita Eugene

  2. #17
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940
    A little background : I write VC++ software for a company which produces subtitling software - i.e. the software necessary to do DVD subtitling (amongst others).

    In this field I have a great deal of experience in dealing with multi language support without Unicode builds (as our software is capable of being run on W98 as well as W2K etc).

    I've had to do reverse languages such as arabic and hebrew as well as just about every other language on the planet.

    OK, now I've justified my answer I will give you this :

    (a) Arial Unicode copes with the vast majority of Japanese characters which I have encountered. However it isn't too good at Korean.
    (b) Korean is a bit of a pain since we had to hunt hard to find a font which worked properly. I can't offhand remember which one it is, but there is one out there sitting on a website waiting to be downloaded.

    When dealing with multi language support you need various tools, the primary of which should be an app to allow you to enter a unicode value and font with a charset and see whether your existing drawing code (be it ExtTextOut or whatever) will draw it.

    Sorry, you'll have to write this yourself. This is heavily linked to your method.

    I would, however, recommend you take a look at the Uniscribe library (look it up in MSDN). It is the library which I use and seems extremely comprehensive when it comes to drawing all languages.

    If all else fails contact Agfa and they will be able to sell you a font which meets your needs for around 20 dollars.

    Darwen.

  3. #18
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940
    Oh and an additional : getting message boxes etc to draw Korean in Windows isn't easy at all.

    You are (once you have your text drawing code working) much better off writing your own message boxes which mimic Windows.

    Either that, or suggest to your clients (I presume you have clients in Korea) that they send you a Korean version of XP or 2000. Although the OS is fundamentally the same, there are subtle differences which we have experienced.

    We've never actually tried do do a non-english version of our software - our company is too small and it's just not cost-effective.

    However we do cope with a very wide variety of languages in a single piece of software (i.e. you can have an arabic and a hebrew and an english and a bulgarian (cyrillic) document open in the same MDI environment).

    So, although I've never had to cope with multi-language resources I do have experience in multi-language support.

    Darwen.

  4. #19
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940
    That's not so say we haven't tried and done studies of course - which is why the above is a little 'a can do this/can't do this' if you see what I mean.

    Darwen.

  5. #20
    Join Date
    Jan 2000
    Location
    India, Tamilnadu
    Posts
    279

    Thank you darwen

    Thank you for sharing your experience with us. Good and useful.
    But, I am still looking for a suitable font for Korean language.
    As you said, we can make our own messages box with the available functions. This is not a problem

    If I get a good Korean font, good. But, without I having this font on my PC, how IE is able to display these characters properly?

    I am able to see Korean fonts properly on IE. Does this mean that I already have a Korean font on my PC?

    When we visit a page with different language, IE automatically download the font from Microsoft. Is it not a font? Can't we use this font in VC++

    I am sorry, these are my basic doubts.


    Thank you
    Anita Eugene

  6. #21
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    I don't know Korean and I don't know if the character codes you posted previously is for Korean, but the following seems to do something valid with the code you provided. I think I reversed the sequence of the bytes, though. Note that I am (I think I am) using a Unicode font, which I am not sure about, but you probably can use the same font for all languages.
    Code:
    	wchar_t wchBuff[]={L'\xcc45', L'\xb300', L'\xbe44', L'\xc774', 0};
    	CFont Font, *pprevFont;
    	LOGFONT lf;
    memset(&lf, 0, sizeof(LOGFONT));
    strcpy(lf.lfFaceName, "Arial Unicode MS");
    lf.lfHeight = 16;
    Font.CreateFontIndirect(&lf);
    pprevFont = pDC->SelectObject(&Font);
    TextOutW(pDC->m_hDC, 10, 10, wchBuff, wcslen(wchBuff));
    pDC->SelectObject(pprevFont);
    Produces:
    Attached Images Attached Images  
    Last edited by Sam Hobbs; December 2nd, 2003 at 01:04 AM.

  7. #22
    Join Date
    Jan 2000
    Location
    India, Tamilnadu
    Posts
    279

    Thank you Sam. Can some one give a download link for "Arial Unicode MS" font?

    Thank you Sam.
    Can some one give a download link for Arial Unicode MS font?
    Microsoft does not provide this download link any more.
    I searched google also. Could not find a suitable download location.

    Thank you for your help.

    Anita Eugene

  8. #23
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    I went to Microsoft TechNet: Home and in the "Search for" box at the upper left I entered "Arial Unicode MS" and got so much information that I won't try to list it all. I learned a few important things.

    First, Arial Unicode MS is installed with Office and is probably only available with Office. That seems odd, since it is (if I understand what Microsoft is saying) the most complete font for international use that is available from Microsoft. However if relevant, you probably can get an equivalent front elsewhere, perhaps for free or a small fee.

    Next, we can omit use of font names and get fonts based on other criteria and probably we can get Korean fonts by specifying a Korean character set. So a revised code sample is:
    Code:
      wchar_t wchBuff[]={L'\xcc45', L'\xb300', L'\xbe44', L'\xc774', 0};
      CFont Font, *pprevFont;
      LOGFONT lf;
    memset(&lf, 0, sizeof(LOGFONT));
    lf.lfHeight = 16;
    lf.lfCharSet = HANGUL_CHARSET;    // or JOHAB_CHARSET?
    Font.CreateFontIndirect(&lf);
    pprevFont = pDC->SelectObject(&Font);
    TextOutW(pDC->m_hDC, 10, 10, wchBuff, wcslen(wchBuff));
    pDC->SelectObject(pprevFont);
    I don't know what the difference is between HANGUL_CHARSET and JOHAB_CHARSET. Note that (I think) this will always create a Unicode font with the Korean charcter set (code page) unless a matching font does not exist in the system. I think that after creating the font, you can get the charcter set of the created font, and if it is not what you requested, you know that the user must install a font.

    Other than that, there is an abundance of other material to look at; just do the search I described above.
    Last edited by Sam Hobbs; December 2nd, 2003 at 12:03 PM.

  9. #24
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    I don't know how useful the Free UCS Outline Fonts page is but it is something I stumbled on a couple of days ago.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center