FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Codejock RibbonBar first tests
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Codejock RibbonBar first tests
Posted: Mon Apr 06, 2009 08:01 AM
There was a memory leak in Class TActiveX. It has been detected and fixed :-)

Next FWH build will include this fix.

In Class TActiveX this new Method has to be included:

Code (fw): Select all Collapse
    METHOD Destroy() INLINE ActXEnd( ::hActiveX ), Super:Destroy()


And replace this module in FiveHCM.lib (Microsoft):
http://www.mediafire.com/?sharekey=414c ... 6e282a0ee8

Or this module in FiveHC.lib (Borland):
http://www.mediafire.com/?sharekey=414c ... 8114394287
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Codejock RibbonBar first tests
Posted: Mon Apr 06, 2009 08:05 AM
Dear Mr.Antonio,

Are you using 12.1.1 or 13.0.0 ?

I am using 12.1.1 and is working fine on PC's If I run the CodeJock Setup. I have not tried Ver 13.0.0 and shall try

Regards

Anser
Posts: 392
Joined: Tue Mar 10, 2009 11:54 AM
Re: Codejock RibbonBar first tests
Posted: Mon Apr 06, 2009 02:51 PM

Antonio,

<<I really want to know, how Lailton, Richard, or who else has discovered this know how

<You can inspect all properties, methods and events from Microsoft Word VBA: viewtopic.php?p=78087#p78087

Thank you for the tip, but IMO it's more efficient to use the Codejock help file!?

I was reflecting to the technic to catch the events of the RibbonBar, not the other things you can relative easily find in the documentation.

Here another question of this manner:
How can I handle the 'PaneClick' event which occurs when a StatusBarPane object on the StatusBar control is clicked.
Is it possible to adap the same technic as used for the RibbonBar events? If so, how?

Windows 11 Pro 22H2 22621.1848

Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384

Harbour 3.2.0dev (r2008190002)

FWH 23.10 x86
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Codejock RibbonBar first tests
Posted: Wed Apr 08, 2009 10:20 AM
Hi,

Can anybody help me to do this in FWH. As per the write up in the CodeJock site, the property CommandBarsGlobalSettings.License should be set before the CommandBarControl is initialized. In VB this is done using the Private Sub Form_Initialize()

Writeup from the site with VB 6 Sample
The licence code should be included before any controls are created, for example, in the Form_Initialize event of the main form for Visual Basic 6.0. For simplicity, the code below demonstrates how to embed the license information for the CommandBars only, you will need to do this for each control you use.

Visual Basic 6.0

Private Sub Form_Initialize()

CommandBarsGlobalSettings.License = "CommandBars Control Copyright (c) " & _
"2003-2006 Codejock Software" & vbCrLf & "PRODUCT-ID: " & _
"Codejock.CommandBars.ActiveX.v10.20" & vbCrLf & _
"VALIDATE-CODE: XXX-XXX-XXX-XXX"

End Sub


C# Sample
In the constructor for your main form, place the following code BEFORE the call to the 'InitializeComponents' method.

// Create Instance of Global Settings Class for CommandBars
XtremeCommandBars.CommandBarsGlobalSettingsClass settings = new XtremeCommandBars.CommandBarsGlobalSettingsClass();
// Now enter the first three lines of your license file
// (Note carriage return line feed '\r\n' at the end of each line)
settings.License = "CommandBars Control Copyright (c) 2003-2004 Codejock Software\r\n" +
"PRODUCT-ID: XCB-ESD-ACTX-9500\r\n" +
"VALIDATE-CODE: XXX-XXX-XXX-XXX";

This same technique must also be used for any other Codejock ActiveX controls. It also appears that this step is only necessary on the main form of the application. I have other classes stored in DLL's that also use the Codejock controls, and I was not required to set the licenses individually for each one. I guess they truly are Global Settings


But in FWH how do we access the properties of an Activex control before the following code

Code (fw): Select all Collapse
oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.12.1.1", 0, 0, 0, 0 )


Or any idea when is this control getting initialised, do the above command Initialize the control

