yEn861220 Posted March 6, 2008 Share Posted March 6, 2008 (edited) ToolBar Question ToolBar why only shows two Chinese characters??? help me!! expandcollapse popup#include <GuiToolbar.au3> #include <GuiConstantsEx.au3> Opt('MustDeclareVars', 1) $Debug_TB = False; Check ClassName being passed to functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hGUI, $hToolbar, $aStrings[4] Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp ; Create GUI $hGUI = GUICreate("Toolbar", 400, 300) $hToolbar = _GUICtrlToolbar_Create ($hGUI) GUISetState() ; Add standard system bitmaps _GUICtrlToolbar_AddBitmap ($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR) ; Add strings $aStrings[0] = _GUICtrlToolbar_AddString ($hToolbar, "新建文件") $aStrings[1] = _GUICtrlToolbar_AddString ($hToolbar, "打开文件") $aStrings[2] = _GUICtrlToolbar_AddString ($hToolbar, "保存文件") $aStrings[3] = _GUICtrlToolbar_AddString ($hToolbar, "关于帮助") ; Add buttons _GUICtrlToolbar_AddButton ($hToolbar, $idNew, $STD_FILENEW, $aStrings[0]) _GUICtrlToolbar_AddButton ($hToolbar, $idOpen, $STD_FILEOPEN, $aStrings[1]) _GUICtrlToolbar_AddButton ($hToolbar, $idSave, $STD_FILESAVE, $aStrings[2]) _GUICtrlToolbar_AddButtonSep ($hToolbar) _GUICtrlToolbar_AddButton ($hToolbar, $idHelp, $STD_HELP, $aStrings[3]) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>_Main Image: Edited March 6, 2008 by yEn861220 Link to comment Share on other sites More sharing options...
rover Posted March 6, 2008 Share Posted March 6, 2008 @yEn861220At very least a free bump..I'm running XP SP2+ without Chinese language support so I can only guess.I think you need_GUICtrlToolbar_SetUnicodeFormat().If you are using SciTe then check if you are using unicodeMenu > File > Encoding UTF?I notice in v3.2.10.0 in SciTe using UTF-8 that two characters are shown in the code but three when code is run.you may want to try beta v3.2.11.1http://www.autoitscript.com/autoit3/files/beta/autoit/maybe update SciTe as well$aStrings[1] = _GUICtrlToolbar_AddString ($hToolbar, "Sö") ; I get a null character after 'S' (removed) _GUICtrlToolbar_AddButton ($hToolbar, $idHelp, $STD_HELP, $aStrings[3]) _GUICtrlToolbar_SetUnicodeFormat($hToolbar, True) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE I see fascists... Link to comment Share on other sites More sharing options...
GaryFrost Posted March 6, 2008 Share Posted March 6, 2008 You'll need to use _GUICtrlToolbar_SetUnicodeFormat after the create. The Toolbar is in Ansii Mode by default. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
weaponx Posted March 6, 2008 Share Posted March 6, 2008 You'll need to use _GUICtrlToolbar_SetUnicodeFormat after the create. The Toolbar is in Ansii Mode by default.Late reply? Link to comment Share on other sites More sharing options...
GaryFrost Posted March 6, 2008 Share Posted March 6, 2008 Late reply?Clarification, just got home from work, can view the forum from work can't post from work. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
weaponx Posted March 6, 2008 Share Posted March 6, 2008 Clarification, just got home from work, can view the forum from work can't post from work.Thats odd, I can post here but not at like Gizmodo or Jalopnik through our BorderManager firewall. Link to comment Share on other sites More sharing options...
yEn861220 Posted March 7, 2008 Author Share Posted March 7, 2008 Very grateful to the detailed answer rover Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now