| |
|
|
| 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
|
|
|
| |
|
|