How do I execute the below given FWH code, before Initialising the controls ? That's where I am struck
Code (fw): Select all Collapse
oAct:SetProp("CommandBarsGlobalSettings.License", ;
    "CommandBars Control Copyright (c) " + ;
    "2003-2006 Codejock Software" +CRLF+ "PRODUCT-ID: " + ;
    "Codejock.CommandBars.ActiveX.v10.20" + CRLF +;
    "VALIDATE-CODE: XXX-XXX-XXX-XXX"

I understand that, If you need to use CodeJock Controls in your FWH application and then distribute the application to your clients, then this process has to be done ie the Licence code should be hard coded in our FWH application.

Do Anybody here has used CodeJock control along with FWH and done the distributions to clients.

Regards

Anser
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Codejock RibbonBar first tests
Posted: Thu Apr 16, 2009 07:22 AM
Hi All,

This is a Ribbonbar+Calendar simple screen shot.





Please visit my Ribbonbar sample code and add these lines.

Code (fw): Select all Collapse
local oAct2

        oAct2 := TActiveX():New( oWnd, "Codejock.CalendarControl.12.1.1", 150, 0, 1000, 550 )



Richard
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Codejock RibbonBar first tests
Posted: Thu Apr 16, 2009 07:29 AM
Anser,

You may try:
Code (fw): Select all Collapse
oSettings = oAct:GetProp( "CommandBarsGlobalSettings" ) // it returns an OleAuto object

oSettings:License = "CommandBars Control Copyright (c) " + ;
    "2003-2006 Codejock Software" +CRLF+ "PRODUCT-ID: " + ;
    "Codejock.CommandBars.ActiveX.v10.20" + CRLF +;
    "VALIDATE-CODE: XXX-XXX-XXX-XXX"
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Codejock RibbonBar first tests
Posted: Thu Apr 16, 2009 07:30 AM
Richard,


local oAct2

oAct2 := TActiveX():New( oWnd, "Codejock.CalendarControl.12.1.1", 150, 0, 1000, 550 )

Thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 514
Joined: Sun Oct 16, 2005 03:32 AM
Re: Codejock RibbonBar first tests
Posted: Fri Apr 17, 2009 05:39 PM
Antonio,


oSettings = oAct:GetProp( "CommandBarsGlobalSettings" ) // it returns an OleAuto object


Doesn´'t work.

[errsysw.prg->ERRORDIALOG] (78) Called from:
errsysw.prg->(b)ERRORSYS(49)
win32ole.prg->TOLEAUTO:COMMANDBARSGLOBALSETTINGS(0)
->__OBJSENDMSG(0)
->ACTXGETPROPERTY(0)
.\source\classes\ACTIVEX.PRG->(b)TACTIVEX:TACTIVEX(0)
->TACTIVEX:GETPROP(0)
MSTMASIV.prg->MAIN(211)
Type: C >>>COMMANDBARSGLOBALSETTINGS<<<
Type: C >>>DISP_E_PARAMNOTOPTIONAL<<<
Type: N >>> 0<<<

Regards,

Carlos Gallego

Saludos,



Carlos Gallego



*** FWH-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Codejock RibbonBar first tests
Posted: Fri Apr 17, 2009 09:27 PM
Carlos,

This way we can access the GlobalSettings of the CommandBars:
Code (fw): Select all Collapse
   oSettings = oActiveX : GetProp( "GlobalSettings" )
   MsgInfo( oSettings:Version )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Codejock RibbonBar first tests
Posted: Tue Apr 28, 2009 07:47 AM
Hi,

Has anybody here used CodeJock in your FWH app. and distributed it in your client PC's. I still have not found a solution to activate the licence through code. ( For the time being, it is working, if I distribute the .lic license file along with the OCX control. Thanks to Mr.Natter) But using VB and other prog.lang we can access the members of the control even before the control is initialised. I don't know how to do that using FWH.

It appears that the problem I'm having is that you can't access the public members of CommandBars until after the control is fully initialized. Trying to access them before full initialization throws an error. However, when you finalize the control, it looks for the license. It appears I'm stuck! I can't set the license before initialization without throwing an error, and I can't initialize the control without a license.

Regards
Anser
Posts: 41
Joined: Thu Dec 22, 2005 07:39 AM
Re: Codejock RibbonBar first tests
Posted: Wed Apr 29, 2009 11:21 AM
Hello!
Anser, may be it's not a good solution, but if in the begining of example "ribonbar.prg" insert this:
Code (fw): Select all Collapse
   oText := TTxtFile():New( "Codejock.CommandBars.v12.1.1.lic" )
   if oText:Open()
      oText:Add( "CommandBars Control Copyright (c) 2003-2008 Codejock Software" )
      oText:Add( "PRODUCT-ID: Codejock.CommandBars.ActiveX.v12.1" )
      oText:Add( "VALIDATE-CODE: XXX-XXX-XXX-XXX" )
      oText:Close()
   endif

and then after all controls defining
Code (fw): Select all Collapse
   ACTIVATE WINDOW oWnd ON init(ferase("Codejock.CommandBars.v12.1.1.lic"))

it seems, that everithing work fine...
Best regards!

Sergey (Loach) Abelev

fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Codejock RibbonBar first tests
Posted: Wed Apr 29, 2009 01:08 PM

Mr.Sergey,

Thankyou for this bright idea. I think this is the only solution as of now. I don't know whether it is the limitation of Harbour/xHarbour

Regards
Anser

Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: Codejock RibbonBar first tests
Posted: Fri May 01, 2009 05:04 AM

Hi Friends,

Has anybody tried Office2003 theme in Codejock ? If so, please guide me how to do it.

Thanks,

  • Ramesh Babu P
Posts: 42
Joined: Fri Oct 21, 2005 02:12 PM
Re: Codejock RibbonBar first tests
Posted: Fri May 08, 2009 10:16 AM
To have acess to the CommandBarsGlobalSettings on Form Initialize Event add the following code:
Code (fw): Select all Collapse
    LOCAL GLOBALSettings:= NIL
      GlobalSettings:= CreateObject("Codejock.CommandbarsGlobalSettings.13.0.0")
       WiTH OBJECT GlobalSettings
          :License:= "CommandBars Control Copyright (c) " + ;
          "2003-2006 Codejock Software" +CRLF+ "PRODUCT-ID: " + ;
          "XCB-ESD-ACTX-9600" + CRLF + "VALIDATE-CODE: XXX-XXX-XXX-XXX"
       END WITH

You will need to provide the correct Product Id and Validate Code. This information can be found in the LIC file.
This code must be added BEFORE OBJECT INITIALIZATION

:-) Best Regards
Dionisis
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Codejock RibbonBar first tests
Posted: Sat May 09, 2009 05:29 AM
Mr.Dionisis,

Thank you very much. It is working perfectly.

Regards

Anser