Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - disable the "Click to add appointment"
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

disable the "Click to add appointment"

 Post Reply Post Reply
Author
Message
Makarand View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 February 2007
Location: India
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Makarand Quote  Post ReplyReply Direct Link To This Post Topic: disable the "Click to add appointment"
    Posted: 16 December 2008 at 12:17am
Hi Oleg,

How can I disable the "Click to add appointment" functionality?
see the attached image for the detail.



Waiting for reply.
- Mak
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2008 at 8:48am
Hi Mak,

Add following piece of code in your Calendar views OnInitialUpdate()

GetCalendarCtrl().GetCalendarOptions()->bEnableAddNewTooltip = FALSE;

Cheers
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: 19 December 2008 at 3:42pm
Hi, Mak,
GetCalendarCtrl().GetCalendarOptions()->bEnableAddNewTooltip = FALSE;
will eliminate in-place editing but OnClick still generate New Event Dialog call - same as context menu with Add New Event item
 
What do you really want to keep?
 
Looks like flag bEnableAddNewTooltip not working in current version but another flag -
GetCalendarCtrl().GetCalendarOptions()->bEnableInPlaceCreateEvent = FALSE;
works - (I tested it)
 
About OnClick and ContextMenu events:
Calendar Control only send Notification to User View, e.g.

void CCalendarDemoView::AddNewEvent(...)

{

CXTPCalendarEventPropertiesDlg dlg(&GetCalendarCtrl(), TRUE, this);

}
Inside this code - before dlg - you can implement your own logic and immediately return if don't want dialog appears. Same for ContextMenu - for you business logic you can delete Add Event menu item if needed.
 
Looks like I covered all your cases - right?
Resume - set flag bEnableInPlaceCreateEvent FALSE to get rid from in-place event creation and implement your own logic in your code to allow or not OnClick and On Context Menu CXTPCalendarEventPropertiesDlg calls
 

 

Back to Top
KumarCJ View Drop Down
Groupie
Groupie
Avatar

Joined: 02 April 2007
Location: India
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote KumarCJ Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2009 at 2:36am

Hello Codejock Team,

We are using "Xtreme ToolkitPro v12.1.1".

We are using below code for not displaying "Click to add appointment" tooltip in our application.
((CXTPCalendarControl*)this)->GetCalendarOptions()->bEnableAddNewTooltip = FALSE;

This code is working fine in debug/release mode of vc++ 6.0  for all the developer machine and testers machines and having same directory settings, but when we use the same build exe with same codejock lib on other machine the issue arises.

When we build our application on build machine which is having same directory settings and same files in debug/release both the mode and try to run the our application exe.

[Issue]: "Click to add appointment" tooltip is appearing on calendar.

After this we tried using below code as suggested by Mark on "https://forum.codejock.com/search_results_posts.asp?SearchID=20090402013753&KW=bEnableInPlaceCreateEvent"

((CXTPCalendarControl*)this)->GetCalendarOptions()->bEnableInPlaceCreateEvent = FALSE;

I wanted to know why it is good to use "((CXTPCalendarControl*)this)->GetCalendarOptions()->bEnableInPlaceCreateEvent = FALSE;" instead of using "((CXTPCalendarControl*)this)->GetCalendarOptions()->bEnableAddNewTooltip = FALSE;"

Please let us know the reason behind this.

[Note:] We did not tried "((CXTPCalendarControl*)this)->GetCalendarOptions()->bEnableInPlaceCreateEvent = FALSE;" on or build machine. Will try and let you know the result.

Back to Top
KumarCJ View Drop Down
Groupie
Groupie
Avatar

Joined: 02 April 2007
Location: India
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote KumarCJ Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2009 at 10:47am

Note:

We are building our application on vista 64 bit.

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: 02 April 2009 at 11:01am
Switch on Vista32 to be sure you are using trasted platform
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.156 seconds.