Foro | | | | - Página 1 - |
|  Julian Schmidt | ¡Hola, Yo sería gerne una Unicode-Signo (U+2192) en un Static ausgeben. Gibt lo como irgendwelche Möglichkeiten?
LG
Julian57 |
| | | | |
|  | « Dieser Contribución wurde como Solución gekennzeichnet. » | |  Julian Schmidt |  Ok, así funzt alles.  Gracias IF. Usted warst me una große Ayuda. 
$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 es una Static. \nHier debería Unicode-Signo rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hInstance)
Waitinput
SetText static&,chr$($2192)
Externo("USER32","SetWindowTextW",static&,utf("Test ")+chr$($92)+chr$($21)+utf(" Test"))
Waitinput
End
Proc UTF
parámetros texto$
declarar b#
Dim b#,2*len(texto$)+2
StringW b#,0 = texto$
texto$ = Char$(b#,0,SizeOf(b#)-2)
volver texto$
ENDPROC
Proc CreateW
If %pCount > 10
Parámetros Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Más
Parámetros 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(Externo("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& = Externo("USER32","CreateWindowExW",exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Caso negativo handle&
Class$ = WinError$(%WinError)
MessageBox("Es trat folgender Fehler en:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Disponer cs#
Volver handle&
ENDPROC
|
| | | | |  |
| |  | Einfach una Unicode-Static z.B. con createWindowW invertir.
Wenns sólo a Edición va entonces hilft Usted vlt. auch DrawTextW oder una HTMLWin.
Schau veces hier gibts una CreateW-Proc de Nico: [...]  |
| | | | |
| |  Julian Schmidt | Lo va no sólo a Edición, pero Yo möchte ya una Static uso. Das redactar des Statics es soweit sí simplemente. Nur como tue Yo entonces Unicode-Signo einfügen?
CLS
Var class$="Static"
Var title$="Das es una Static. \nHier debería Unicode-Signo rein."
Var static&=Externo("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
|
| | | | |
| |  | Statt una Ansi-Byte sólo una Word pro Signo y como XProfan-Cuerdas binärsicher son kannst Usted simplemente por chr$($08)+chr$($90) kombinieren.
Übrigens: UTF-8-Symbole-Kompilation: [...]  |
| | | | |
| |  Julian Schmidt | Como media Si es usted el? Ejemplo? |
| | | | |
| |  | Usted schreibst U+2192 -
also probiere veces setText notAuniqueButCoolhandleOfAUnicodeStaticControlHandle&,chr$(2192) -
Yo weiß ahora no si XProfan el entonces ya de incluso korrekt abarbeitet y 2 Byte einfügt. |
| | | | |
| |  Julian Schmidt | Anscheinend no...
CLS
Var class$="Static"
Var title$="Das es una Static. \nHier se nachfolgend una Unicode-Signo rein."
Var static&=Externo("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, son desafortunadamente 1 en lugar de 2 de:
Dann kannst sí z.B. por: Su Signo ansetzen aber irgendwie fehlt me en Deinem Ejemplo una unicode-WndProc como ellos Nico vormacht. |
| | | | |
| |  Julian Schmidt | Hi IF, Yo habs nun intenta con Nico's CreateW umzusetzen. Er scheint me nun auch tatsächlich Unicode-Signo auszugeben, allerdings por desgracia, no el Signo el Yo eigentlich haben quería. Yo habe me mein Signo en el Windows eigenen Zeichentabelle ausgesucht. Pensé links unten sei el Unicode-Valor para encontrar. Wenn Yo esta Valor en media Prog. einsetzte kommt aber una más Signo heraus. Posesiones Yo, el no el korrekten Unicode-Valor meines Zeichens, oder arbeitet mein Code no korrekt?

$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 es una Static. \nHier debería Unicode-Signo rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hInstance)
Waitinput
SetText static&,chr$($2192)
Waitinput
End
Proc HiByte
Parámetros word%
Volver word% >> 8
ENDPROC
Proc LoByte
Parámetros word%
Volver word% & $FF
ENDPROC
Proc UTF
parámetros texto$
declarar b#
Dim b#,2*len(texto$)+2
StringW b#,0 = texto$
texto$ = Char$(b#,0,SizeOf(b#)-2)
volver texto$
ENDPROC
Proc CreateW
If %pCount > 10
Parámetros Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Más
Parámetros 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(Externo("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& = Externo("USER32","CreateWindowExW",exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Caso negativo handle&
Class$ = WinError$(%WinError)
MessageBox("Es trat folgender Fehler en:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Disponer cs#
Volver handle&
ENDPROC
|
 | | | | |
| |  | Hier mostrar así 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 es una Static. \nHier debería Unicode-Signo rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hInstance)
Waitinput
declarar s$
s$=chr$($92)+chr$($21)+"\z\z"
u_SetWindowTextW(static&,addr(s$))
Waitinput
FreeDLL hUser&
End
Proc UTF
parámetros texto$
declarar b#
Dim b#,2*len(texto$)+2
StringW b#,0 = texto$
texto$ = Char$(b#,0,SizeOf(b#)-2)
volver texto$
ENDPROC
Proc CreateW
If %pCount > 10
Parámetros Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Más
Parámetros 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%
Caso negativo handle&
Class$ = WinError$(%WinError)
MessageBox("Es trat folgender Fehler en:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Disponer cs#
Volver handle&
ENDPROC
|
| | | | |
| |  Julian Schmidt | Und como es, si yo el Signo con otro Cuerdas kombinieren möchte?
$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 es una Static. \nHier debería Unicode-Signo rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%hInstance)
Waitinput
SetText static&,chr$($2192)
Externo("USER32","SetWindowTextW",static&,"Test/z/z"+chr$($92)+chr$($21))+" \z\zTest"
Waitinput
End
Proc UTF
parámetros texto$
declarar b#
Dim b#,2*len(texto$)+2
StringW b#,0 = texto$
texto$ = Char$(b#,0,SizeOf(b#)-2)
volver texto$
ENDPROC
Proc CreateW
If %pCount > 10
Parámetros Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
Más
Parámetros 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(Externo("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& = Externo("USER32","CreateWindowExW",exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Caso negativo handle&
Class$ = WinError$(%WinError)
MessageBox("Es trat folgender Fehler en:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Disponer cs#
Volver handle&
ENDPROC
|
| | | | |
| |  | Like that?
Externo("USER32","SetWindowTextW",static&,"T\ze\zs\zt\z\z\z")
o
Signo ha sólo 2 en lugar de 1 Byte y String möchte en lugar de sólo \z (chr(0)) con \z\z DoppelNull "nullterminiert" voluntad. |
| | | | |
|
RespuestaTema opciones | 17.972 Views |
ThemeninformationenDieses Thema ha 4 subscriber: |