CXTPCalendarCaptionBarControl |
Post Reply |
Author | |
haime
Newbie Joined: 23 April 2013 Status: Offline Points: 3 |
Post Options
Thanks(0)
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:
How can I make it visible? How can I access the CXTPCalendarCaptionBarControl members? Thanks.
|
|
etiennepaquette
Newbie Joined: 06 May 2013 Location: Canada Status: Offline Points: 3 |
Post Options
Thanks(0)
|
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 |
|
haime
Newbie Joined: 23 April 2013 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |