Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - AttachToCalendar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AttachToCalendar

 Post Reply Post Reply
Author
Message
jprescott View Drop Down
Newbie
Newbie
Avatar

Joined: 17 January 2007
Location: United Kingdom
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jprescott Quote  Post ReplyReply Direct Link To This Post Topic: AttachToCalendar
    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...
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
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.141 seconds.