Erro com 9.07

Erro com 9.07

Postby Rossine » Fri Aug 14, 2009 7:20 pm

Olá Antonio,

Ao compilar o sample\ribbon.prg me é gerado este erro:

Error: Unresolved external 'PrintWindow' referenced from C:\FWH\LIB\FIVEHC.LIB|RIBBON
* Linking errors *

Eu tentei inserir isto em meu script de compilação mas nao adiantou:

echo %bcdir%\lib\psdk\user32.lib + >> b32.bc

Outro erro é no exemplo test2007.prg, o .exe é gerado mas não executa e me é gerado o hb_out.log abaixo:

Code: Select all  Expand view


Application Internal Error - C:\fwh\samples\test2007.exe
Terminated at: 2009.08.14 16:21:36
Unrecoverable error 9003: Too many recursive error handler calls
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from CWINVERSION(0) in function\getsysin.prg
Called from TMENU:INITIATE(0) in classes\menu.prg
Called from MENUEND(0) in classes\pdmenu.prg
Called from BUILDMENU(67) in test2007.prg
Called from MAIN(12) in test2007.prg

 


Como corrigir estes erros ?
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Antonio Linares » Sat Aug 15, 2009 10:47 am

Rossine,

Please don't link user32.lib (neither prnwnd.lib) and add this code to your main PRG:
Code: Select all  Expand view

#pragma BEGINDUMP

#include <windows.h>

typedef BOOL ( FAR PASCAL * LPPRINTWINDOW )( HWND hWnd, HDC hDC, UINT nFlags );

BOOL WINAPI PrintWindow( HWND hWnd, HDC hDC, UINT uiFlags )
{
   LPPRINTWINDOW pPW;  
   HINSTANCE hDLL = LoadLibrary( "user32.dll" );
   BOOL bResult = FALSE;

  if( hDLL )
  {
     pPW = ( LPPRINTWINDOW ) GetProcAddress( hDLL, "PrintWindow" );
     bResult = pPW( hWnd, hDC, uiFlags );
     FreeLibrary( hDLL );
  }
 
  return bResult;
}  

#pragma ENDDUMP
 
regards, saludos

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

Re: Erro com 9.07

Postby Rossine » Sat Aug 15, 2009 1:31 pm

Olá Antonio,

Code: Select all  Expand view

Error: Unresolved external 'PrintWindow' referenced from C:\FWH\LIB\FIVEHC.LIB|RIBBON
* Linking errors *
 


> Please don't link user32.lib (neither prnwnd.lib) and add this code to your main PRG:

OK isto está resolvido.

Quando compilo ribbon.prg, o .exe é gerado e quando executo não acontece nada, somente este erro gerado em hb_out.log

Code: Select all  Expand view

Application Internal Error - C:\fwh\samples\ribbon.exe
Terminated at: 2009.08.15 10:25:39
Unrecoverable error 9003: Too many recursive error handler calls
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from CWINVERSION(0) in function\getsysin.prg
Called from TMENU:INITIATE(0) in classes\menu.prg
Called from MENUEND(0) in classes\pdmenu.prg
Called from MAIN(30) in ribbon.prg
 


Estou usando o harbour 12122 e este é meu arquivo .bc:

Code: Select all  Expand view

c:\bcc55\lib\c0w32.obj +
ribbon.obj, +
ribbon.exe, +
ribbon.map, +
c:\fwh\lib\FiveH.lib c:\fwh\lib\FiveHC.lib +
c:\hrb_bcc\lib\hbrtl.lib +
c:\hrb_bcc\lib\hbvm.lib +
c:\hrb_bcc\lib\gtgui.lib +
c:\hrb_bcc\lib\hblang.lib +
c:\hrb_bcc\lib\hbmacro.lib +
c:\hrb_bcc\lib\hbrdd.lib +
c:\hrb_bcc\lib\rddntx.lib +
c:\hrb_bcc\lib\rddcdx.lib +
c:\hrb_bcc\lib\rddfpt.lib +
c:\hrb_bcc\lib\hbsix.lib +
c:\hrb_bcc\lib\hbdebug.lib +
c:\hrb_bcc\lib\hbcommon.lib +
c:\hrb_bcc\lib\hbpp.lib +
c:\hrb_bcc\lib\hbcpage.lib +
c:\hrb_bcc\lib\hbwin.lib +
c:\hrb_bcc\lib\hbrtl.lib +
c:\hrb_bcc\lib\hbpcre.lib +
c:\hrb_bcc\lib\hbtip.lib +
c:\hrb_bcc\lib\hbct.lib +
c:\hrb_bcc\lib\xhb.lib +
c:\hrb_bcc\lib\hbusrrdd.lib +
c:\hrb_bcc\lib\rddads.lib +
c:\bcc55\lib\cw32.lib +
c:\bcc55\lib\uuid.lib +
c:\bcc55\lib\import32.lib +
c:\bcc55\lib\psdk\odbc32.lib +
c:\bcc55\lib\psdk\nddeapi.lib +
c:\bcc55\lib\psdk\iphlpapi.lib +
c:\bcc55\lib\psdk\msimg32.lib +  
c:\bcc55\lib\psdk\rasapi32.lib,  
c:\bin\resource.res
 


Em resource.rc eu tenho somente esta linha:

Code: Select all  Expand view

1 24 "/fwh/samples/WinXP/WindowsXP.Manifest"
 


Porque deste GPF ?
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Antonio Linares » Sat Aug 15, 2009 5:45 pm

Rossine,

Parece que se está enlazando una función GetVersion() que no es la de FWH y al no devolver un array, como se espera, se genera un error. Y el gestor de errores vuelve a usar GetVersion() y por eso se produce un error recursivo.

Prueba a añadir este código en tu PRG principal:
Code: Select all  Expand view

#pragma BEGINDUMP

#include <windows.h>

HB_FUNC( GETVERSION )
{
   OSVERSIONINFO vi;

   vi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
   GetVersionEx( &vi );

   hb_reta( 5 );

   hb_stornl( (long) vi.dwMajorVersion, -1, 1 );
   hb_stornl( (long) vi.dwMinorVersion, -1, 2 );
   hb_stornl( (long) vi.dwBuildNumber,  -1, 3 );
   hb_stornl( (long) vi.dwPlatformId,   -1, 4 );
   hb_storc( (char*) vi.szCSDVersion,   -1, 5 );
}

