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