Codejock RibbonBar first tests

User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: Codejock RibbonBar first tests

Post by richard-service »

Add Press ALT key and show Keyboard

Image

Richard
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Codejock RibbonBar first tests

Post by Otto »

Hello Richard,

I would like to thank you for your work on the RIBBONBAR.
Is it possible to get the source code for the new features from you.

I still have one application in use which I made with VB.NET and CodeJock which I
want to convert to FWH.
Do you have experience how speed behaviour of a realword application is if you use RIBBONBAR insteat of FWs REBAR,TAB, BUTTONBAR, etc.

I also used BUBBLEBAR.
Do you know if it is also possible to use the BUBBLEBBAR ocx with FWH.


Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post by anserkk »

Hi,

Do anybody know about the limitations in the Trial version of CodeJock control.

Regards

Anser
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: Codejock RibbonBar first tests

Post by richard-service »

anserkk wrote:Hi,

Do anybody know about the limitations in the Trial version of CodeJock control.

Regards

Anser
Hi

Trial version only show license demo information Dialog when your application run Codejock ActiveX.
That's all.

Regards,

Richard
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: Codejock RibbonBar first tests

Post by richard-service »

Otto wrote:Hello Richard,

I would like to thank you for your work on the RIBBONBAR.
Is it possible to get the source code for the new features from you.

I still have one application in use which I made with VB.NET and CodeJock which I
want to convert to FWH.
Do you have experience how speed behaviour of a realword application is if you use RIBBONBAR insteat of FWs REBAR,TAB, BUTTONBAR, etc.

I also used BUBBLEBAR.
Do you know if it is also possible to use the BUBBLEBBAR ocx with FWH.


Thanks in advance
Otto
HI

yes, I will show source code.
I have my friend Codejock solution LIB support RibbonBar,Menu+ToolBar,OutLookbar,ExploreBar
I think Codejock insteat of FWH functions. But sorry, LIB not free.
Maybe BUBBLEBAR can do it.

Regards,

Richard
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Codejock RibbonBar first tests

Post by Daniel Garcia-Gil »

Quick Access...

Image

Code: Select all

#include "FiveWin.ch"
#define xtpControlError              0
#define xtpControlButton             1
#define xtpControlPopup              2
#define xtpControlButtonPopup        3
#define xtpControlSplitButtonPopup   4
#define xtpControlComboBox           5
#define xtpControlEdit               6
#define xtpControlCustom             7
#define xtpControlLabel              8
#define xtpControlCheckBox           9
#define xtpControlGallery           10
#define xtpControlRadioButton       11

#define xtpImageNormal               0
#define xtpImageDisabled             1
#define xtpImageHot                  2
#define xtpImageChecked              3
#define xtpImagePressed              4


function Main()  

   local oWnd, oAct, oRb, oTabFiles, oTabEdit, oTabBuild, oIcons
   local oGroup1, oGroup2, oButton1, oButton2, aButtons := {}
   local oButton3, oButton4, oBmp1, oBmp2, oBmp3
   
   local oMini
   
   local oStatusBar, oToolTipContext

   DEFINE WINDOW oWnd
   
  obmp1 := TBitmap():Define( , "c:\fivewin\ver903\fwh\bitmaps\16x16\new2.bmp", oWnd )
  obmp2 := TBitmap():Define( , "c:\fivewin\ver903\fwh\bitmaps\16x16\open2.bmp", oWnd )
  obmp3 := TBitmap():Define( , "c:\fivewin\ver903\fwh\bitmaps\alphabmp\explorer.bmp", oWnd )


   oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.12.1.1", 0, 0, 0, 0 )  
   
   //@ 0, 0 ACTIVEX oAct PROGID "Codejock.CommandBarsFrame.12.1.1" OF oWnd


   oAct:bOnEvent = { | cEvent, aParams, pParams | RibbonBarEvent( cEvent, aParams, pParams, aButtons ) }

   oAct:Do( "AttachToWindow", oWnd:hWnd )
   
   oAct:Do( "EnableOffice2007Frame", .T. )
   oAct:Do( "VisualTheme", .T. )

           
   // ToolTipContext - Richard          
   oToolTipContext := TOleAuto():New( ActXPdisp( oAct:hActiveX ) )
   oToolTipContext := oToolTipContext:ToolTipContext()
   oToolTipContext:Style = 5  && xtpToolTipOffice2007
   oToolTipContext:ShowTitleAndDescription( .T., 0 )
   oToolTipContext:ShowImage( .T., 10000 )
   oToolTipContext:SetMargin( 2, 2, 2, 2 )
   oToolTipContext:MaxTipWidth = 180
   
   // StatusBar-Richard
   oStatusBar := TOleAuto():New( ActXPdisp( oAct:hActiveX ) )
   oStatusBar:StatusBar:Visible = .T.

   oStatusBar:StatusBar:AddPane( 0 )
   oStatusBar:StatusBar:AddPane( 59137 )
   oStatusBar:StatusBar:AddPane( 59138 )
   oStatusBar:StatusBar:AddPane( 59139 )  
   oStatusBar:StatusBar:IdleText = "FWH support Codejock RibbonBar"      
   
   
   oIcons := oAct:Do( "icons" )
  
   
   oIcons:AddBitmap( oBmp1:hBitmap,1,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp2:hBitmap,2,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp3:hBitmap,3,xtpImageNormal,.t. ) // 4th param, Bool to Alpha Channel Support
   oIcons:LoadBitmap( "c:\fivewin\ver903\fwh\bitmaps\32x32\edit.bmp",4, xtpImageNormal)
 
   //oAct:Hide()

   oRb = oAct:Do( "AddRibbonBar", "fwh" )
   
