Jump to content

Scintilla and utf-16


GUIMish
 Share

Recommended Posts

Hi there!

I have a question, how do I insert the string utf-16 in Scintilla editor. here's an example of code that I have, why does not it work?

#include <WinAPI.au3>
#include <SendMessage.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#include <scintilla.h.au3>

$Window = GUICreate("Test", 300, 300, -1, -1)

Local $h__THisGUI = WinGetHandle($Window)
Local $h__sciDLL = _WinAPI_LoadLibrary("SciLexer.dll")
Local $h__sciWnd = _WinAPI_CreateWindowEx($WS_EX_CLIENTEDGE, "Scintilla", "TEST", BitOR($WS_CHILD, $WS_VISIBLE), 1, 50, 300, 301, $h__THisGUI, 0)
    _SendMessageA($h__sciWnd, $SCI_SETCODEPAGE, $SC_CP_UTF8)


    _SendMessage($h__sciWnd, $WM_SETTEXT, 0, "かすみうごかぬ"&@CRLF&"昼(ひる)のねむたさ", 0, "wparam", "str")

GUISetState()
While 1
    Switch GUIGetMsg()
        Case -3
            Exit
    EndSwitch
WEnd

Here all files: http://algo.wc.lt/Test Scintilla.7z

2015-11-07_19-28-04.png

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...