#pragma ENDDUMP
 
regards, saludos

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

Re: Erro com 9.07

Postby Rossine » Sun Aug 16, 2009 12:38 pm

Olá Antonio,

Não consigo executar nenhum sample, todos estão dando erro de GPF :cry:

Code: Select all  Expand view

Application Internal Error - C:\fwh\samples\toolbar3.exe
Terminated at: 2009.08.15 15:59:30
Unrecoverable error 9003: Too many recursive error handler calls
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from TMDIFRAME:COORSUPDATE(0) in classes\window.prg
Called from TWINDOW:RESIZE(0) in classes\window.prg
Called from TMDIFRAME:RESIZE(0) in classes\mdiframe.prg
Called from TMDIFRAME:HANDLEEVENT(0)
Called from _FWH(0) in classes\window.prg
Called from SETMENU(0)
Called from (b)TWINDOW(0) in classes\window.prg
Called from TWINDOW:SETMENU(0) in classes\window.prg
Called from TMDIFRAME:SETMENU(0) in classes\mdiframe.prg
Called from TMDIFRAME:NEW(0) in classes\mdiframe.prg
Called from MAIN(12) in toolbar3.prg
 


Eu estou usando harbour revisão 12123,
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Rossine » Thu Aug 20, 2009 7:31 pm

Olá Antonio,

Atualizei o meu harbour aqui hoje para a versão 12205 e continuo não conseguindo executar nenhuma aplicação gerada pelo fivewin 9.07 :cry:

Tentei compilar e executar o exemplo c:\fwh\samples\toolbar3.prg mas me é gerado o seguinte arquivo hb_out.log (GPF)

Code: Select all  Expand view

Application Internal Error - C:\fwh\samples\toolbar3.exe
Terminated at: 2009.08.20 16:26:53
Unrecoverable error 9003: Too many recursive error handler calls
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from ERRORDIALOG(0) in function\errsysw.prg
Called from (b)ERRORSYS(0) in function\errsysw.prg
Called from TMDIFRAME:COORSUPDATE(0) in classes\window.prg
Called from TWINDOW:RESIZE(0) in classes\window.prg
Called from TMDIFRAME:RESIZE(0) in classes\mdiframe.prg
Called from TMDIFRAME:HANDLEEVENT(0)
Called from _FWH(0) in classes\window.prg
Called from SETMENU(0)
Called from (b)TWINDOW(0) in classes\window.prg
Called from TWINDOW:SETMENU(0) in classes\window.prg
Called from TMDIFRAME:SETMENU(0) in classes\mdiframe.prg
Called from TMDIFRAME:NEW(0) in classes\mdiframe.prg
Called from MAIN(12) in toolbar3.prg
------------------------------------------------------------------------
 


Como resolver este problema ??

Obs: Por favor, compile os samples usando o harbour svn 12205 ou superior e veja se aí com você vai ocorrer este erro.
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Antonio Linares » Thu Aug 20, 2009 10:05 pm

Rossine,

Ya tenemos nuevas librerias de FWH 9.07 que funcionan correctamente :-)

Te las enviamos pr email
regards, saludos

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

Re: Erro com 9.07

Postby Rossine » Fri Aug 21, 2009 12:20 am

Olá Antonio,

Ya tenemos nuevas librerias de FWH 9.07 que funcionan correctamente
Te las enviamos pr email


Mil gracias, os exemplos de c:\fwh\samples, voltaram a funcionar 100% com harbour svn (12211) :D :D :D mil gracias maestro :D

Eu testei outros exemplos de codejock e funcionam perfeitamente, exceto o código abaixo que continua me retornado erro de GPF:

Code: Select all  Expand view


// FWH ActiveX Call Codejock Ocx Sample //
// Richard                              //

