Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Unicode (on Win9x)

Unicode (on Win9x)

Scheduled Pinned Locked Moved C / C++ / MFC
htmlhelptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hey all! I noticed that IE can display text in foreign languages on buttons, in list boxes and as HTML (rich text), even on Win9X platforms (with no special foreign-language installations). I would like to incorporate similar functionality in my application. I managed to write SOME Unicode text on the Rich Edit control (Hebrew, Arabic, no Chinese though). I didn't manage to display foreign languages in the List View common control (tried using the CCM_SETUNICODEFORMAT message, didn't help), and I have no idea how to write such text on a simple button. Any ideas? Thanks!

    J 1 Reply Last reply
    0
    • L Lost User

      Hey all! I noticed that IE can display text in foreign languages on buttons, in list boxes and as HTML (rich text), even on Win9X platforms (with no special foreign-language installations). I would like to incorporate similar functionality in my application. I managed to write SOME Unicode text on the Rich Edit control (Hebrew, Arabic, no Chinese though). I didn't manage to display foreign languages in the List View common control (tried using the CCM_SETUNICODEFORMAT message, didn't help), and I have no idea how to write such text on a simple button. Any ideas? Thanks!

      J Offline
      J Offline
      Jens Kreiensiek
      wrote on last edited by
      #2

      hi, make your button ownerdraw and use TextOutW() to draw the text... have fun... jk :cool:

      L 1 Reply Last reply
      0
      • J Jens Kreiensiek

        hi, make your button ownerdraw and use TextOutW() to draw the text... have fun... jk :cool:

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Hey, thanks! I'll try that, I think it would help. I have three more questions though. I guess I would have to change the font before writing the string. My application doesn't know in advance what language will be displayed. How do I dynamically find out which font to load? Isn't there some font that encodes ALL languages? Secondly, suppose I have a Unicode string that is encoded in a single language. How do I find out which language it is encoded with? (Do I have to compare the characters to the Unicode table of languages, or is there a simpler way to do that?) Last question - do I also have to take care of font selection when I work with the Rich Edit control, or can it select the proper font automatically? Thank you very much!! Oz

        J 1 Reply Last reply
        0
        • L Lost User

          Hey, thanks! I'll try that, I think it would help. I have three more questions though. I guess I would have to change the font before writing the string. My application doesn't know in advance what language will be displayed. How do I dynamically find out which font to load? Isn't there some font that encodes ALL languages? Secondly, suppose I have a Unicode string that is encoded in a single language. How do I find out which language it is encoded with? (Do I have to compare the characters to the Unicode table of languages, or is there a simpler way to do that?) Last question - do I also have to take care of font selection when I work with the Rich Edit control, or can it select the proper font automatically? Thank you very much!! Oz

          J Offline
          J Offline
          Jens Kreiensiek
          wrote on last edited by
          #4

          Hi Oz, 1) you should select the appropriate font for the respective language. "Arial" covers the most eastern and western languages including cyrillic, greek, and turkish. For asian languages you have to use different fonts: japanese - "MS Gothic", chinese - "MS Hei", korean - "GulimChe"... As far as I know, there's no font that covers all unicode languages at once. 2) I guess you have no chance to retrieve a specific language from a unicode string by comparing the character values. There are too many characters which are used in more than one language. Just think about an 'e' ... 3) I haven't much experience with the rich edit control, sorry. But I remember that one must at least set the right font codepage for a proper display... have fun... jk :cool:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups