Toninho,

Thanks for your help.

Fortunately we got our previous working Harbour code working again :-)

Antonio

El 19 de agosto de 2009 18:14, toni...@fwi<[email protected]> escribió:
> Hi, sorry to jump in.
>
>>In FWH Class TActiveX we use this code (which was working fine with
>>previous OleAuto version):
>
> I have a working class for TActiveX that user current SVN, here it is:
>
> ---cut---
> #include "hbclass.ch"
>
> //------------------------------------------------------------------------------------------------------------------//
>
> CLASS TActiveX FROM TControl
>
>   CLASSDATA lRegistered AS LOGICAL INIT .f.
>
>   DATA cProgID AS STRING
>
>   DATA oOle AS OBJECT
>
>   DATA bEvent
>
>   METHOD New( oWnd, cProgId, nTop, nLeft, nBottom, nRight, bEvent )
> CONSTRUCTOR
>
>   METHOD Redefine( oWnd, nId, cProgID, bEvent ) CONSTRUCTOR
>
>   METHOD Initiate( hDlg ) INLINE ::Super:Initiate( hDlg ),
> ::Default()
>
>   METHOD Default()
>
>   ERROR HANDLER OnError()
>
> ENDCLASS
>
> //------------------------------------------------------------------------------------------------------------------//
>
> METHOD New( oWnd, cProgId, nTop, nLeft, nBottom, nRight, bEvent )
> CLASS TActiveX
>
>   DEFAULT nTop    := oWnd:nTop
>   DEFAULT nLeft   := oWnd:nLeft
>   DEFAULT nBottom := oWnd:nBottom
>   DEFAULT nRight  := oWnd:nRight
>
>   ::oWnd    = oWnd
>   ::cProgId = cProgId
>   ::nTop    = nTop
>   ::nLeft   = nLeft
>   ::nBottom = nBottom
>   ::nRight  = nRight + GetSysMetrics( SM_CYVSCROLL )
>   ::nId     = ::GetNewId()
>   ::nStyle  = nOR( WS_CHILD, WS_VISIBLE )
>   ::bEvent  = bEvent
>
>   ::Register()
>
>   if !Empty( oWnd:hWnd )
>
>      ::Create()
>
>      oWnd:AddControl( Self )
>
>   else
>
>      oWnd:DefControl( Self )
>
>   endif
>
>   ::Default()
>
> return Self
>
> //------------------------------------------------------------------------------------------------------------------//
>
> METHOD Redefine( oWnd, nId, cProgID, bEvent ) CLASS TActiveX
>
>   ::oWnd    = oWnd
>   ::nId     = nId
>   ::cProgId = cProgId
>   ::nStyle  = nOR( WS_CHILD, WS_VISIBLE )
>   ::bEvent  = bEvent
>
>   ::Register( nOR( CS_VREDRAW, CS_HREDRAW ) )
>
>   oWnd:DefControl( Self )
>
> return Self
>
> //------------------------------------------------------------------------------------------------------------------//
>
> METHOD Default() CLASS TActiveX
>
>   WIN_AxInit()
>
>   ::oOle = WIN_AxGetControl( WApi_CreateWindowEX( 0, "AtlAxWin",
> ::cProgId, ::nStyle, ::nLeft, ::nTop, ::nWidth, ::nHeight, win_N2P(
> ::hWnd ), 0 ), ::bEvent )
>
> return nil
>
> //------------------------------------------------------------------------------------------------------------------//
>
> METHOD OnError() CLASS TActiveX
> return HB_ExecFromArray( ::oOle, __GetMessage(), HB_AParams() )
> ---cut---
>
>
> I hope this can help,
>
> Regards,
>
> Toninho.
>
> __________________________________________________
> Faça ligações para outros computadores com o novo Yahoo! Messenger
> http://br.beta.messenger.yahoo.com/
> _______________________________________________
> Harbour mailing list
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
>
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to