// QuickAccess 
   
   oQBtn1 := oRb:QuickAccessControls:Add( xtpControlButton,1,"" )
   oQBtn2 := oRb:QuickAccessControls:Add( xtpControlButton,2,"" )
   oQBtn3 := oRb:QuickAccessControls:Add( xtpControlButton,3,"" )

 
   // Sysbutton - Lailton
   Sbutton:=oRb:AddSystemButton()
   Sbutton:IconId( 2 )
   nCmb       := Sbutton:Commandbar
   Controls   := nCmb:Controls
   Controls:Add(1,1,"Menu item 1",1)  
   Controls:Add(1,1,"Menu item 2",1)  


   oTabFiles = oRb:InsertTab( 0, "&Files" )  
   oTabEdit  = oRb:InsertTab( 1, "&Edit" )  
   oTabBuild = oRb:InsertTab( 2, "&Build" )  
   
   oGroup1 = oTabFiles:Groups:AddGroup( "Test 1", 0 )
   oGroup1:ShowOptionButton = .T.
   
   oGroup2 = oTabFiles:Groups:AddGroup( "Test 2", 1 )  

   oButton1 = oGroup1:Add( xtpControlButton, 2, "First" )
   oButton2 = oGroup1:Add( xtpControlButton, 1, "Second" )
   
   oButton3 = oGroup2:Add( xtpControlButton, 4, NIL )
   oButton4 = oGroup2:Add( xtpControlButton, 3, NIL )
   oButton4:SetIconSize( 64,64 )
   oButton4:Width = 70
   oButton4:Height = 70
   

   
   AAdd( aButtons, oButton1 )
   AAdd( aButtons, oButton2 )
   AADD( aButtons, oQBtn1 )
   AADD( aButtons, oQBtn2 )
   AADD( aButtons, oQBtn3 )      
   

   oButton1:Caption = "FiveWin power!"
   oButton1:TooltipText = "Ribbonbar for FWH"
     
   ACTIVATE WINDOW oWnd
     
return nil

function RibbonBarEvent( cEvent, aParams, pParams, aButtons )

   do case
      case cEvent == "Execute" .and. Len( aButtons ) > 0
           do case
              case aButtons[ 1 ]:hObj == aParams[ 1 ]
                   MsgInfo( "Button 1" )
                   
              case aButtons[ 2 ]:hObj == aParams[ 1 ]
                   MsgInfo( "Button 2" )

              case aButtons[ 3 ]:hObj == aParams[ 1 ]
                   MsgInfo( "From Quick Access Button 1" )

              case aButtons[ 4 ]:hObj == aParams[ 1 ]
                   MsgInfo( "From Quick Access Button 2" + CRLF + "FIVEWIN SHARING POWER" )

              case aButtons[ 5 ]:hObj == aParams[ 1 ]
                   MsgInfo( "From Quick Access Button 3" )
                   
           endcase        
   endcase        
   
return nil 
 
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
frose
Posts: 327
Joined: Tue Mar 10, 2009 11:54 am
Location: Germany, Gütersloh
Contact:

Re: Codejock RibbonBar first tests

Post by frose »

Codejock comes with a very good help file. Here, for example, the use of two methods of the RibbonBar collection:

Code: Select all

   oRibbonBar := oAct:Do( "AddRibbonBar", "fwh" )
   //
   // Enables\disables the Ribbon Office 2007 style themed window frame.
   //
   oRibbonBar:EnableFrameTheme()
   //
   // Gets\sets whether the Quick Access bar is displayed above or below the Ribbon.
   //
   oRibbonBar:ShowQuickAccessBelowRibbon( .T. ) 
 
and the suitable screen shots from the Codejock help file:

Image
Image
Image

