bb.donnay-software.com

Donnay Software Web Forums
It is currently Sat Aug 17, 2019 2:44 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Feb 26, 2010 9:44 am 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1133
hi,

i knew that Codejock.CalendarDialogs.13.x.x can create a "internal" Edit Dialog,
Attachment:
File comment: Codejock.CalendarDialogs
CJ_Dialog.JPG
CJ_Dialog.JPG [ 116.19 KiB | Viewed 4577 times ]

but still i can not get it in Xbase++ :(

did someone found a Solution ?

here some WinDev (http://www.windev.com/) Code how to get Codejock.CalendarDialogs

Code:
// this is WinDev Code

PROCEDURE DTPDblClick()

oDialogs is object Automation dynamic
// oDialogs = new object automation "Codejock.CalendarDialogs.13.0.0"
oDialogs = new object Automation "{40DD8A69-ECB7-43BF-904C-65DE08A8C302}"

// oActiveView is object Automation dynamic = AX_ActiveX1>>ActiveView
// nNo         is numeric = AX_ActiveX1>>ActiveView>>HitTest>>HitCode
oHitTest    is object Automation dynamic = AX_Calender>>ActiveView>>HitTest
//
// assign Dialogs to Calender
//
oDialogs>>Calendar = AX_Calender

IF oHitTest>>ViewEvent <> Null THEN
  oDialogs>>ShowEditEvent( oHitTest>>ViewEvent>>Event )
ELSE
  oDialogs>>ShowNewEvent
END
//
// show Result in Calender
//
AX_Calender>>Populate

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
PostPosted: Wed Jul 21, 2010 7:22 pm 
Offline
User avatar

Joined: Wed Feb 24, 2010 3:44 pm
Posts: 1133
hi,

i think i found the Differenz
Code:
#define CJ_CAL    "Codejock.CalendarControl.13.x.x"
#define CJ_LIC    "Calendar Control Copyright (c) 2003-2009 Codejock Software" + CHR( 13 ) + CHR( 10 ) + ;
                  "PRODUCT-ID: Codejock.Calendar.ActiveX.vxx.0" + CHR( 13 ) + CHR( 10 ) + ;
                  "VALIDATE-CODE: xxx-xxx-xxx-xxx"

#PRAGMA LIBRARY( "ASCOM10.LIB" )

PROCEDURE APPSYS
RETURN

PROCEDURE MAIN(cNo)
...
DEFAULT cNo TO "2"

   nNo := VAL(cNo)
   DO CASE
      CASE nNo == 1
      //
      // will crash @ oDialog
      //
      oCalCon   := XbpActiveXControl():new( oDlg:drawingArea,, {0,0},{aSize[1]-10,aSize[2]-30} )
      oCalCon:CLSID   := CJ_CAL
      oCalCon:License := CJ_LIC
      oCalCon:create()

      CASE nNo == 2
      //
      // use CreateObject and :DynamicCast( ActiveXObject() )
      //
      oCalCon   := CreateObject(CJ_CAL,,CJ_LIC)
      oCalCon   := oCalCon:DynamicCast( ActiveXObject() )
   ENDCASE

   ErrorBlock( {|e| Break(e)} )
   BEGIN SEQUENCE
      ohWnd := oCalCon:getProperty("hWnd")
   RECOVER USING oError
      MsgBox("Error hWnd()")
      ErrorBlock( bSaveError )
   END SEQUENCE
   ErrorBlock( bSaveError )

   ErrorBlock( {|e| Break(e)} )
   BEGIN SEQUENCE
      //
      // internal Dialogs
      //
      oDialogs  := CreateObject("Codejock.CalendarDialogs.13.x.x")
      //
      // works : AutomationObject:setProperty("Prop", AutomationObject )
      //
      // crash : AutomationObject:setProperty("Prop", XbpActiveXControl() )
      //
      oDialogs:Calendar := oCalCon

      //
      // show internal Dialog
      //
      oDialogs:ShowNewEvent()     // might in Backgound ... use ALT-TAB

     RECOVER USING oError
         MsgBox("Error oDialogs()")
         ErrorBlock( bSaveError )
     END SEQUENCE
     ErrorBlock( bSaveError )

   ENDIF

   IF IsMemberVar(oCalCon, "Options")
      oOptions  := oCalCon:Options()
      oOptions:FirstDayOfTheWeek := xtpCalendarDayMonday  // "XBCJCAL.CH"
   ELSE
      //
      // only XbpActiveXControl() can ":SubClass" Property "Options"
      //
      // CreateObject() and AutomationObject() does not get Property
      //
      MsgBox("No Property Options()")
   ENDIF

   oDlg:show()
this Way (nNo = 2) you can show "internal" Dialog, but than no Property or Methode are found :think:
i did other activeX with CreateObject(CJ_CAL,,CJ_LIC) / o:DynamicCast( ActiveXObject() ) which work fine ...

if both, Calendar and Dialogs, are AutomationObject() you can use :SetProperty().
you can not use a XbpActiveXControl() as Property for a AutomationObject()
Code:
Super Class
         AutomationObject() by CreateObject()
         // using
         oObj := oObj:dynamicCast( ActiveXObject() )
         ->
         Sub Class
               ActiveXObject()
               // using
               oObj := oObj:???  // what ... ???
               ->
               Sub Class
                      XbpActiveXControl()

how do i get from ActiveXObject() to XbpActiveXControl() ???
what is the Differenz between ActiveXObject() and XbpActiveXControl() ?

_________________
greetings by OHR
Jimmy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group