![]() |
Select NONE |
Post Reply
|
| Author | |
gmail
Groupie
Joined: 24 February 2008 Status: Offline Points: 45 |
Post Options
Thanks(0)
Quote Reply
Topic: Select NONEPosted: 15 March 2009 at 4:20pm |
|
How can we deselect everything (including cell selection with no event on it) on Calendar Control? The reason I'm asking is when we print out Calendar there's also that 'empty selection' shown on printer page? Check the attached image to see what I mean... Thanks for replying!
|
|
![]() |
|
zitz
Senior Member
Joined: 05 October 2008 Status: Offline Points: 112 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 May 2009 at 4:51am |
|
?
|
|
![]() |
|
mdoubson
Senior Member
Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
Quote Reply
Posted: 21 August 2009 at 12:16am |
|
I think we already get rid from such artefacts - now there is no way to create event without data - just start and end time is not enough
|
|
![]() |
|
Algae
Senior Member
Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 September 2010 at 2:50pm |
|
Actually that bug still exists.
Here's how I tried to get rid of it. CCalendarView is whatever you've called the CView for your calendar. My addition in blue. It DOES NOT work as expected. So the question to CJ is, how does one turn off the selection box? Especially for printing! It's not a question of an event existing or not, it's how to turn off the highlighting on a non-event when necessary. void CCalendarView::OnFilePrintPreview() { GetDocument()->m_bPreview = TRUE; CXTPCalendarView* pView = DYNAMIC_DOWNCAST(CXTPCalendarDayView, GetCalendarCtrl().GetActiveView()); if (pView) { pView->ResetSelection(); pView->RedrawControl(); } CPrintPreviewState* pState = new CPrintPreviewState; if ( !DoPrintPreview( XTP_IDD_PREVIEW_DIALOGBAR, this, RUNTIME_CLASS( CXTPPreviewView ), pState )) { TRACE0( "Error: DoPrintPreview failed.\n" ); AfxMessageBox( AFX_IDP_COMMAND_FAILURE ); delete pState; // preview failed to initialize, delete State now } } As you can see, ResetSelection removes any selection. |
|
![]() |
|
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 |