| |
|
|
Stephan Sonneborn | Hello together,
in the Help back the function SET("CHARSET", X), that for x now too values >2 permitted are. whom worth should one because for a russian Zeichensatz take on? I habs with $0419 probiert. has but not so hingehauen...
really would like I the following trouble solve: Texts, The in russian exist, with Profan z.B. as Buttontexte or Statictexte spend. means z.B. "Отмена" for "Abbrechen" on a Schaltfläche lay... |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 05/22/12 ▲ |
|
|
|
|
| I am not sure but I faith that the only with Unicode or. WideChar- Controls goes.
Perhaps help you these Topics:
If it you mere around the present goes then is it well the Simplest if You one HTML-Control uses. |
|
|
| |
|
|
|
Stephan Sonneborn | Hello iF,
there have You already right, the goes only with Unicode. but How very???
I Have me your example respected. The russian characters begin with u+0400 and weg To u+04ff = 256 characters.
I thought, with SET ("CHARSET",~lang_russian) would one a offset settle and then could one The characters simply with zB. CHR$($0400) take. goes but not, there CHR$() only values between 0...255 knows.
it should The function CHRW$() or. ORDW() since.
white someone, How one The prepares?
In VB is apparently The CHRW()-function of House from thereby.
one could itself Yes present, The STATICS and EDITS to your default to create (over CreateW() or. CreateWindowExW()), then any recent Standardtexte transfiguring in WideChars and then with a SetTextW The Texts into Controls present...
but How???
|
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 05/29/12 ▲ |
|
|
|
|
| Hello Stephan,
Nico what about me having soeben the following erarbeitet,
Please Try time in how far the so works: CompileMarkSeparation {$cleq}
{$compiler c:\xprofan12}
{$runtime c:\xprofan12}
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
var id% = 1
Var static&=CreateW("STATIC","Das ist ein Static. \nHier sollen Unicode-Zeichen rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
SetWindowTextW(static&,utf("Test ")+chrw(400)+utf(" Test"))
Waitinput
End
proc chrw
parameters wc&
declare m#
dim m#,2
word m#,0=wc&
var s$=char$(m#,0,2)
dispose m#
return s$
endproc
Proc UTF
parameters text$
declare b#
Dim b#,2*len(text$)+2
StringW b#,0 = text$
text$ = Char$(b#,0,SizeOf(b#)-2)
return text$
EndProc
Proc CreateW
parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
case %pCount <11 : exstyle& = 0
Class$ = UTF(Class$)
Name$ = UTF(Name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = (IsMenu(id%)<>0) * id%
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(Name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
Class$ = WinError$(%WinError)
inc id%
IfNot handle&
MessageBox("Es trat folgender Fehler auf:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
=s4 href='./../../Function-References/XProfan/endproc/'>ENDPROC
|
|
|
| |
|
|
|
Stephan Sonneborn | Hello iF, Hello Nico,
thanks for Your Support. unfortunately shows me the code garnichts on... CompileMarkSeparation'URL: https://xprofan.com/intl/de/forum/russischer-zeichensatz/
'{$cleq}
'{$compiler c:\xprofan12}
'{$runtime c:\xprofan12}
DEF IsMEnu(1) !"USER32", "IsMenu"
DEF CreateWindowExW(12) !"USER32", "CreateWindowExW"
DEF SetWindowTextW(2) !"USER32", "SetWindowTextW"
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
var id% = 1
Var static&=CreateW("STATIC","Das ist ein Static. \nHier sollen Unicode-Zeichen rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
SetWindowTextW(static&,utf("Test ") + chrw($401) + utf(" Test"))
Waitinput
End
proc chrw
parameters wc&
declare m#
dim m#,2
word m#,0=wc&
var s$=char$(m#,0,2)
dispose m#
return s$
endproc
Proc UTF
parameters text$
declare b#
Dim b#,2*len(text$)+2
StringW b#,0 = text$
text$ = Char$(b#,0,SizeOf(b#)-2)
return text$
EndProc
Proc CreateW
parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
case %pCount <11 : exstyle& = 0
Class$ = UTF(Class$)
Name$ = UTF(Name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = (IsMenu(id%)<>0) * id%
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(Name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
Class$ = WinError$(%WinError)
inc id%
IfNot handle&
MessageBox("Es trat folgender Fehler auf:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle& lass=s4 href='./../../Function-References/XProfan/endproc/'>ENDPROC
not even the "Test" before it and behind it... |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 05/29/12 ▲ |
|
|
|
|
Nico Madysa | Oh, naturally shows it you nothing on. SetWindowTextW is a API-function and can with XProfan-Strings nothing anfangen; one must it The address on The Strings transfer:
Var static&=CreateW("STATIC","Das is a Static. \nHier should Unicode-characters mere.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
var a$ = utf("Test ") + chrw($401) + utf(" Test")
SetWindowTextW(static&,Addr(a$))
so geht's. |
|
|
| |
|
|
|
| high, I hahm on the Stephan whom Präkompi in use has ^^ |
|
|
| |
|
|
|
Stephan Sonneborn | Nico Madysa (29.05.12)
so geht's.
Yes, so geht's. *sichandenkopfschlägt* thanks Nico, for your Help!
but now The Ausbaustufe: I have Texts (z.B. from Excel), The lying so to: "Отмена" How do I get the now as Text in a Unicode-Control displayed? one should But First once herausbekommen, which characters is the because now, what there displayed becomes. One ORD() supply naturally again only numbers between 0...255. Gibts to a entsprechendes OrdW()? then could one Perhaps each String zeichenweise umsetzen into UniCode-stature and then as Genazes again Show. (if in the Posting only ?????? showing: In my first Posting standing the russian concept) |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 05/30/12 ▲ |
|
|
|
|
| Ordw How posted: [...]
or.:
[OFFTOPIC] Stephan Sonneborn (30.05.12)(if in the Posting only ?????? showing: In my first Posting standing the russian concept)
apparently one bow of my Post Preview - look I me with opportunity on. [/OFFTOPIC] |
|
|
| |
|
|
|
Nico Madysa | on this Page [...] find You so quite any Kodierungsumwandlungen, The your marrow to want can, as NProcs; too Widechar-mutants of Chr$() and Ord() are thereby.
I hope, it bereitet you no difficulty, tappt im dunkeln in a XPSE-free Syntax To translate.
but I see straight not, Why You OrdW need should. the Widechar-Control, with the CreateW prepares been is, müsstest You only whom Text by SetWindowTextW allocate. If the Text, whom You allocate want, already widecharkodiert is (means 2 Bytes per characters), then there thereby quite no obstacles.
Or others Worten: I see straight not, where your trouble lying. |
|
|
| |
|
|
|
Stephan Sonneborn | Nico Madysa (30.05.12)
Or others Worten: I see straight not, where your trouble lying.
my trouble lying hierin: Füg time these both Lines in your Source one:
by me then chinese (or whatever) characters displayed... |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 05/31/12 ▲ |
|
|
|
|
| I have you here something "hingeschmiert" what whom Content of/ one with Widechar-Chars- gefüllten Clipboard as CHR$(...-sequence into Clipboard ablegt.
so can You z.B.: укепщьаь
into Clipboard take and then the program Starting and then comes there: with out.
the against as worth for b$ shows the desired.
Download external Download
|
|
|
| |
|
|