如何更改组合框的字符集? [英] How to change charset of combobox?

查看:88
本文介绍了如何更改组合框的字符集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在简体中文系统中使用日语软件,其他控件也可以正常工作,但是组合框和按钮无法正确显示多字节字符字符串.我尝试向该控件发送WM_SETFONT,以使用"MS UI Gothic"和字符集0x80更改字体,但这仅更改了字体,但没有更改内容.
无法将代码页从Shift-JIS转换为GBK,因为下拉列表中的项是键控的,而且我不知道何时以及如何获取或设置内容.

那我该怎么办?

p.s.
该应用程序不使用Unicode.
问题可能是由于CB_ADDSTRING消息造成的,它总是采用以空值结尾的字符串,该字符串以系统默认代码页编码.如果系统代码页是Shift-JIS,可以,但是我已经厌倦了更改系统代码页.

I'' m trying to use a Japanese software in simplified Chinese system , the other control works all fine but the combobox and button doesn''t display a multibyte-char string correctly. I try to send an WM_SETFONT to that control to change the font with "MS UI Gothic" and charset 0x80 but that only made change to the font but not the content.
There is no way to convert the code page from Shift-JIS to GBK because the item of the dropdown list is keyed and I don''t know when and how to get or set the content.

So what can I do?

p.s.
The application doesn'' t use Unicode.
The problem may be due to CB_ADDSTRING message,that it always take the null-terminated string as encoded with the system default code page.If the system code page is Shift-JIS that will be Ok, but I''m tired of changing the system code page.

推荐答案

尝试以下代码:
Try this code:
cbo.ImeMode = ImeMode.Hiragana;
//Or
ImeMode = ImeMode.Hiragana;//For applying all application to Japanese Hiragana mode


这篇关于如何更改组合框的字符集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