
alors mon problème

merci pour votre aide bien apprécié

Code : Tout sélectionner
Global classname.s="testttttt",hTestWndProc
Procedure TrstWndProc(hWnd, uMsg, wParam, lParam)
Select uMsg
Case #WM_PAINT
hDC = GetDC_(hWnd)
tRect.RECT
GetClientRect_(hWnd,@tRect)
ValidateRect_(hWnd, @tRect)
aRet = FillRect_(hDC, @tRect, GetStockObject_(#WHITE_BRUSH) )
iRet = DrawText_(hDC, @"Test", -1,@tRect, (#DT_SINGLELINE|#DT_CENTER|#DT_VCENTER))
ReleaseDC_(hWnd, hDC)
Case #WM_CLOSE
DestroyWindow_(hWnd)
UnregisterClass_(classname,GetModuleHandle_(#NUL))
End
Case #WM_DESTROY
;PostQuitMessage_(0)
Default
ProcedureReturn DefWindowProc_(hWnd, uMsg, wParam, lParam)
EndSelect
ProcedureReturn 0
EndProcedure
hicon=LoadIcon_(0,#IDI_APPLICATION)
hcursor=LoadCursor_(0,#IDC_ARROW)
classst.WNDCLASSEX
classst\cbSize= SizeOf(WNDCLASSEX)
classst\style=(#CS_VREDRAW| #CS_HREDRAW)
classst\lpfnWndProc=@TrstWndProc()
classst\hInstance=GetModuleHandle_(#NUL)
classst\hIcon=hicon
classst\hCursor=hcursor
classst\hbrBackground=GetStockObject_(#WHITE_BRUSH)
classst\lpszClassName=@classname
classst\hIconSm=hicon
hTestWndProc=RegisterClassEx_(@classst)
hTest=CreateWindowEx_(0,classname,"Test 123",#WS_OVERLAPPEDWINDOW, #CW_USEDEFAULT, 0, #CW_USEDEFAULT, 0, 0, 0, GetModuleHandle_(#NUL), 0)
ShowWindow_(hTest,#SW_SHOW)
While #True
Delay(9999)
Wend