Re: What do triggers this event in MonthCalendar ?
- Posted by andi49 Aug 03, 2013
- 1300 views
Thanks Euman
But, I'm looking for a way to suppress the events that are not made by the user directly in the function MonthCalendar.
Is it impossible or is not an easy job?
Hi
I did some testing. This problem seems not to appear if your program uses Visual Styles. (new comctl32.dll)
The problem should disappear if you use the default Euphoria binaries (not the binaries i built without Visual Styles), but then you can't change the fonts for the calendar.
You may try the following solution.
-- File theme.ew include std/dll.e constant uxtheme = open_dll ("uxtheme.dll") constant mySetWindowTheme = define_c_proc(uxtheme,"SetWindowTheme",{C_HANDLE,C_POINTER,C_POINTER}) public procedure ThemeOff (atom handle) atom empty_string empty_string=allocate_string("") c_proc (mySetWindowTheme,{handle,empty_string,empty_string}) free (empty_string) end procedure
Use the default Euphoria binaries for you program and give this a try.
-- your program include theme.ew [..] constant CAL1 = create( MonthCalendar,"Calendar", WIN1,10, 10, 386, 269, 0) -- your code [..] ThemeOff(getHandle(CAL1)) WinMain( Win, Normal )
This way your program uses the new comctl32.dll but the calendar is without Visual Styles and you can change the font for it.
Hope this works for you-
Andreas
Andreas