Print Page | Close Window

AttachToCalendar

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=6141
Printed Date: 07 July 2025 at 12:37am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: AttachToCalendar
Posted By: jprescott
Subject: AttachToCalendar
Date Posted: 17 January 2007 at 3:39am

we're using progress openedge and got most of this to work except for the attachtocalendar...

currently both the datepicker and calendarcontrol are on the same frame but the following doesn't work
 
chx  = chCalendarControl.
chDatePicker:DatePicker:AttachToCalendar(chx).
 
 
chCalendarControl and chDatePicker are both com-handles for both products....the most bizarre thing is that it initially did work with the evaluation product but once we purchased it and re-inserted the full unlimited version of the ocx's we then started getting problems...any ideas? as far as i know this is the original code and no one has changed it...



Replies:
Posted By: sserge
Date Posted: 17 January 2007 at 3:51pm
AttachToCalendar() implementation receives IDispatch pointer to some object - CalendarControl or some auxiliary object.
To be sure, implementation calls QueryInterface(IID_DCalendarControl) for this object to retrieve _DCalendarControl.
 
CalendarControl is a class with default interface _DCalendarControl. VB, for example, uses CalendarControl instead of _DCalendarControl.
 
NOTE: For a case when Calendar is not inserted directly, but some wrapper class is used (like in Access or C#) you have to retrieve pointer to CalendarControl object from the wrapper object.
 
For example in Access I have to call:

wndDatePicker.AttachToCalendar wndCalendar.Object

 
in C#:

CalendarControl pCalendarOcx = ((CalendarControl)(wndCalendarControl.GetOcx()));
wndDatePicker.AttachToCalendar(pCalendarOcx);


Something similar should work for Progress Openedge.

--
WBR,
Serge



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