Page 2 of 2

Re: DatePicker Color & (big) Font

Posted: Wed Oct 07, 2020 12:46 pm
by kcarmody
gfilatov wrote: Tue Sep 22, 2020 6:35 am
AUGE_OHR wrote: Mon Sep 21, 2020 7:44 pm hi,
gfilatov wrote: Mon Sep 21, 2020 9:58 am I've done these modifications in the MiniGUI Ex core and a resull is showed below:
have you found a Way to use big Font and "re-size" Calender :?:
...
Hi Jimmy,

Sure. Hint: take a look for the WinAPI C-function MonthCal_GetMinReqRect(hmonthcal, &rc) which will do a trick :idea:
I see that that works in MiniGui, but I could not get it to work in HMG. No matter what font name and size I gave when I created the control, MonthCal_GetMinReqRect always returned the width and height as if I had used the default font. So in the HMG MonthCalendar extension that I recently developed, you must set the width and height yourself if you set the font. See http://hmgforum.com/viewtopic.php?f=5&t=6607&p=63662.

Re: DatePicker Color & (big) Font

Posted: Wed Oct 07, 2020 12:59 pm
by kcarmody
AUGE_OHR wrote: Mon Sep 21, 2020 10:02 pm hi,
kcarmody wrote: Mon Sep 21, 2020 9:08 pm Just now I read that the calendar part of the date picker is created dynamically when you click the little icon and is destroyed when the calendar disappears.
RIGHT :!:

as i say you need to grab DTN_DROPDOWN Notify Event when Button is press for Pop-Up Calender
than you can send DTM_GETMONTHCAL to geht MonthCalendar Handle
next is to disable visual Style

so you need to add this (for HMG using _HMG_SYSDATA )
...
It sounds like you have a good idea of how to modify HMG. Have you tried actually doing this?

I've recently extended the MonthCalendar control to allow bold days, font changing, resizing, etc. You could use this code to modify the DatePicker calendar also. See http://hmgforum.com/viewtopic.php?f=5&t=6607&p=63662.

Another approach is to use a pseudo calendar datepicker. This uses three controls to simulate a calendar datepicker:
  • an up-down DatePicker
  • a button that makes the calendar appear and disappear
  • a MonthCalendar control that is initially invisible
There is a demo called DATEPICKER_2 that shows this, in my MonthCalendar proposal. See the above link.