| |
ActiveBar Support
Started by rutadane at 05-18-2009 5:59 AM. Topic has 6 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
05-18-2009, 5:59 AM
|
rutadane
Joined on 05-18-2009
Posts 4
|
Activebar SetCaption function can not set UTF-8 data
|
|
|
|
|
|
Hi,
In my mfc application i am saving some files with file name using UTF-8 characters.
In File menu where it shows recent files, the files having name with utf characters are not shown properly.
it shows ???? instead of those utf -8 characters. I believe the function SetCaption is not setting the captions of files properly.
Or is that i need to change the font for my toolbar? If yes then can anyone tell me the syntax for SetFont function , if i need to set it to "Arial" ?
Thanks,
Ruta
|
|
|
|
|
Report
|
|
|
|
05-19-2009, 2:54 AM
|
Andrey - DD
Joined on 08-01-2007
Russia, Novosibirsk
Posts 671

|
Re: Activebar SetCaption function can not set UTF-8 data
|
|
|
|
|
|
Ruta,
It is important to note that ActiveBar is not designed to fully support unicode, though it is possible to display many unicode characters in ActiveBar. Typically users will set the UseUnicode ActiveBar's property to True to achieve this. If set to True, ActiveBar will use Microsoft's Uniscribe DLLs for Unicode output of strings. This is useful for displaying strings in foreign languages.
Also, when the menuFontStyle property is set to Custom you can use custom font and provide the charset, when its set to system it will use the system settings (regional). In SDI VC++ sample shipped with ActiveBar you can use the following code snippet to achieve this:
m_theBar.SetUseUnicode(true); m_theBar.SetMenuFontStyle(1); COleFont fnt = m_theBar.GetFont(); fnt.SetBold(true); fnt.SetName("Arial"); fnt.SetCharset(...);
Thank you, Andrey T.
|
|
|
|
|
Report
|
|
|
|
05-21-2009, 2:40 AM
|
rutadane
Joined on 05-18-2009
Posts 4
|
Re: Activebar SetCaption function can not set UTF-8 data
Attachment: toolbar.JPG
|
|
|
|
|
|
Hi,
I tried your suggestion but still i can not see utf-8 data.
I sent you the screenshot so that u can understand it better.
Also what value should i pass to Setcharset function?
Thanks,
Ruta
|
|
|
|
|
Report
|
|
|
|
05-21-2009, 5:15 AM
|
Andrey - DD
Joined on 08-01-2007
Russia, Novosibirsk
Posts 671

|
Re: Activebar SetCaption function can not set UTF-8 data
|
|
|
|
|
Ruta,
You can try to set Charset property to the appropriate character set and ensure your systems language used by non-Unicode programs is set to the appropriate language.
The list below displays some of the different character sets available.
ANSI_CHARSET 0
DEFAULT_CHARSET 1
SYMBOL_CHARSET 2
SHIFTJIS_CHARSET 128
HANGEUL_CHARSET 129
HANGUL_CHARSET 129
GB2312_CHARSET 134
CHINESEBIG5_CHARSET 136
OEM_CHARSET 255
JOHAB_CHARSET 130
HEBREW_CHARSET 177
ARABIC_CHARSET 178
GREEK_CHARSET 161
TURKISH_CHARSET 162
VIETNAMESE_CHARSET 163
THAI_CHARSET 222
EASTEUROPE_CHARSET 238
RUSSIAN_CHARSET 204
Thank you,
Andrey T.
|
|
|
|
|
Report
|
|
|
|
05-22-2009, 5:48 AM
|
rutadane
Joined on 05-18-2009
Posts 4
|
Re: Activebar SetCaption function can not set UTF-8 data
Attachment: screenshot.jpg
|
|
|
|
|
|
Hi Andrey ,
I can say it work somewhat.
I changed the locale of my system to japanese. And in code currently i hard coded the charset to shiftjis;
Now the question marks are disappeared and some other characters i can see.
Also i am able to click to that filename and my window contains right characters.
See image below. I clicked on the first entry and window appeared with title containig utf8 data.
Do i need to change the font or something to display those characters correctly in the menu? Currently i am using font Arial.
Also what is the mapping between the charsets you have given to me and the values of it? where can i get those values for all the charsets?
I will need to retrieve the system locale and then set that value as charset but then if the charset values given by you are specific to activebar then how can i map system charset to the corresponding activebar charset?
Thanks,
Ruta
The first entry
|
|
|
|
|
Report
|
|
|
|
05-22-2009, 5:48 AM
|
rutadane
Joined on 05-18-2009
Posts 4
|
Re: Activebar SetCaption function can not set UTF-8 data
Attachment: screenshot.jpg
|
|
|
|
|
|
Hi Andrey ,
I can say it work somewhat.
I changed the locale of my system to japanese. And in code currently i hard coded the charset to shiftjis;
Now the question marks are disappeared and some other characters i can see.
Also i am able to click to that filename and my window contains right characters.
See image below. I clicked on the first entry and window appeared with title containig utf8 data.
Do i need to change the font or something to display those characters correctly in the menu? Currently i am using font Arial.
Also what is the mapping between the charsets you have given to me and the values of it? where can i get those values for all the charsets?
I will need to retrieve the system locale and then set that value as charset but then if the charset values given by you are specific to activebar then how can i map system charset to the corresponding activebar charset?
Thanks,
Ruta
|
|
|
|
|
Report
|
|
|
|
05-22-2009, 8:39 AM
|
Andrey - DD
Joined on 08-01-2007
Russia, Novosibirsk
Posts 671

|
Re: Activebar SetCaption function can not set UTF-8 data
|
|
|
|
|
|
|
|
|
GrapeCity » Product Support » ActiveBar Suppo... » Activebar SetCaption function can not set UTF-8 data
|
|
|
|
|