Jump to content

[Solved] Unicode For My GUI


Fire
 Share

Recommended Posts

Hi to All Again.

I just wondering about Unicode using for Controls IN GUI.(In ex. In msgbox and etc.)

So I try this method for support Unicode for MY GUI (my native)

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <File.au3>
Dim $avarray
_FileReadToArray(@ScriptDir&"\lang.ini",$avarray)


$Form1 = GUICreate($avarray[1], 379, 171, 231, 140)
$Label1 = GUICtrlCreateLabel($avarray[2], 168, 40, 36, 17)
$Button1 = GUICtrlCreateButton($avarray[3], 24, 128, 89, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton($avarray[4], 240, 128, 97, 25, $WS_GROUP)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            MsgBox(64,$avarray[3],$avarray[3],4)

    EndSwitch
WEnd

Posted Image

In here: lang.ini my language file (i save it with unicode support and it works fine for me:

Content of lang.ini

Sadə İstifadəçı İnterfeysi
Bölməsi
Yoxla
Çıx

SON

Dears i have question about this:

Is here other method to do somethink like what i want to do or One way to do this is lang.ini method?

Thanks to all.

Edited by Sh3llC043r
[size="5"] [/size]
Link to comment
Share on other sites

This works fine for me, when I use SciTE and switch "File => Encoding => UTF-8 with BOM" on.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Sadə İstifadəçı İnterfeysi", 379, 171, 231, 140)
$Label1 = GUICtrlCreateLabel("Bölməsi", 168, 40, 36, 17)
$Button1 = GUICtrlCreateButton("Yoxla", 24, 128, 89, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Çıx", 240, 128, 97, 25, $WS_GROUP)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            MsgBox(64,"Yoxla","Yoxla",4)
    EndSwitch
WEnd
Link to comment
Share on other sites

Wow.Really It works.Super Thank you very much Kafu.

Yet i check AutoIT help file and i saw about BOM but didnt understand what does means It.

NOw after your post I understand.

Thank you again Kafu

[size="5"] [/size]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...