Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - XTPDatePicker view change notify
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

XTPDatePicker view change notify

 Post Reply Post Reply
Author
Message
Moritz View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2005
Location: Germany
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Moritz Quote  Post ReplyReply Direct Link To This Post Topic: XTPDatePicker view change notify
    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

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2006 at 2:11pm
Thanks, will consider those additions for further releases.

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.