English
Source / code snippets

Createw Createwindowexw Setwindowtextw Static Unicode Utf Widechar

 
Julian57 (02.04.12)
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


 
04/02/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.948 Views

Untitledvor 0 min.
Gast.081510/03/24
RudiB.12/06/21
p.specht11/21/21
R.Schneider11/20/21
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


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