Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 10
#Compile Exe
#Dim All
#Include "Win32API.inc"
%IDC_Calendar = 500
Global hDlg as Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Monthly Calendar",300,300,620,200, %WS_OverlappedWindow To hDlg
Control Add "SysMonthCal32", hDlg, %IDC_Calendar, "", 5, 5, 600, 200, %WS_Child Or %WS_Visible Or %WS_TabStop, %WS_Ex_Left Or _
%WS_Ex_LtrReading Or %WS_Ex_RightScrollbar Or %WS_Ex_ClientEdge
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Local rc As Rect
Select Case Cb.Msg
Case %WM_EraseBkgnd
hdc = Cb.WParam
Ellipse hDC, 20,40,80,100
Ellipse hDC, 220,40,280,100
Rectangle hDC, 100,100,200,150
RoundRect hDC, 20,300,300,200,150,150
' GetClientRect(hDlg, rc)
' SetMapMode(hdc, %MM_ANISOTROPIC)
' SetWindowExtEx(hdc, 100, 100, %Null)
' SetViewportExtEx(hdc, rc.right, rc.bottom, %Null)
' FillRect(hdc, rc, %red)
Function = 1
End Select
End Function
'gbs_01222
'Date: 05-11-2013
http://www.garybeene.com/sw/gbsnippets.htm