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. Using Unicode in Editbox, ListControl and CString ?

Using Unicode in Editbox, ListControl and CString ?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpcomquestion
2 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.
  • D Offline
    D Offline
    dlhson
    wrote on last edited by
    #1

    Any code to deal these answers: -Set Editbox or Listcontrol's font to Unicode ? -UpdateData() to get some string in Editbox and ListControl to a CString var ? -Compare 2 CString vars containing Unicode string ? Thanks. Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

    P 1 Reply Last reply
    0
    • D dlhson

      Any code to deal these answers: -Set Editbox or Listcontrol's font to Unicode ? -UpdateData() to get some string in Editbox and ListControl to a CString var ? -Compare 2 CString vars containing Unicode string ? Thanks. Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #2

      If you want to create a UNICODE version of a control, you will need to user CreateWindowW instead of the plain CreateWindow which is converted by the preprocessor to a CreateWindowA call if you are using ansi. You will then have a window that can handle UNICODE fonts, however, if you want to load a font from a different locality you will have other issues to work through. If this is what you want post another question and I will try to help you. If you are not compiling your application in UNICODE, then you will be out of luck getting UNICODE data into a CString unless you have version 7.0 of the CString class. All versions prior to 7.0 compile with either chars or wchar_t, but you can not use both at the same time. Version 7.0 parameterizes the string and allows you to define the type that you want to create. Good Luck


      Build a man a fire, and he will be warm for a day
      Light a man on fire, and he will be warm for the rest of his life!

      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