Forum | | | | - Page 1 - |
| Julian Schmidt | Hi, i'd gladly one Unicode-characters (u+2192) in a Static spend. gives it there any Opportunities?
LG
Julian57 |
| | | | |
| | « this Posting watts as Solution marked. » | | Julian Schmidt | OK, so working everything. thanks IF. you were me large Help.
$H Messages.ph
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
var id% = 1
Var static&=CreateW("Static","Das is a Static. \nHier should Unicode-characters mere.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
SetText static&,chr $($2192)
External("USER32","SetWindowTextW",static&,utf("Test ")+chr $($92)+chr $($21)+utf(" Test"))
Waitinput
End
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
If %pCount > 10
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Else
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
Var exstyle& = 0
EndIf
Class$ = UTF(Class$)
name$ = UTF(name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = If(External("USER32","IsMenu",id%),id%,0)
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = External("USER32","CreateWindowExW",exstyle&,Addr(Class$),Addr(name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Ifnot handle&
Class$ = WinError$(%WinError)
MessageBox("Es trod following Error on:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
ENDPROC
|
| | | | | |
| | | simply one Unicode-Static z.B. with createWindowW lay out.
If only around the spending goes then helps you vlt. too DrawTextW or one HTMLWin.
look time here Gibts a CreateW-Proc of Nico: [...] |
| | | | |
| | Julian Schmidt | It's all right not only around the spending, separate i want already one Static use. the create the Statics is so far Yes simply. only How do I then Unicode-characters insert?
CLS
Var class$="Static"
Var title$="Das is a Static. \nHier should Unicode-characters mere."
Var static&=External("USER32","CreateWindowExA",0,addr(class$),addr(title$),$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance,10000)
'Var static&=External("USER32","CreateWindowExW",0,addr(class$),addr(title$),$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance,10000)
Waitinput
|
| | | | |
| | | but not one Ansi-byte hold one Word per characters and there XProfan-Strings binärsicher are you can easily by chr$($08)+chr$($90) join.
Übrigens: UTF-8-Symbols-Kompilation: [...] |
| | | | |
| | Julian Schmidt | How Dou you mean the? example? |
| | | | |
| | | You write u+2192 -
means Try time setText notAuniqueButCoolhandleOfAUnicodeStaticControlHandle&,chr$(2192) -
I know now not whether XProfan the then already of self correctly abarbeitet and 2 byte einfügt. |
| | | | |
| | Julian Schmidt | apparently not...
CLS
Var class$="Static"
Var title$="Das is a Static. \nHier should nachfolgend one Unicode-characters mere."
Var static&=External("USER32","CreateWindowExA",0,addr(class$),addr(title$),$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance,10000)
'Var static&=External("USER32","CreateWindowExW",0,addr(class$),addr(title$),$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance,10000)
Waitinput
SetText static&,chr $(2192)
Waitinput
|
| | | | |
| | | Jo, gives unfortunately 1 instead of 2 from:
then can Yes z.B. by: your characters set but somehow missing me in Your example a unicode-WndProc How tappt im dunkeln Nico vormacht. |
| | | | |
| | Julian Schmidt | Hi IF, I habs now attempts with Nico's CreateW umzusetzen. it shining me now too objectively Unicode-characters auszugeben, though unfortunately not the characters that I really having wished. I have me my characters in the windows own Zeichentabelle exquisite. I thought left under be the Unicode-worth to find. If I this worth in my Prog. einsetzte comes but one other characters out. have I the not whom korrekten Unicode-worth of my Zeichens, or operates my code not correctly?
$H Messages.ph
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
var id% = 1
Var static&=CreateW("Static","Das is a Static. \nHier should Unicode-characters mere.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
SetText static&,chr $($2192)
Waitinput
End
Proc HiByte
Parameters word%
Return word% >> 8
ENDPROC
Proc LoByte
Parameters word%
Return word% & $FF
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
If %pCount > 10
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Else
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
Var exstyle& = 0
EndIf
Class$ = UTF(Class$)
name$ = UTF(name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = If(External("USER32","IsMenu",id%),id%,0)
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = External("USER32","CreateWindowExW",exstyle&,Addr(Class$),Addr(name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Ifnot handle&
Class$ = WinError$(%WinError)
MessageBox("Es trod following Error on:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
ENDPROC
|
| | | | |
| | | here look so GEHTS:
$H Messages.ph
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
Var hUser& = ImportDLL("USER32","u_")
var id% = 1
Var static&=CreateW("Static","Das is a Static. \nHier should Unicode-characters mere.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
declare s$
s$=chr $($92)+chr $($21)+"\z\z"
u_SetWindowTextW(static&,addr(s$))
Waitinput
FreeDLL hUser&
End
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
If %pCount > 10
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Else
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
Var exstyle& = 0
EndIf
Class$ = UTF(Class$)
name$ = UTF(name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = if(u_IsMenu(id%),id%,0)
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = u_CreateWindowExW(exstyle&,Addr(Class$),Addr(name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Ifnot handle&
Class$ = WinError$(%WinError)
MessageBox("Es trod following Error on:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
ENDPROC
|
| | | | |
| | Julian Schmidt | and How is it, if I the characters with others Strings join would like?
$H Messages.ph
CLS
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
var id% = 1
Var static&=CreateW("Static","Das is a Static. \nHier should Unicode-characters mere.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hinstance)
Waitinput
SetText static&,chr $($2192)
External("USER32","SetWindowTextW",static&,"Test/z/z"+chr $($92)+chr $($21))+" \z\zTest"
Waitinput
End
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
If %pCount > 10
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Else
Parameters Class$,name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
Var exstyle& = 0
EndIf
Class$ = UTF(Class$)
name$ = UTF(name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = If(External("USER32","IsMenu",id%),id%,0)
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = External("USER32","CreateWindowExW",exstyle&,Addr(Class$),Addr(name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Ifnot handle&
Class$ = WinError$(%WinError)
MessageBox("Es trod following Error on:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
ENDPROC
|
| | | | |
| | | Like that?
External("USER32","SetWindowTextW",static&,"T\ze\zs\zt\z\z\z")
or.
characters has hold 2 instead of 1 byte and String would like instead of only with \z (chr(0)) with \z\z DoppelNull "nullterminiert" go. |
| | | | |
|
AnswerTopic-Options | 17.572 Views |
Themeninformationenthis Topic has 4 subscriber: |