Print Page | Close Window

CXTPCalendarCaptionBarControl

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


Topic: CXTPCalendarCaptionBarControl
Posted By: haime
Subject: CXTPCalendarCaptionBarControl
Date Posted: 23 April 2013 at 3:16am
Hi,
 
I've just started to use the toolkit, and specifically the Calendar control, in an MFC environment (VS2010).
 
I embeded the Calendar control object (CXTPCalendarControl) in a popup dialog (not using CView), but I don't see the CaptionBar control.
 
According to the docs:
CXTPCalendarCaptionBarControl represents CalendarCaptionBar control and used as a part of mk:@MSITStore:C:%5CProgram%20Files%20%28x86%29%5CCodejock%20Software%5CMFC%5CXtreme%20Calendar%20Pro%20v15.3.1%5Chelp%5CSymbolReference.chm::/CXTPCalendarControl.html" rel="nofollow -



Replies:
Posted By: etiennepaquette
Date Posted: 06 May 2013 at 2:45pm
Hi,

do you figure how to show the Calendar Caption bar in a dialog without using the CView. I try to do exactly the same thing as you and i don't find the way to do it.

Thanks for any hints




Posted By: haime
Date Posted: 01 June 2013 at 3:14pm
1. In Resouce View, select "Custom Control" and position it on the dialog.
2. Go to the control properties and in the "Class Name" put "XTPCalendar"
3. Right click on the control + "Add variable"
4. Add a control variable with type "CXTPCalendarControl"
5. Call member functions by using the member variable
 
Do the above sequance for the "CXTPCalendarCaptionBarControl" (use "XTPCalendarCaptionBar" for "Class Name".
 
Now connect the two by using the following code:
 

      // Connect between the calendar control and the caption bar

      m_CaptionBar.GetTheme()->AttachCalendar(&m_Calendar);

 

      // Position CaptionBar at the top of the Calendar control

      CRect rcCalendar, rcCaptionBar;

      m_Calendar.GetWindowRect(&rcCalendar);

      ScreenToClient(&rcCalendar);

      rcCaptionBar = m_CaptionBar.CalcMinRect(FALSE);

      rcCaptionBar.MoveToXY(rcCalendar.TopLeft());

      rcCaptionBar.right = rcCalendar.right;

      rcCalendar.top = rcCaptionBar.bottom + 1;

      m_Calendar.MoveWindow(&rcCalendar);

      m_CaptionBar.MoveWindow(&rcCaptionBar);

 

 
Enjoy.
 



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