based on Kevins Thread about MonthCalendar https://www.hmgforum.com/viewtopic.php?f=5&t=6607
i have play with c:\hmg.3.4.4\SAMPLES\Basics\TUTORIAL\TUTOR12.PRG DatePicker and found out that i can "re-size" Calender Part
when inspect Calender Part using WinID i recognize that it is a MONTHCAL_CLASS
so i try to get Color and (big) Font but it does not work ... wrong Handle
---
when press Button to Pop-Up Calender DTN_DROPDOWN Notify Event is fired
now DTM_GETMONTHCAL can be send to get MONTHCAL_CLASS handle
c:\hmg.3.4.4\SOURCE\h_windows.prg
Code: Select all
* DatePicker Process ..................................
if _HMG_SYSDATA [1] [i] = "DATEPICK"
* DatePicker Change ............................
If ( GetNotifyCode ( lParam ) == DTN_DATETIMECHANGE ...
// need add
If ( GetNotifyCode ( lParam ) == DTN_DROPDOWN
nHwnd := SendMessage( _HMG_SYSDATA [ 3 ] [i] ,DTM_GETMONTHCAL,0,0 )
SetWindowTheme(nHwnd,CHR(0),CHR(0))
SendMessageA(nHwnd,MCM_SETCOLOR,MCSC_MONTHBK , ::CalendarBackColor)
SendMessageA(nHwnd,MCM_SETCOLOR,MCSC_TEXT , ::CalendarForeColor)
SendMessageA(nHwnd,MCM_SETCOLOR,MCSC_TITLEBK , ::CalendarTitleBackColor)
SendMessageA(nHwnd,MCM_SETCOLOR,MCSC_TITLETEXT , ::CalendarTitleForeColor)
SendMessageA(nHwnd,MCM_SETCOLOR,MCSC_TRAILINGTEXT, ::CalendarTrailingForeColor)
// get Calender Coordinate
GetWindowRect(nHwnd,@rcs)
// new Size of Calender
rcs[3] := (::oFont:width * 30 )
rcs[4] := (::oFont:height * 11 )
hParent := GetParent(nHwnd)
MoveWindow(hParent, rcs[1],rcs[2],rcs[3],rcs[4], .t.)
please help me to enhance DatePicker to use Color & (big) Font under HMG