| |
|
|
| Julian57 (02.04.12)
Ok, so funzt alles. Danke IF. Du warst mir eine große Hilfe. $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 ist ein Static. \nHier sollen Unicode-Zeichen rein.",$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 trat folgender Fehler auf:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
EndProc
|
|
|
| |
|
|