But I want to manage some more features, perhaps someone else have found the way of doing :) :
- Add Press ALT key and show Keyboard
- Changing the language to german, must be something like:
oAct:CommandBarsGlobalSettings:ResourceFile( "SuitePro.ResourceDe.dll" ) or
oAct:CommandBarsGlobalSettings:Do( "ResourceFile", "SuitePro.ResourceDe.dll" )
- etc.

Change/10:45: EnableFrameTheme.jpg exchanged!
Last edited by frose on Fri Apr 03, 2009 8:47 am, edited 1 time in total.
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post by anserkk »

Hi,

I wanted to test and know what would happen when we develop an application using FWH along with a third party OCX control.

Anybody here tried to run the generated Sample Exe on a PC other than the Development PC (ie On a PC where the CodeJock Setup is not installed) , assumed to be a user's/client PC

I registered the Codejock.CommandBarsFrame.12.1.1.Ocx Control using the following command on the assumed client's PC

I Created a Folder D:\Test and copied the Test.Exe and the Codejock.CommandBarsFrame.12.1.1.Ocx

Then I registered th OCX control using the following command

RegSvr32 D:\Test\Codejock.CommandBarsFrame.12.1.1.Ocx

and it registered successfully.

But when I try to run the Exe, I get the following error screen.
Image

The exe is working fine in the PC where I installed CodeJock Setup (Development PC)

I inserted the MsgInfo to debug, and found that the error occurs when we try to call the Activex

Code: Select all

MsgInfo("Before Calling the Avtivex")
oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.12.1.1", 0, 0, 0, 0 )  
 
Even the TRY CATCH is not working.

Is there any parameter in TActivex to solve this problem. There should be a licence key and how do you pass the Key thru our application. Any Idea ?

I am getting the same errror message irrespective of registering the OCX, I tested in different PC's. All are Win XP

Regards

Anser
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Codejock RibbonBar first tests

Post by Silvio »

Antonio, and ALL,
Why we must use an activex to use a RIbbonBar control ?
Why We not create together a Ribbon control only on fwh sources ?
I think using an activex it is too heavy and slow.
Perhaps maybe we can together create this control
beginning to create only the bar control
and the insert on down a small folder
Why we not try to create it?
Best Regards, Saludos

Falconi Silvio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock RibbonBar first tests

Post by Antonio Linares »

Silvio,

We may create it, but in the meantime we can use CodeJock's one :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock RibbonBar first tests

Post by Antonio Linares »

Daniel,

Excellent! :-)

Thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Codejock RibbonBar first tests

Post by Antonio Linares »

Anser,

Please register the OCX this way, before creating the ActiveX:

RegisterServer( "Codejock.CommandBars.v12.1.1.ocx" )

or, if using the new version:

RegisterServer( "Codejock.CommandBars.v13.0.0.ocx" )

Code: Select all

#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>

typedef LONG ( * PDLLREGISTERSERVER ) ( void ); 

HB_FUNC( REGISTERSERVER )
{
   HMODULE hDll = LoadLibrary( hb_parc( 1 ) );
   LONG lReturn = 0;
   
   if( hDll )
   {
      FARPROC pRegisterServer = GetProcAddress( hDll, "DllRegisterServer" );
      
      if( pRegisterServer )
         lReturn = ( ( PDLLREGISTERSERVER ) pRegisterServer )();

      FreeLibrary( hDll ); 
   }
   
   hb_retnl( lReturn );
}         

#pragma ENDDUMP
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Codejock RibbonBar first tests

Post by anserkk »

Dear Mr.Antonio,

I tried as suggested by you but unfortunaely the same result

Code: Select all

MsgInfo("Before Calling the Avtivex")
RegisterServer( "Codejock.CommandBars.v12.1.1.ocx" ) 
MsgInfo("After Calling RegisterServer")  // Error occurs after displaying this message
oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.12.1.1", 0, 0, 0, 0 )  
Codejock.CommandBars.v12.1.1.ocx file and the .Exe file is in the same folder.

When I tested in Windows 7, No error but the application never loads

Regards

Anser
Last edited by anserkk on Fri Apr 03, 2009 9:18 am, edited 1 time in total.
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: Codejock RibbonBar first tests

Post by richard-service »

Hi All,

I test some Codejock version. I found some problem.

1.Test Codejock v12.1.0/v12.1.1/v13.0.0
Image

when I press Max or ajust Window Size, appear problem below:
Image

of course, I test v11.2.2
Everhthing work fine.
Image

Regards,

Richard
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
fafi
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Re: Codejock RibbonBar first tests

Post by fafi »

Hi ! All .. Please help !

Try to using Activex.prg but error : numeric has no exported method
then I use this code :

Code: Select all

#include "FiveWin.ch"

