Print Page | Close Window

_ResizeControls() and CXTPCalendarEvent

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=13443
Printed Date: 05 May 2024 at 1:47pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: _ResizeControls() and CXTPCalendarEvent
Posted By: zitz
Subject: _ResizeControls() and CXTPCalendarEvent
Date Posted: 18 February 2009 at 12:53pm
Hello. I use Xtreme ToolkitPro v13.0.0

void CXTPCalendarControlView::_ResizeControls()

If m_pScrollBar is NULL CalendarCtrl not move to his place,
I wanted to overload _ResizeControls, but m_pScrollBar is private member :(

Why do not you make the storage of records (CalendarEvents) in the CalendarControl like in ReportControl? Now is to safety
and this is TOO SLOW...
Like ReportControl I want:
virtual CXTPCalendarEvent* AddEvent(CXTPCalendarEvent* pEvent);
(virtual CXTPReportRecord* AddRecord(CXTPReportRecord* pRecord);)
CXTPCalendarEvents* GetEvents() const;
(CXTPReportRecords* GetRecords() const;)
I need BOOL SetVisible(BOOL bVisible) and BOOL SetLocked(BOOL bLocked) at CXTPCalendarEvent

I very need virtual void GetItemMetrics(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pItemMetrics) at CXTPCalendarEvent. (for example, you use virtual void GetEventColors at CXTPCalendarThemeOffice2007::CTODayViewEvent_SingleDay for this)
Now I have to override 6 classes!!!!!!!!!
class CTODay_MultiDay : public CXTPCalendarThemeOffice2007::CTODayViewEvent_MultiDay
class CTODay_SingleDay : public CXTPCalendarThemeOffice2007::CTODayViewEvent_SingleDay
class CTOMonth_MultiDay : public CXTPCalendarThemeOffice2007::CTOMonthViewEvent_MultiDay
class CTOMonth_SingleDay : public CXTPCalendarThemeOffice2007::CTOMonthViewEvent_SingleDay
class CTOWeek_MultiDay : public CXTPCalendarThemeOffice2007::CTOWeekViewEvent_MultiDay
class CTOWeek_SingleDay : public CXTPCalendarThemeOffice2007::CTOWeekViewEvent_SingleDay
I dont use m_Sink.Advise becouse is TOO SLOW!
Why you not add 1 class for all views? Like CXTPReportRow?

I need void SelectDate( COleDateTime dtFrom, COleDateTime dtTo ) and void GetDate( COleDateTime* dtFrom, COleDateTime* dtTo ) methods at CXTPCalendarControl. I dont use CalendarController.

a great problem to write a own drag-n-drop in calendar control... For example, how can i disable copy feature at drag-n-drop (ctrl+move event)? And how to do own copy feature when i drop my data to calendar?



Replies:
Posted By: mdoubson
Date Posted: 05 March 2009 at 1:21pm
I already answer somethere about this bug - it was fixed Feb, 25 and I publish the fix for MFC source - same as in SVN:
add following lines as end of function void CXTPCalendarControlView::_ResizeControls()
...............................................................................................................................

else //no scrollbar

{

if (bRightToLeft)

GetCalendarCtrl().MoveWindow(nScroll, nCalendarY, cx - nScroll, max(0, cy - nCalendarY));

else

GetCalendarCtrl().MoveWindow(0, nCalendarY, cx - nScroll, max(0, cy - nCalendarY));

}

}

}



-------------
Mark Doubson, Ph.D.


Posted By: zitz
Date Posted: 27 May 2009 at 4:43am
Originally posted by zitz zitz wrote:

Why do not you make the storage of records (CalendarEvents) in the CalendarControl like in ReportControl? Now is to safety
and this is TOO SLOW...
Like ReportControl I want:
virtual CXTPCalendarEvent* AddEvent(CXTPCalendarEvent* pEvent);
(virtual CXTPReportRecord* AddRecord(CXTPReportRecord* pRecord);)
CXTPCalendarEvents* GetEvents() const;
(CXTPReportRecords* GetRecords() const;)
I need BOOL SetVisible(BOOL bVisible) and BOOL SetLocked(BOOL bLocked) at CXTPCalendarEvent

I very need virtual void GetItemMetrics(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pItemMetrics) at CXTPCalendarEvent. (for example, you use virtual void GetEventColors at CXTPCalendarThemeOffice2007::CTODayViewEvent_SingleDay for this)
Now I have to override 6 classes!!!!!!!!!
class CTODay_MultiDay : public CXTPCalendarThemeOffice2007::CTODayViewEvent_MultiDay
class CTODay_SingleDay : public CXTPCalendarThemeOffice2007::CTODayViewEvent_SingleDay
class CTOMonth_MultiDay : public CXTPCalendarThemeOffice2007::CTOMonthViewEvent_MultiDay
class CTOMonth_SingleDay : public CXTPCalendarThemeOffice2007::CTOMonthViewEvent_SingleDay
class CTOWeek_MultiDay : public CXTPCalendarThemeOffice2007::CTOWeekViewEvent_MultiDay
class CTOWeek_SingleDay : public CXTPCalendarThemeOffice2007::CTOWeekViewEvent_SingleDay
I dont use m_Sink.Advise becouse is TOO SLOW!
Why you not add 1 class for all views? Like CXTPReportRow?

I need void SelectDate( COleDateTime dtFrom, COleDateTime dtTo ) and void GetDate( COleDateTime* dtFrom, COleDateTime* dtTo ) methods at CXTPCalendarControl. I dont use CalendarController.

What about this?



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