| |
|
|
|
Gemerkt/Separiert von http://www.rgh-soft.de/forum01/read.php?f=7&i=13972&t=13968
Autor: RGH
SysMonthCal
-----------
$H Windows.ph
$H Messages.ph
$H commctrl.ph
Declare OldTest&,ende%
Struct POINT =
x&,
y&
Struct SYSTEMTIME =
wYear%,
wMonth%,
wDayOfWeek%,
wDay%,
wHour%,
wMinute%,
wSecond%,
wMilliseconds%
Struct MCHITTESTINFO =
cbSize&,
pt!POINT,
uHit&,
st!SYSTEMTIME
Proc Get_MonthCalHit
Declare DATA#, HIT%
Dim DATA#,MCHITTESTINFO
DATA#.cbSize& = SizeOf(DATA#)
DATA#.pt!x& = %MouseX - 500
DATA#.pt!y& = %MouseY - 150
Var QT% = SendMessage(KAL1&,$100E,0,DATA#) $100E = $1000 + 14 = HITTEST
Var TEXT$ = str$(DATA#.st!wDay%)+"."+str$(DATA#.st!wMonth%)+"."+str$(DATA#.st!wYear%)
Messagebox(TEXT$,"HITFLAG "+Str$(QT%),$40000)
Dispose DATA#
RETURN QT%
EndProc
WINDOW 0,0 - 800,600
Var KAL1& = Control("SysMonthCal32", "Kalender", 1342177280, 500, 150, 180, 406, %HWND, 0, %hInstance, 0)
WhileNot Ende%
Waitinput
If %Key = 2
Ende% = 1
Else
Get_MonthCalHit
EndIf
EndWhile
|
|
|
| |
|
|