#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
   
   local oRb
   local oQA, oQBtn1, oQBtn2, oQBtn3
   local oSysButton, oControl, oPopupBar  
   
   local oStatusBar, oToolTipContext, oIcons
   local oTabFiles, oGroup1
   local oTabEdit, oGroup2
   local oTabBuild
   
   local aButtons := {}
   local oButton1, oButton2, oButton3, oButton4
   local oExitBtn, oExitBtn2
   local oBmp1, oBmp2, oBmp3, obmp4, obmp5, obmp6, obmp7, obmp8, obmp9
   
   DEFINE WINDOW oWnd TITLE "FWH Support Codejock ActiveX"
   
   oBmp1 := TBitmap():Define( , "\fwh\bitmaps\16x16\new2.bmp", oWnd )
   oBmp2 := TBitmap():Define( , "\fwh\bitmaps\16x16\open2.bmp", oWnd )
   oBmp3 := TBitmap():Define( , "\fwh\bitmaps\alphabmp\explorer.bmp", oWnd )    
   oBmp4 := TBitmap():Define( , "\fwh\bitmaps\32x32\open.bmp", oWnd )
   oBmp5 := TBitmap():Define( , "\fwh\bitmaps\32x32\people.bmp", oWnd )
   oBmp6 := TBitmap():Define( , "\fwh\bitmaps\32x32\keys.bmp", oWnd )
   oBmp7 := TBitmap():Define( , "\fwh\bitmaps\32x32\quit.bmp", oWnd )
   oBmp8 := TBitmap():Define( , "\fwh\bitmaps\16x16\copy.bmp", oWnd )
   oBmp9 := TBitmap():Define( , "\fwh\bitmaps\16x16\info.bmp", oWnd )
     
   oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.13.0.0", 0, 0, 0, 0 )  
   
   //@ 0, 0 ACTIVEX oAct PROGID "Codejock.CommandBarsFrame.13.0.0" OF oWnd

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

   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., 0 )
   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:AddBitmap( oBmp4:hBitmap,4,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp5:hBitmap,5,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp6:hBitmap,6,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp7:hBitmap,7,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp8:hBitmap,8,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp9:hBitmap,9,xtpImageNormal,.f. )
   oIcons:LoadBitmap( "\fwh\bitmaps\32x32\edit.bmp",4, xtpImageNormal)
   
   //oAct:Hide()

   // RibbonBar - Richard
   oRb = oAct:Do( "AddRibbonBar", "Ribbon Bar" )
   
   oRb:EnableDocking(64)
   oRb:EnableFrameTheme()              
   oRb:ShowQuickAccessBelowRibbon(.F.)
   oRb:ShowCaptionAlways(.T.)
   oRb:ShowQuickAccess(.T.)  
   oRb:ShowGripper()
   
   // QuickAccess - Richard  
   oQA:= oRb:QuickAccessControls()
   oQBtn1 := oQA:Add( 1, 1, "&New"         )
   oQBtn2 := oQA:Add( 1, 2, "&Save"        )
   oQBtn3 := oQA:Add( 1, 8, "&copy"        )
   oQA:Add( 1, 9, "&info"        )
   
   // Add SysButton - Richard
   oSysButton := oRb:AddSystemButton()
   oSysButton:IconId( 5 )
     
   oSysButton:CommandBar:Controls:Add( 1, 4, "&New"         )
   oSysbutton:CommandBar:Controls:Add( 1, 5, "&Open..."     )
   oSysbutton:CommandBar:Controls:Add( 1, 6, "&Save"        )
   oSysbutton:CommandBar:Controls:Add( 1, 6, "Save &As..."  )
   
   oControl := oSysButton:CommandBar:Controls:Add( 4, 5, "&Print")
   oControl:BeginGroup = .T.
   
   oPopupBar := TOleAuto():New( ActXPdisp( oAct:hActiveX ) )
          oPopupBar := oPopupBar:CreateCommandBar("CXTPRibbonSystemPopupBarPage")

          oControl:CommandBar = oPopupBar
          oControl := oPopupBar:Controls:Add( 8, 0, "Preview and print the document")
          oControl:Width = 296
          oControl:DefaultItem = .T.
          oControl:Style = 1  && xtpButtonCaption
          oPopupBar:DefaultButtonStyle = 5  && xtpButtonCaptionAndDescription
          oPopupBar:SetIconSize( 32, 32 )
          oPopupBar:ShowGripper = .F.

             oPopupBar:Controls:Add( 1, 4, "Print Pre&view" )
          oPrnSetup = oPopupBar:Controls:Add( 1, 5, "Pr&int Setup..." )
             oPopupBar:Controls:Add( 1, 6, "Print Pre&view" )
             
   oSysbutton:CommandBar:Controls:Add( 1, 1230, "Prepare" )
   oSysbutton:CommandBar:Controls:Add( 1, 1235, "Send" )
   oSysbutton:CommandBar:Controls:Add( 1, 1230, "Publish" )
   oExitBtn2 = oSysbutton:CommandBar:Controls:Add( 1, 7, "Close" )
 
   oSysbutton:CommandBar:SetIconSize( 32, 32 )    
   
   
   // RibbonBar Table - Richard  
   oTabFiles = oRb:InsertTab( 0, "&Files" )
   
   oTabFiles_Grp1 = oTabFiles:Groups:AddGroup("&Clipboard", 0)
   oTabFiles_Grp1:ShowOptionButton = .T.
   
   // TabFiles Group ToolTip - Richard
   oTabFiles_Grp1:ControlGroupOption:Id = 1000
   oTabFiles_Grp1:ControlGroupOption:ToolTipText = "Clipboard"
   oTabFiles_Grp1:ControlGroupOption:DescriptionText = "Show clipboard dialog"
   oTabFiles_Grp1:ControlGroupOption:IconId(3)
     
   
   oPaste := oTabFiles_Grp1:Add( 4, 1, "&Paste")
    oPaste:CommandBar:Controls:Add( 1, 1, "&Paste" )
    oPaste:CommandBar:Controls:Add( 1, 2, "&Paste Special" )
   oButton1 = oTabFiles_Grp1:Add( xtpControlButton, 2, "&Cut" )
   oButton2 = oTabFiles_Grp1:Add( xtpControlButton, 3, "&Copy" )
         
   oBtn1 := oTabFiles_Grp1:Add(  1, 9, "Format")
   oBtn1:Enabled = .F.
   
   oBtn2 := oTabFiles_Grp1:Add(  1, 8, "Delete")
   oExitBtn := oTabFiles_Grp1:Add(  xtpControlButton, 7, "Exit")
           
   
   oTabFiles_Grp2 := oTabFiles:Groups:AddGroup( "&Font", 1)
 
   oButton3 = oTabFiles_Grp2:Add( xtpControlButton, 4, NIL )
   oButton4 = oTabfiles_Grp2:Add( xtpControlButton, 3, "" )
   oButton4:SetIconSize( 64,64 )
   oButton4:Width = 70
   oButton4:Height = 70
   
       
   oTabEdit  = oRb:InsertTab( 1, "&Edit" )  
   
   oTabBuild = oRb:InsertTab( 2, "&Build" )
   oTabBuild:Color = 5  
   oTable_Grp := oTabBuild:Groups:AddGroup( "&Show/Hide", 5025)
   oTable_Grp:Add( 9, 2807, "Ruler" )
   oTable_Grp:Add( 9, 2808, "GridLines" )
   oTable_Grp:Add( 9, 2809, "Properties" )
   oTable_Grp:Add( 9, 2810, "Document Map" )
   oTable_Grp:Add( 9, 2811, "Thumbnails" )
   oTable_Grp:Add( 9, 2812, "Document Action Bar" )
   
   oControlOptions := oRb:Controls:Add( 2, 0, "Options")
   oControlOptions:Flags = 1  && xtpFlagRightAlign

   oControl := oControlOptions:CommandBar:Controls:Add( 2, 0, "Styles")
   oControl:CommandBar:Controls:Add( 1, 3000, "Blue"   )
   oControl:CommandBar:Controls:Add( 1, 3001, "Black"  )
   oControl:CommandBar:Controls:Add( 1, 3003, "Silver" )
   oControl:CommandBar:Controls:Add( 1, 3002, "Aqua"   )

   oControlPopup := oControlOptions:CommandBar:Controls:Add( 2, 0, "Font", -1, .F.)
   oControlPopup:CommandBar:Controls:Add( 11, 32883, "System Default", -1, .F.)

   oControl := oControlPopup:CommandBar:Controls:Add( 11, 32884, "Normal", -1, .F.)
   oControl:BeginGroup = .T.
   oControlPopup:CommandBar:Controls:Add( 11, 32885, "Large", -1, .F.)
   oControlPopup:CommandBar:Controls:Add( 11, 32886, "Extra Large", -1, .F.)

   oControl := oControlPopup:CommandBar:Controls:Add( 1, 32887, "Auto Resize Icons", -1, .F.)
   oControl:BeginGroup = .T.

   oControlOptions:CommandBar:Controls:Add( 1, 3004, "Right To Left" )
   oControlOptions:CommandBar:Controls:Add( 1, 3005, "Animation" )

   oControlAbout := oRb:Controls:Add( 1, 4000, "&About")
   oControlAbout&#058;Flags = 1  && xtpFlagRightAlign
     
   
   AAdd( aButtons, oButton1 )
   AAdd( aButtons, oButton2 )
   AADD( aButtons, oQBtn1 )
   AADD( aButtons, oQBtn2 )
   AADD( aButtons, oQBtn3 )  
   AADD( aButtons, oExitBtn )
   AADD( aButtons, oExitBtn2 )
   AADD( aButtons, oControlAbout )
   AADD( aButtons, oPrnSetup )
     
   
   oButton1:Caption = "FiveWin power!"
   oButton1:TooltipText = "Ribbonbar for FWH"
     
   ACTIVATE WINDOW oWnd
     
