Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Dim All
%Unicode=1
#Include "win32api.inc"
Global hDlg,hDC,hFont As Dword, rc As Rect
%IDC_Graphic = 500
Function PBMain() As Long
Dialog New Pixels, 0, "Invert",500,450,400,125, %WS_OverlappedWindow To hDlg
Control Add Graphic, hDlg, %IDC_Graphic, "", 0,0,400,125, %WS_Border
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
Font New "Tahoma",48,1 To hFont
Graphic Set Font hFont
Graphic Get DC To hDC
Graphic Color %Yellow, %Blue : Graphic Clear
Graphic Set Pos(20,20) : Graphic Print "Invert Me!"
rc.nLeft = 235 : rc.nTop = 30 : rc.nRight = 375 : rc.nBottom = 100
SetTimer hDlg, 500, 1000, %Null
Case %WM_Timer
InvertRect(hDC, rc)
Graphic ReDraw
End Select
End Function
http://www.garybeene.com/sw/gbsnippets.htm