Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - _ResizeControls() and CXTPCalendarEvent
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

_ResizeControls() and CXTPCalendarEvent

 Post Reply Post Reply
Author
Message
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post Topic: _ResizeControls() and CXTPCalendarEvent
    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?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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));

}

}

}

Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post 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?
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.188 seconds.