return nil

function RibbonBarEvent( cEvent, aParams, pParams, aButtons, oWnd )

   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" )
                   
              case aButtons[ 6 ]:hObj == aParams[ 1 ]
                   oWnd:End()      
                               
              case aButtons[ 7 ]:hObj == aParams[ 1 ]
                   oWnd:End()
                   
              case aButtons[ 8 ]:hObj == aParams[ 1 ]
                   MsgInfo( "FWH's ActiveX Power support Codejock", "About Codejock" )      
                   
              case aButtons[ 9 ]:hObj == aParams[ 1 ]
                   PrinterSetup()  
                   
                                             
                   
           endcase        
   endcase        
   
return nil
 
 


E este é o erro gerado pelo exemplo acima:

[/code]
Application Internal Error - C:\myfwh\act5.exe
Terminated at: 2009.08.20 21:14:19
Unrecoverable error 6005: Exception error:

Exception Code:C0000005
Exception Address:73D875EC
EAX:00000000 EBX:005A5EE4 ECX:00E24458 EDX:0013FDF8
ESI:005A3F20 EDI:00E24458 EBP:0013FDC8
CS:EIP:001B:73D875EC SS:ESP:0023:0013FDBC
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010246
CS:EIP: FF 50 4C 85 C0 0F 85 97 00 00 00 8B 07 8B CF FF
SS:ESP: 005A3F20 00E24458 00000000 0013FDFC 73D875A5 005A3F20 004C8C78 00000000 73DBE779 005A3F20 0013FDF8 004141D6 00E245B0 005A3F20 0013FDF8 00000000

C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
73D875EC 0013FDC8 0013FDFC 73D875A5 005A3F20 004C8C78 00000000 73DBE779 005A3F20 0013FDF8 004141D6 00E245B0
73D875A5 0013FDFC 0013FE18 0045EAC4 00000001 00000000 00000000 00000000 00000000
0045EAC4 0013FE18 0013FF20 00458CE6 00000001 00000001 00000001 005A67BC 0013FE58 00471DE7 00C97E7C 00C97B04
00458CE6 0013FF20 0013FF48 00401180 004C8948 004C83D4 0045EAC4 00000000 00000000 00000000 00000000 00000050
00401180 0013FF48 0013FF64 00457FCA 00C80000 00162314 00000000 00162314 00000000
00457FCA 0013FF64 0013FF88 00482B41 00000001 00000000 004C8364 00162314 00160000 00000000 001875B8
00482B41 0013FF88 0013FFB8 004C499B 00400000 00000000 00162314 0000000A 7FFDE000 7C901000 7FFD6000 7FFD6000
004C499B 0013FFB8 0013FFF0 00000000 004C8364 7C817077 7FFDE000 7C901000 7FFD6000 8054B6ED 0013FFC8 88376878