#define xtpControlError              0
#define xtpControlButton             1
#define xtpControlPopup              2
#define xtpControlButtonPopup        3
#define xtpControlSplitButtonPopup   4
#define xtpControlComboBox           5
#define xtpControlEdit               6
#define xtpControlCustom             7
#define xtpControlLabel              8
#define xtpControlCheckBox           9
#define xtpControlGallery           10
#define xtpControlRadioButton       11

#define xtpImageNormal               0
#define xtpImageDisabled             1
#define xtpImageHot                  2
#define xtpImageChecked              3
#define xtpImagePressed              4


function Main()  

   local oWnd, oAct, oRb, oTabFiles, oTabEdit, oTabBuild, oIcons
   local oGroup1, oGroup2, oButton1, oButton2, aButtons := {}
   local oButton3, oButton4, oBmp1, oBmp2, oBmp3
   
   local oMini
   
   local oStatusBar, oToolTipContext

DEFINE WINDOW oWnd
   
aControlHandles     := InitActivex( oWnd:hWnd , "Codejock.CommandBarsFrame.12.1.1" , 0 ,0 ,0 ,0 )

nControlHandle      := aControlHandles [1]
nInterfacePointer   := aControlHandles [2]
nAtlDllHandle       := aControlHandles [3]

oOle := CreateObject( nInterfacePointer )

oOle:AttachToWindow(oWnd:hWnd )
oOle:EnableOffice2007Frame := .t.
oOle:VisualTheme := .t.

   oRb := oOle:AddRibbonBar("The Ribbon")

   oRb:EnableFrameTheme()

   oRb:InsertTab( 0, "&Files" )  
   oRb:InsertTab( 1, "&Edit" )  
   oRb:InsertTab( 2, "&Build" )  
   
   Sbutton:=oRb:AddSystemButton()
   Sbutton:IconId( 2 )
   nCmb       := Sbutton:Commandbar
   Controls   := nCmb:Controls
   Controls:Add(1,1,"Menu item 1",1)  
   Controls:Add(1,1,"Menu item 2",1)  
   
   oQBtn1 := oRb:QuickAccessControls:Add( xtpControlButton,1,"" )
   oQBtn2 := oRb:QuickAccessControls:Add( xtpControlButton,2,"" )
   oQBtn3 := oRb:QuickAccessControls:Add( xtpControlButton,3,"" )
   
   oBar := oOle:StatusBar()
   oBar:Visible := .t.

     
   ACTIVATE WINDOW oWnd MAXIMIZED
     
return nil

*------------------------------------------------------------------------------*
* Low Level C Routines
*------------------------------------------------------------------------------*

#pragma BEGINDUMP

#include <windows.h>
#include <commctrl.h>
#include <hbapi.h>
#include <hbvm.h>
#include <hbstack.h>

typedef HRESULT(WINAPI *LPAtlAxGetControl)(HWND hwnd,IUnknown** unk);
typedef HRESULT(WINAPI *LPAtlAxWinInit)(void);


HB_FUNC( INITACTIVEX ) 
{

   HMODULE hlibrary;
   HWND hchild;
   IUnknown *pUnk;
   IDispatch *pDisp;
   LPAtlAxWinInit    AtlAxWinInit;
   LPAtlAxGetControl AtlAxGetControl;

   hlibrary = LoadLibrary( "Atl.Dll" );
   AtlAxWinInit    = ( LPAtlAxWinInit )    GetProcAddress( hlibrary, "AtlAxWinInit" );
   AtlAxGetControl = ( LPAtlAxGetControl ) GetProcAddress( hlibrary, "AtlAxGetControl" );
   AtlAxWinInit();

   hchild = CreateWindowEx( 0, "AtlAxWin",hb_parc(2), WS_CHILD | WS_VISIBLE , hb_parni(3), hb_parni(4), hb_parni(5), hb_parni(6), (HWND)hb_parnl( 1 ) , 0 , 0 , 0 );

   AtlAxGetControl( (HWND) hchild , &pUnk );
   pUnk->lpVtbl->QueryInterface(pUnk,&IID_IDispatch,(void**)&pDisp);

   hb_reta( 3 );
   hb_stornl( (LONG) hchild   , -1, 1 ); 
   hb_stornl( (LONG) pDisp      , -1, 2 ); 
   hb_stornl( (LONG) hlibrary   , -1, 3 ); 

}

HB_FUNC( EXITACTIVEX ) 
{

   DestroyWindow ( (HWND)hb_parnl( 1 ) );
   FreeLibrary ( (HMODULE)hb_parnl( 2 ) );

}

#pragma ENDDUMP
 
Good. No Error

How to get event with this function
Image




Best Regards
Fafi
Post Reply