| |
|
|
| Julian57 (02.04.12)
Ok, so funzt alles. merci IF. tu étais mir une grand Aider. $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 est un Static. \nHier devoir Unicode-marque rein.",$50000000,10,10,width(%hwnd)-20,35,%hwnd,0,%HINSTANCE)
Waitinput
SetText static&,chr$($2192)
Externe("User32","SetWindowTextW",static&,utf("Test ")+chr$($92)+chr$($21)+utf(" Test"))
Waitinput
Fin
Proc UTF
parameters text$
declare b#
Faible b#,2*len(text$)+2
StringW b#,0 = text$
text$ = Char$(b#,0,SizeOf(b#)-2)
return text$
ENDPROC
Proc CreateW
Si %pCount > 10
Paramètres Class$,nom$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
D'autre
Paramètres Class$,nom$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
Var exstyle& = 0
EndIf
Class$ = UTF(Class$)
nom$ = UTF(nom$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = Si(Externe("User32","IsMenu",id%),id%,0)
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(nom$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = Externe("User32","CreateWindowExW",exstyle&,Addr(Class$),Addr(nom$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
inc id%
Si non handle&
Class$ = WinError$(%WinError)
MessageBox("Es trat suivant faute sur:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Retour handle&
ENDPROC
|
|
|
| |
|
|