Modules:
0x00400000 0x001C1000 C:\myfwh\act5.exe
0x7C900000 0x000B6000 C:\WINDOWS\system32\ntdll.dll
0x7C800000 0x00100000 C:\WINDOWS\system32\kernel32.dll
0x77F50000 0x000AB000 C:\WINDOWS\system32\ADVAPI32.DLL
0x77DB0000 0x00092000 C:\WINDOWS\system32\RPCRT4.dll
0x77F20000 0x00011000 C:\WINDOWS\system32\Secur32.dll
0x77BE0000 0x00008000 C:\WINDOWS\system32\VERSION.DLL
0x72FB0000 0x00026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x77E50000 0x00049000 C:\WINDOWS\system32\GDI32.dll
0x7E360000 0x00091000 C:\WINDOWS\system32\USER32.dll
0x77BF0000 0x00058000 C:\WINDOWS\system32\msvcrt.dll
0x773B0000 0x00103000 C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\COMCTL32.DLL
0x77EA0000 0x00076000 C:\WINDOWS\system32\SHLWAPI.dll
0x76380000 0x00048000 C:\WINDOWS\system32\COMDLG32.DLL
0x7C9C0000 0x0081E000 C:\WINDOWS\system32\SHELL32.dll
0x774C0000 0x0013D000 C:\WINDOWS\system32\OLE32.DLL
0x77100000 0x0008B000 C:\WINDOWS\system32\OLEAUT32.DLL
0x7DFC0000 0x00022000 C:\WINDOWS\system32\OLEDLG.DLL
0x76350000 0x00005000 C:\WINDOWS\system32\MSIMG32.DLL
0x76360000 0x0001D000 C:\WINDOWS\system32\IMM32.DLL
0x003B0000 0x00043000 C:\Arquivos de programas\IObit\IObit Security 360\IS360mon.dll
0x76BD0000 0x0000B000 C:\WINDOWS\system32\PSAPI.dll
0x5B1C0000 0x00038000 C:\WINDOWS\system32\uxtheme.dll
0x746E0000 0x0004C000 C:\WINDOWS\system32\MSCTF.dll
0x77B20000 0x00022000 C:\WINDOWS\system32\apphelp.dll
0x75290000 0x0002E000 C:\WINDOWS\system32\msctfime.ime
0x76FB0000 0x0007F000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77030000 0x000CD000 C:\WINDOWS\system32\COMRes.dll
0x10000000 0x00236000 C:\ARQUIV~1\CODEJO~1\ActiveX\XTREME~1.0(3\Bin\CODEJO~2.OCX
0x73D80000 0x000FE000 C:\WINDOWS\system32\MFC42.DLL
0x5F250000 0x00017000 C:\WINDOWS\system32\OLEPRO32.DLL
0x76B20000 0x0002E000 C:\WINDOWS\system32\WINMM.dll
0x61E40000 0x0000E000 C:\WINDOWS\system32\MFC42LOC.DLL
0x7E690000 0x000B0000 C:\WINDOWS\system32\SXS.DLL
0x76C10000 0x0002E000 C:\WINDOWS\system32\WINTRUST.dll
0x77A60000 0x00096000 C:\WINDOWS\system32\CRYPT32.dll
0x77B00000 0x00012000 C:\WINDOWS\system32\MSASN1.dll
0x76C70000 0x00028000 C:\WINDOWS\system32\IMAGEHLP.dll
0x72CD0000 0x00009000 C:\WINDOWS\system32\wdmaud.drv
0x72CC0000 0x00008000 C:\WINDOWS\system32\msacm32.drv
0x77BC0000 0x00015000 C:\WINDOWS\system32\MSACM32.dll
0x77BB0000 0x00007000 C:\WINDOWS\system32\midimap.dll
0x4EB60000 0x001A6000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.5581_x-ww_dfbc4fc4\GdiPlus.dll

Called from ACTXPDISP(0)
Called from MAIN(80) in act5.prg
[/quote]

Seria possível me enviar os fontes para gerar fiveh.lib e fivehc.lib aqui ?

Novamente mil gracias maestros :wink:
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Antonio Linares » Fri Aug 21, 2009 12:43 am

Rossine,

Es esta la línea 80 en donde se produce el GPF ?

oStatusBar := TOleAuto():New( ActXPdisp( oAct:hActiveX ) )

Funcionaba este mismo código bien, anteriormente ?
regards, saludos

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

Re: Erro com 9.07

Postby Rossine » Fri Aug 21, 2009 1:51 am

Olá Antonio,

Es esta la línea 80 en donde se produce el GPF ?

oStatusBar := TOleAuto():New( ActXPdisp( oAct:hActiveX ) )

Funcionaba este mismo código bien, anteriormente ?


Sim antonio, funcionava com o harbour mais antigo. Tente rodar o exemplo de daniel que está neste link:
http://forums.fivetechsupport.com/viewtopic.php?f=6&t=15103&hilit=codejock&start=30#p78326
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Antonio Linares » Fri Aug 21, 2009 9:03 am

Rossine,

Prueba a cambiar:

... := TOleAuto():New( ActXPdisp( oAct:hActiveX ) )

por esto:

... := TOleAuto():New( oAct:oOleAuto:__hObj )
regards, saludos

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

Re: Erro com 9.07

Postby Rossine » Fri Aug 21, 2009 1:51 pm

Olá Antonio,

Prueba a cambiar:

... := TOleAuto():New( ActXPdisp( oAct:hActiveX ) )

por esto:

... := TOleAuto():New( oAct:oOleAuto:__hObj )


Sim, isto funcionou :D

Veja no exemplo abaixo que tive comentar algumas linhas "*" para poder compilar e ao executar é gerado o erro abaixo:

Code: Select all  Expand view


// FWH ActiveX Call Codejock Ocx Sample //
// Richard                              //

#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
   
   local oRb
   local oQA, oQBtn1, oQBtn2, oQBtn3
   local oSysButton, oControl, oPopupBar  
   
   local oStatusBar, oToolTipContext, oIcons
   local oTabFiles, oGroup1
   local oTabEdit, oGroup2
   local oTabBuild
   
   local aButtons := {}
   local oButton1, oButton2, oButton3, oButton4
   local oExitBtn, oExitBtn2
   local oBmp1, oBmp2, oBmp3, obmp4, obmp5, obmp6, obmp7, obmp8, obmp9
   
   DEFINE WINDOW oWnd TITLE "FWH Support Codejock ActiveX"
   
   oBmp1 := TBitmap():Define( , "\fwh\bitmaps\16x16\new2.bmp", oWnd )
   oBmp2 := TBitmap():Define( , "\fwh\bitmaps\16x16\open2.bmp", oWnd )
   oBmp3 := TBitmap():Define( , "\fwh\bitmaps\alphabmp\explorer.bmp", oWnd )    
   oBmp4 := TBitmap():Define( , "\fwh\bitmaps\32x32\open.bmp", oWnd )
   oBmp5 := TBitmap():Define( , "\fwh\bitmaps\32x32\people.bmp", oWnd )
   oBmp6 := TBitmap():Define( , "\fwh\bitmaps\32x32\keys.bmp", oWnd )
   oBmp7 := TBitmap():Define( , "\fwh\bitmaps\32x32\quit.bmp", oWnd )
   oBmp8 := TBitmap():Define( , "\fwh\bitmaps\16x16\copy.bmp", oWnd )
   oBmp9 := TBitmap():Define( , "\fwh\bitmaps\16x16\info.bmp", oWnd )
   
   
   oAct := TActiveX():New( oWnd, "Codejock.CommandBarsFrame.13.0.0", 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, oWnd ) }

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

           
   // ToolTipContext - Richard          
   oToolTipContext := TOleAuto():New( oAct:oOleAuto:__hObj ) && TOleAuto():New( ActXPdisp( oAct:hActiveX ) )
   oToolTipContext := oToolTipContext:ToolTipContext()
   oToolTipContext:Style = 5  && xtpToolTipOffice2007
*   oToolTipContext:ShowTitleAndDescription( .T., 0 )
   oToolTipContext:ShowImage( .T., 0 )
   oToolTipContext:SetMargin( 2, 2, 2, 2 )
   oToolTipContext:MaxTipWidth = 180
   
   // StatusBar-Richard
   oStatusBar := TOleAuto():New( oAct:oOleAuto:__hObj ) && 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:AddBitmap( oBmp4:hBitmap,4,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp5:hBitmap,5,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp6:hBitmap,6,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp7:hBitmap,7,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp8:hBitmap,8,xtpImageNormal,.f. )
   oIcons:AddBitmap( oBmp9:hBitmap,9,xtpImageNormal,.f. )
   oIcons:LoadBitmap( "\fwh\bitmaps\32x32\edit.bmp",4, xtpImageNormal)
   
   //oAct:Hide()

   // RibbonBar - Richard
   oRb = oAct:Do( "AddRibbonBar", "Ribbon Bar" )
   
   oRb:EnableDocking(64)
   oRb:EnableFrameTheme()              
*   oRb:ShowQuickAccessBelowRibbon(.F.)
*   oRb:ShowCaptionAlways(.T.)
*   oRb:ShowQuickAccess(.T.)  
   oRb:ShowGripper()
   
   // QuickAccess - Richard  
   oQA:= oRb:QuickAccessControls()
   oQBtn1 := oQA:Add( 1, 1, "&New"         )
   oQBtn2 := oQA:Add( 1, 2, "&Save"        )
   oQBtn3 := oQA:Add( 1, 8, "&copy"        )
   oQA:Add( 1, 9, "&info"        )
   
   // Add SysButton - Richard
   oSysButton := oRb:AddSystemButton()
*   oSysButton:IconId( 5 )
     
   oSysButton:CommandBar:Controls:Add( 1, 4, "&New"         )
   oSysbutton:CommandBar:Controls:Add( 1, 5, "&Open..."     )
   oSysbutton:CommandBar:Controls:Add( 1, 6, "&Save"        )
   oSysbutton:CommandBar:Controls:Add( 1, 6, "Save &As..."  )
   
   oControl := oSysButton:CommandBar:Controls:Add( 4, 5, "&Print")
   oControl:BeginGroup = .T.
   
   oPopupBar := TOleAuto():New( oAct:oOleAuto:__hObj ) && TOleAuto():New( ActXPdisp( oAct:hActiveX ) )
          oPopupBar := oPopupBar:CreateCommandBar("CXTPRibbonSystemPopupBarPage")

          oControl:CommandBar = oPopupBar
          oControl := oPopupBar:Controls:Add( 8, 0, "Preview and print the document")
          oControl:Width = 296
          oControl:DefaultItem = .T.
          oControl:Style = 1  && xtpButtonCaption
          oPopupBar:DefaultButtonStyle = 5  && xtpButtonCaptionAndDescription
          oPopupBar:SetIconSize( 32, 32 )
          oPopupBar:ShowGripper = .F.

             oPopupBar:Controls:Add( 1, 4, "Print Pre&view" )
          oPrnSetup = oPopupBar:Controls:Add( 1, 5, "Pr&int Setup..." )
             oPopupBar:Controls:Add( 1, 6, "Print Pre&view" )
             
   oSysbutton:CommandBar:Controls:Add( 1, 1230, "Prepare" )
   oSysbutton:CommandBar:Controls:Add( 1, 1235, "Send" )
   oSysbutton:CommandBar:Controls:Add( 1, 1230, "Publish" )
   oExitBtn2 = oSysbutton:CommandBar:Controls:Add( 1, 7, "Close" )
 
   oSysbutton:CommandBar:SetIconSize( 32, 32 )    
   
   
   // RibbonBar Table - Richard  
   oTabFiles = oRb:InsertTab( 0, "&Files" )
   
   oTabFiles_Grp1 = oTabFiles:Groups:AddGroup("&Clipboard", 0)
   oTabFiles_Grp1:ShowOptionButton = .T.
   
   // TabFiles Group ToolTip - Richard
   oTabFiles_Grp1:ControlGroupOption:Id = 1000
   oTabFiles_Grp1:ControlGroupOption:ToolTipText = "Clipboard"
   oTabFiles_Grp1:ControlGroupOption:DescriptionText = "Show clipboard dialog"
*   oTabFiles_Grp1:ControlGroupOption:IconId(3)
     
   
   oPaste := oTabFiles_Grp1:Add( 4, 1, "&Paste")
    oPaste:CommandBar:Controls:Add( 1, 1, "&Paste" )
    oPaste:CommandBar:Controls:Add( 1, 2, "&Paste Special" )
   oButton1 = oTabFiles_Grp1:Add( xtpControlButton, 2, "&Cut" )
   oButton2 = oTabFiles_Grp1:Add( xtpControlButton, 3, "&Copy" )
         
   oBtn1 := oTabFiles_Grp1:Add(  1, 9, "Format")
   oBtn1:Enabled = .F.
   
   oBtn2 := oTabFiles_Grp1:Add(  1, 8, "Delete")
   oExitBtn := oTabFiles_Grp1:Add(  xtpControlButton, 7, "Exit")
           
   
   oTabFiles_Grp2 := oTabFiles:Groups:AddGroup( "&Font", 1)
 
   oButton3 = oTabFiles_Grp2:Add( xtpControlButton, 4, NIL )
   oButton4 = oTabfiles_Grp2:Add( xtpControlButton, 3, "" )
   oButton4:SetIconSize( 64,64 )
   oButton4:Width = 70
   oButton4:Height = 70
   
       
   oTabEdit  = oRb:InsertTab( 1, "&Edit" )  
   
   oTabBuild = oRb:InsertTab( 2, "&Build" )
   oTabBuild:Color = 5  
   oTable_Grp := oTabBuild:Groups:AddGroup( "&Show/Hide", 5025)
   oTable_Grp:Add( 9, 2807, "Ruler" )
   oTable_Grp:Add( 9, 2808, "GridLines" )
   oTable_Grp:Add( 9, 2809, "Properties" )
   oTable_Grp:Add( 9, 2810, "Document Map" )
   oTable_Grp:Add( 9, 2811, "Thumbnails" )
   oTable_Grp:Add( 9, 2812, "Document Action Bar" )
   
   oControlOptions := oRb:Controls:Add( 2, 0, "Options")
   oControlOptions:Flags = 1  && xtpFlagRightAlign

   oControl := oControlOptions:CommandBar:Controls:Add( 2, 0, "Styles")
   oControl:CommandBar:Controls:Add( 1, 3000, "Blue"   )
   oControl:CommandBar:Controls:Add( 1, 3001, "Black"  )
   oControl:CommandBar:Controls:Add( 1, 3003, "Silver" )
   oControl:CommandBar:Controls:Add( 1, 3002, "Aqua"   )

   oControlPopup := oControlOptions:CommandBar:Controls:Add( 2, 0, "Font", -1, .F.)
   oControlPopup:CommandBar:Controls:Add( 11, 32883, "System Default", -1, .F.)

   oControl := oControlPopup:CommandBar:Controls:Add( 11, 32884, "Normal", -1, .F.)
   oControl:BeginGroup = .T.
   oControlPopup:CommandBar:Controls:Add( 11, 32885, "Large", -1, .F.)
   oControlPopup:CommandBar:Controls:Add( 11, 32886, "Extra Large", -1, .F.)

   oControl := oControlPopup:CommandBar:Controls:Add( 1, 32887, "Auto Resize Icons", -1, .F.)
   oControl:BeginGroup = .T.

   oControlOptions:CommandBar:Controls:Add( 1, 3004, "Right To Left" )
   oControlOptions:CommandBar:Controls:Add( 1, 3005, "Animation" )

   oControlAbout := oRb:Controls:Add( 1, 4000, "&About")
   oControlAbout&#058;Flags = 1  && xtpFlagRightAlign
     
   
   AAdd( aButtons, oButton1 )
   AAdd( aButtons, oButton2 )
   AADD( aButtons, oQBtn1 )
   AADD( aButtons, oQBtn2 )
   AADD( aButtons, oQBtn3 )  
   AADD( aButtons, oExitBtn )
   AADD( aButtons, oExitBtn2 )
   AADD( aButtons, oControlAbout )
   AADD( aButtons, oPrnSetup )
     
   
   oButton1:Caption = "FiveWin power!"
   oButton1:TooltipText = "Ribbonbar for FWH"
     
   ACTIVATE WINDOW oWnd
     
return nil

function RibbonBarEvent( cEvent, aParams, pParams, aButtons, oWnd )

   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" )
                   
              case aButtons[ 6 ]:hObj == aParams[ 1 ]
                   oWnd:End()      
                               
              case aButtons[ 7 ]:hObj == aParams[ 1 ]
                   oWnd:End()
                   
              case aButtons[ 8 ]:hObj == aParams[ 1 ]
                   MsgInfo( "FWH's ActiveX Power support Codejock", "About Codejock" )      
                   
              case aButtons[ 9 ]:hObj == aParams[ 1 ]
                   PrinterSetup()  
                   
                                             
                   
           endcase        
   endcase        
   
return nil
 
 


...estes erros

Code: Select all  Expand view

   Error description: Error BASE/1004  No exported method: HOBJ

Stack Calls
===========
   Called from:  => WIN_OLEAUTO:HOBJ(0)
   Called from: act5.prg => RIBBONBAREVENT(254)
   Called from: act5.prg => (b)MAIN(62)
   Called from: classes\activex.prg => TACTIVEX&#058;ONEVENT(0)
   Called from:  => WINRUN(0)

 


e este erro em hb_out.log

Code: Select all  Expand view

Application Internal Error - C:\myfwh\act5.exe
Terminated at: 2009.08.21 10:48:08
Unrecoverable error 6005: Exception error:

    Exception Code:C0000005
    Exception Address:0045E118
    EAX:00000004  EBX:00000210  ECX:00000000  EDX:00000004
    ESI:001206AA  EDI:00000002  EBP:0013FCB4
    CS:EIP:001B:0045E118  SS:ESP:0023:0013FCB4
    DS:0023  ES:0023  FS:003B  GS:0000
    Flags:00010246
    CS:EIP: 8B 42 FC C7 00 00 01 00 00 8B 55 08 89 50 08 89
    SS:ESP: 0013FCCC 0041366F 005552E0 0013FD54 0040ECFC 003007EE 0013FCEC 0040ED1C 003007EE 00000210 00000002 001206AA 00000002 00000000 0013FD18 7E368734

    C stack:
    EIP:     EBP:       Frame: OldEBP, RetAddr, Params...
    0045E118 0013FCB4   0013FCCC 0041366F 005552E0 0013FD54 0040ECFC 003007EE
    0041366F 0013FCCC   0013FCEC 0040ED1C 003007EE 00000210 00000002 001206AA 00000002 00000000
    0040ED1C 0013FCEC   0013FD18 7E368734 003007EE 00000210 00000002 001206AA 0040ECFC DCBAABCD 00000000 0013FD54
    7E368734 0013FD18   0013FD80 7E368816 0040ECFC 003007EE 00000210 00000002 001206AA 00000000 003007EE 00BE5070
    7E368816 0013FD80   0013FDD4 7E36B4C0 00000000 0040ECFC 003007EE 00000210 00000002 001206AA 0085AA04 00000001
    7E36B4C0 0013FDD4   0013FDFC 7E36B50C 0085A9F0 00000210 00000002 001206AA 0040ECFC 00000000 00000000 00000000
    7E36B50C 0013FDFC   0013FE54 7C90E473 0013FE0C 00000018 0085A9F0 00000210 00000002 001206AA 0040ECFC 7E36B473
    7C90E473 0013FE54   0013FEB0 101145CD 00000000 00BE4458 003FC2A4 00BE4458 00BE4634 0013FEA4 10133DD6 FFFFFFFF
    101145CD 0013FEB0   0013FEC4 73D96889 004B661F 00BE4468 003FC294
    73D96889 0013FEC4   0013FED8 00471AE9 003FC2A4 00000000 00B3F4D4
    00471AE9 0013FED8   0013FEE4 004748F7 003FC2A4
    004748F7 0013FEE4   0013FEFC 004635C1 00B3F4D4 00B3589C 00B36BBC 00B36BBC
    004635C1 0013FEFC   0013FF0C 00463693 00B36BBC 00B36BAC
    00463693 0013FF0C   0013FF20 00471AE9 00B36BBC 0000008A 00B3658C
    00471AE9 0013FF20   0013FF2C 00474865 00B36BBC
    00474865 0013FF2C   0013FF44 004635C1 00B3658C 00162314 00587464 003F21EC
    004635C1 0013FF44   0013FF54 00463693 003F21EC 003BCBE4
    00463693 0013FF54   0013FF88 004720B8 003F21EC 00000000 00162314 00456841 004812D7 00000000 004C6364 00162314
    004720B8 0013FF88   0013FFB8 004C340F 00400000 00000000 00162314 0000000A 00000010 00000000 7FFD5000 7FFD5000
    004C340F 0013FFB8   0013FFF0 00000000 004C6364 7C816FE7 00000010 00000000 7FFD5000 8054A6ED 0013FFC8 87462020


Modules:
0x00400000 0x001AF000 C:\myfwh\act5.exe
0x7C900000 0x000B6000 C:\WINDOWS\system32\ntdll.dll
0x7C800000 0x000FF000 C:\WINDOWS\system32\kernel32.dll
0x77F50000 0x000AB000 C:\WINDOWS\system32\ADVAPI32.DLL
0x77DB0000 0x00092000 C:\WINDOWS\system32\RPCRT4.dll
0x77F20000 0x00011000 C:\WINDOWS\system32\Secur32.dll
0x77BE0000 0x00008000 C:\WINDOWS\system32\VERSION.DLL
0x72FB0000 0x00026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x77BF0000 0x00058000 C:\WINDOWS\system32\msvcrt.dll
0x77E50000 0x00048000 C:\WINDOWS\system32\GDI32.dll
0x7E360000 0x00090000 C:\WINDOWS\system32\USER32.dll
0x773B0000 0x00103000 C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\COMCTL32.DLL
0x77EA0000 0x00076000 C:\WINDOWS\system32\SHLWAPI.dll
0x76380000 0x00048000 C:\WINDOWS\system32\COMDLG32.DLL
0x7C9C0000 0x0081D000 C:\WINDOWS\system32\SHELL32.dll
0x774C0000 0x0013D000 C:\WINDOWS\system32\OLE32.DLL
0x77100000 0x0008B000 C:\WINDOWS\system32\OLEAUT32.DLL
0x7DFC0000 0x00022000 C:\WINDOWS\system32\OLEDLG.DLL
0x76350000 0x00005000 C:\WINDOWS\system32\MSIMG32.DLL
0x76360000 0x0001D000 C:\WINDOWS\system32\IMM32.DLL
0x5B1C0000 0x00038000 C:\WINDOWS\system32\uxtheme.dll
0x746E0000 0x0004B000 C:\WINDOWS\system32\MSCTF.dll
0x77B20000 0x00022000 C:\WINDOWS\system32\apphelp.dll
0x75290000 0x0002E000 C:\WINDOWS\system32\msctfime.ime
0x76FB0000 0x0007F000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77030000 0x000CD000 C:\WINDOWS\system32\COMRes.dll
0x10000000 0x00236000 C:\ARQUIV~1\CODEJO~1\ActiveX\XTREME~1.0(3\Bin\CODEJO~2.OCX
0x73D80000 0x000FE000 C:\WINDOWS\system32\MFC42.DLL
0x5F250000 0x00017000 C:\WINDOWS\system32\OLEPRO32.DLL
0x76B20000 0x0002E000 C:\WINDOWS\system32\WINMM.dll
0x61E40000 0x0000E000 C:\WINDOWS\system32\MFC42LOC.DLL
0x75E60000 0x000B0000 C:\WINDOWS\system32\SXS.DLL
0x72CD0000 0x00009000 C:\WINDOWS\system32\wdmaud.drv
0x76C100
 
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Antonio Linares » Fri Aug 21, 2009 4:12 pm

Rossine,

Sí, porque ahora la DATA hObj se llama __hObj en Harbour :-)
regards, saludos

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

Re: Erro com 9.07

Postby Rossine » Fri Aug 21, 2009 7:05 pm

Olá Antonio,

Sí, porque ahora la DATA hObj se llama __hObj en Harbour

OK

Eu mudei o código para isto:
Code: Select all  Expand view

function RibbonBarEvent( cEvent, aParams, pParams, aButtons, oWnd )

   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" )
                   
              case aButtons[ 6 ]:__hObj == aParams[ 1 ]
                   oWnd:End()      
                               
              case aButtons[ 7 ]:__hObj == aParams[ 1 ]
                   oWnd:End()
                   
              case aButtons[ 8 ]:__hObj == aParams[ 1 ]
                   MsgInfo( "FWH's ActiveX Power support Codejock", "About Codejock" )      
                   
              case aButtons[ 9 ]:__hObj == aParams[ 1 ]
                   PrinterSetup()  
           endcase        
   endcase        
   
return nil

 


...e agora está dando erro neste teste:

Code: Select all  Expand view

   Error occurred at: 08/21/09, 15:58:36
   Error description: Error BASE/1070  Argument error: ==
   Args:
     [   1] = P  
     [   2] = O   WIN_OLEAUTO

Stack Calls
===========
   Called from: act5.prg => RIBBONBAREVENT(256)
   Called from: act5.prg => (b)MAIN(62)
   Called from: classes\activex.prg => TACTIVEX&#058;ONEVENT(0)
   Called from:  => WINRUN(0)
   Called from: classes\window.prg => TWINDOW:ACTIVATE(0)
   Called from: act5.prg => MAIN(245)
 



Porque case aButtons[ 1 ]:__hObj é um ponteiro e aParams[ 1 ] é um objeto

aButtons[ 1 ]:__hObj = P - 0x00B41324
aParams[ 1 ] = O

Como fazer este teste agora com esta mudança ?

Outra coisa que reparei é que também dá erro de execução quando eu tiro o comentario destas linhas:

Code: Select all  Expand view


*   oAct:Do( "VisualTheme", .T. )
...    
*   oRb:ShowQuickAccessBelowRibbon(.F.)
*   oRb:ShowCaptionAlways(.T.)
*   oRb:ShowQuickAccess(.T.)  
...
*   oSysButton:IconId( 5 )
...
*   oTabFiles_Grp1:ControlGroupOption:IconId(3)
 


Porque não está mais aceitando estas propriedades ?

mil Gracias :D
Obrigado, Regards, Saludos

Rossine.

Harbour and Harbour++
Rossine
 
Posts: 344
Joined: Tue Oct 11, 2005 11:33 am

Re: Erro com 9.07

Postby Antonio Linares » Fri Aug 21, 2009 8:30 pm

Rossine,

Prueba asi:

case aButtons[ 1 ]:__hObj == aParams[ 1 ]:__hObj
regards, saludos

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

Next

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests

cron