blick das nicht ganz, aber wie kann ich mittels "SysMonthCal32" den Kalender so öffnen, das er nicht gleich sechs Monate, sondern nur einen Anzeigt?
In diesem gefundenen Beispiel zeigt er z.B. sechs Monate an:
Code: Alles auswählen
; German forum: http://robsite.de/php/pureboard/viewtopic.php?t=2997&highlight=
; Author: Andreas
; Date: 03. December 2003
#MCM_GETCURSEL = $1001
#Auswahl=1
#Abbruch = 2
Structure InitCommon
dwSize.l
dwICC.l
EndStructure
my.InitCommon
my\dwSize = 8
my\dwICC = $100
InitCommonControlsEx_(@my)
hwnd=OpenWindow(0,0,0,640,480.0,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"API-Kalender")
If hwnd=0 Or CreateGadgetList(hwnd)=0:End:EndIf
hCal=CreateWindowEx_(0,"SysMonthCal32","Kalender",#WS_CHILD|#WS_VISIBLE,10,80,600,300,hwnd,0,GetModuleHandle_(0),0)
;ein wenig Farbe ins Spiel bringen
SendMessage_(hCal,4106,0,$800000);MCM_SC_BACKGROUND
SendMessage_(hCal,4106,4,$800000);MCM_SC_MONTHBACK
SendMessage_(hCal,4106,2,$0000FF);MCM_SC_TITEL
SendMessage_(hCal,4106,1,$00FFFF);MCM_SC_TEXT
SendMessage_(hCal,4106,3,$00FFFF);MCM_SC_TITELTEXT
ButtonGadget(#Auswahl,10,10,50,20,"Datum")
ButtonGadget(#Abbruch,10,40,50,20,"Abbruch")
Repeat
EventID.l = WaitWindowEvent()
If EventID = #PB_EventGadget
Select EventGadgetID()
Case #Auswahl
SendMessage_(hCal,#MCM_GETCURSEL,0,@time.SYSTEMTIME )
year=time\wYear
month=time\wMonth
day=time\wDay
info.s = Str(day)+"."+Str(month)+"."+Str(year)
MessageRequester("",info,0)
Case #Abbruch
End
EndSelect
EndIf
Until EventID = #PB_EventCloseWindow
End
; ExecutableFormat=Windows
; EnableXP
; EOF