English
Forum

Unicode-characters in CreateText

 
- Page 1 -



Julian
Schmidt
Hi,
i'd gladly one Unicode-characters (u+2192) in a Static spend.
gives it there any Opportunities?

LG

Julian57
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/02/12  
 



« this Posting watts as Solution marked. »

- Page 2 -



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

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/02/12  
 



 
- Page 1 -



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
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/02/12  
 



Jo, gives unfortunately 1 instead of 2 from:
 {$cleq}
print len(chr $(256))
Waitinput

then can Yes z.B. by:
SetText static&,chr $(hibyte($2192))+chr $(lobyte($2192))+"\z\z"
your characters set but somehow missing me in Your example a unicode-WndProc How tappt im dunkeln Nico vormacht.
 
04/02/12  
 




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


39 kB
Hochgeladen:04/02/12
Downloadcounter179
Download
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/02/12  
 



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

 
04/02/12  
 




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

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/02/12  
 



 
- Page 2 -


Like that?
External("USER32","SetWindowTextW",static&,"T\ze\zs\zt\z\z\z")

or.
s$=utf("Test")
External("USER32","SetWindowTextW",static&,addr(s$))

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.
 
04/02/12  
 




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

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
04/02/12  
 




Jörg
Sellmeyer
Julian57 (02.04.12)
OK, so working everything.


you are indeed one joker: iFs code copy and then your Posting as Solution deklarieren. this is not The swell Forums-Nettiquette...
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/02/12  
 





very taken is the Solution Nicos earnings -

can it Yes Nicos Posting (  [...]  ) NEN Star miss out on. ^.^
 
04/02/12  
 




funkheld

you are indeed one joker: iFs code copy and then your Posting as Solution deklarieren. this is not The swell Forums-Nettiquette...


Hmm..., You interpretierst the wrong !

whoso the everything of supra to under quiet durchliest, understand not as copy separate as kooperative cooperation.....

what have you got there for Problems with the good Zuammenarbeit ?

The Anmache lead only moreover the of/ one its code, the with the Forumhilfe resolved watts, not More as fertiges common product reinstellt.
result is, the Forum verweist with the Weiterentwicklung of Programs.

greeting
 
04/04/12  
 




Jörg
Sellmeyer
I could genausogut say,that the moreover lead, that nobody More pleasure has on such Posts To react:


How Dou you mean the?
example?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/04/12  
 




funkheld
If of/ one Verbesserungsvorschläge power, ought to one another not which rights anzweifeln circa therefore a Eigentumständerung make zugunsten the Verbesserungsvorschlagenden. If then to the Verbesserungsvorschlagenden one right for the Program einräumen.


How Dou you mean the?
example?


How should one otherwise ask ?
The ask are short, clear and verständlich .

PS: i want this issue not further deepening, separate The Programmlösung supra is importent.

Thank you.

greeting
 
04/04/12  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

17.526 Views

Untitledvor 0 min.
E.T.01/14/24
Sven Bader02/25/21
Langer12/30/20
Manfred Barei02/23/20
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie