Code : Tout sélectionner
Procedure.l myCallback(hWnd.l,uMsg.l,wParam.l,lParam.l)
Result = #PB_ProcessPureBasicEvents
Select uMsg
Case #WM_PAINT,#WM_SIZING, #WM_MOVING: PaintDesktop_(GetDC_(hWnd))
EndSelect
ProcedureReturn Result
EndProcedure
If OpenWindow(0,100,100,320,240,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"")
SetWindowCallback(@myCallback(),0)
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf