Print Page | Close Window

XTPDatePicker view change notify

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=3978
Printed Date: 02 July 2025 at 1:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: XTPDatePicker view change notify
Posted By: Moritz
Subject: XTPDatePicker view change notify
Date Posted: 10 April 2006 at 11:35am

Hello Codejock-team.

I needed a month-viewchange-notification of the CXTPDatePickerControl.

I added

To "XTPDatePickerNotifications.h":

static const XTP_NOTIFY_CODE XTP_NC_DATEPICKERMONTHCHANGED = (WM_XTP_CALENDAR_BASE + 44);

and to "XTPDatePickerControl.h" the last 2 lines:

void
CXTPDatePickerControl::Populate()

{

//CWaitCursor wc;

// cleanup old month array

ClearMonths();

// add all month items in the grid to the array

// and set first month and last month defaults

CreateMonthArray();

// INFO: Added von Moritz

// redraw control image

if (!m_rcControl.IsRectEmpty())

AdjustLayout(m_rcControl);

_RedrawControl(FALSE);

SendNotification(XTP_NC_DATEPICKERMONTHCHANGED);

SendMessageToParent(XTP_NC_DATEPICKERMONTHCHANGED);

}

now I am able to catch if the user scrolls through the DateTimePicker and I can refresh my fontmaps to show special days in special colors but not to refresh the calendar.

But now I saw that release 10.01 is out, and if I update my changes are lost, so I suggest to add this feature to the 10 release. Maybe other people might need it too.

It would also be very nice to have some improvements to the DAYMETRICS-Callback function:
- set selected background and foreground colours
- set selected focus rectangle pen style




Replies:
Posted By: sserge
Date Posted: 10 April 2006 at 2:11pm
Thanks, will consider those additions for further releases.

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net