Code: Alles auswählen
Case #WM_PAINT
;Draw the sizing edges around the current gadget
dc = GetDC_(hwnd)
;SendMessage_(hwnd,#WM_ERASEBKGND,dc,0)
Brush = CreateSolidBrush_(RGB(0,255,0))
Pen = CreatePen_(#PS_SOLID,1,RGB(0,0,0))
OldBrush = SelectObject_(dc,Brush)
OldPen = SelectObject_(dc,Pen)
x = *Dummy\XPos
y = *Dummy\YPos
If *dummy\Type <> #PD_GADGET_WINDOW And GetWindowLong_(hwnd,#GWL_USERDATA) = GetGadgetState(#MDIGadget)
Rectangle_(dc,x-8,y-8,x,y)
Rectangle_(dc,x+*Dummy\Width,y-8,x+*Dummy\Width+8,y)
Rectangle_(dc,x-8,y+*Dummy\Height,x,y+*Dummy\Height+8)
Rectangle_(dc,x+*Dummy\Width,y+*Dummy\Height,x+*Dummy\Width+8,y+*Dummy\Height+8)
Rectangle_(dc,x+*Dummy\Width/2-4,y-8,x+*Dummy\Width/2+4,y)
Rectangle_(dc,x+*Dummy\Width/2-4,y+*Dummy\Height,x+*Dummy\Width/2+4,y+*Dummy\Height+8)
Rectangle_(dc,x-8,y+*Dummy\Height/2-4,x,y+*Dummy\Height/2+4)
Rectangle_(dc,x+*Dummy\Width,y+*Dummy\Height/2-4,x+*Dummy\Width+8,y+*Dummy\Height/2+4)
place.RECT
place\left = 0
place\top = 0
place\right = GetGadgetItemAttribute(#MDIGadget,WinNumber,#PB_MDI_ITEMWIDTH)
place\bottom = GetGadgetItemAttribute(#MDIGadget,WinNumber,#PB_MDI_ITEMHEIGHT)
;InvalidateRect_(hwnd,@place,0)
EndIf
place.RECT
place\right = 100
place\bottom = 100
ReleaseDC_(hwnd,dc)
SelectObject_(dc,OldBrush)
SelectObject_(dc,OldPen)
DeleteObject_(Brush)
DeleteObject_(Pen)
EndSelect
Dabei soll aber NICHT das ganze window gerefreshed werden, sondern eben NUR dieser Bereich, der auch wirklich betroffen ist, da das sonst zu lang dauern würde...
Could anybody help me please?
GreeZ Mereep