FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ActiveX question?
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Mon Sep 25, 2006 09:06 AM
Hello Antonio,

If I define window for ActiveX, work fine.

DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" 

   oActiveX = TActiveX():New( oWnd, "oa.oactrl.1" )

   oWnd:oClient = oActiveX 

   oActiveX:Do( "ShowToolBars", .t. )
   oActiveX:Do( "Open", "c:\計算.xls" )
   
   ACTIVATE WINDOW ownd on init oActiveX:Do( "Open", "c:\計算.xls" )


If I define Dialog for ActiveX, work. but disappear any action.

DEFINE DIALOG oDlg RESOURCE "D_DR_WIN_TestActiveX"

         REDEFINE ACTIVEX oActiveX ID 10000 OF oDlg ;     PROGID "oa.oactrl.1"
        
  ACTIVATE DIALOG oDlg CENTER on init  init oActiveX:Do( "Open", "c:\計算.xls" )


I use xHarbour 0.99.4+FWH2.6+BCC55

Regards,

Richard
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
ActiveX question?
Posted: Mon Sep 25, 2006 09:32 AM

Richard,

Have you defined the activex control in your RC as "TActiveX" ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Mon Sep 25, 2006 02:13 PM

Hello Antonio,

Yes, I had define it as you said.

Richard

Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Mon Sep 25, 2006 02:16 PM
Hello Antonio,

This is my Resource RC below:

D_DR_WIN_TESTACTIVEX DIALOG 4, 36, 458, 263
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "ActiveX"
FONT 12, "細明體"
{
 CONTROL "", 10000, "TActiveX", 0 | WS_CHILD | WS_VISIBLE, 3, 2, 454, 260
}


Richard
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Mon Sep 25, 2006 02:33 PM
Hello Antonio,

I found new question below:

DEFINE DIALOG oDlg RESOURCE "D_DR_WIN_TestActiveX"

         REDEFINE ACTIVEX oActiveX ID 10000 OF oDlg ;
                        PROGID "oa.oactrl.1"

         oActiveX:Do( "ShowToolBars", .t. )    ==> New add
         oActiveX:Do( "Open", "c:\計算.xls" )  ==> New add

ACTIVATE DIALOG oDlg CENTER ;
                on init ( oActiveX:Do( "ShowToolBars", .t. ),;
                            oActiveX:Do( "Open", "c:\計算.xls" ) )


If I New add two line code and get GPF occurred.
Called from ACTXPDISP(0)
Called from TACTIVEX:DO(297)
Called from TestActiveX(197)
.......
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
ActiveX question?
Posted: Mon Sep 25, 2006 03:51 PM

Richard,

You can not send msgs to the activex before the dialogbox has been initialized, as the activex has not been initialized yet too.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Tue Sep 26, 2006 01:15 AM

Hello Antonio,

I see.
But why not appear in my Resource ActiveX? if I have not add New line.

Richard

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
ActiveX question?
Posted: Tue Sep 26, 2006 09:29 AM

Richard,

> But why not appear in my Resource ActiveX? if I have not add New line.

I don't understand what you mean, sorry.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Wed Sep 27, 2006 12:47 AM

Hello Antonio,

Let's return first message. Please review my codes.
My code use 1.DEFINE WINDOW 2.REDEFINE DIALOG

Problem is REDEFINE DIALOG .... REDEFINE ACTIVEX
Why not disappear ActiveX function?

Regards,

Richard

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
ActiveX question?
Posted: Wed Sep 27, 2006 06:16 AM

Richard,

Do you mean that oActiveX:Do( "Open", "c:\計算.xls" )
does not work ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 128
Joined: Mon Jul 31, 2006 03:23 PM
ActiveX question?
Posted: Wed Sep 27, 2006 08:49 AM

Richard,

Only DEFINE WINDOW can use with ActiveX

this is same with DEFINE TIMER

TIMER CAN'T work with DIALOG

Best Regard
areang

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
ActiveX question?
Posted: Wed Sep 27, 2006 09:42 AM
This is not true:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oTmr

    DEFINE DIALOG oDlg

    DEFINE TIMER oTmr OF oDlg;
           INTERVAL 1000;
           ACTION TONE( 440, 1 )

    ACTIVATE DIALOG oDlg;
             ON INIT ( oTmr:hWndOwner := oDlg:hWnd,;
                       oTmr:Activate() );
             CENTER

    RELEASE TIMER oTmr

    RETURN NIL


EMG
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Thu Sep 28, 2006 01:14 AM
Hello Antonio,

Antonio Linares wrote:Richard,

Do you mean that oActiveX:Do( "Open", "c:\計算.xls" )
does not work ?


Yes, it's not work(Disappear).

Richard
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
ActiveX question?
Posted: Thu Sep 28, 2006 05:41 AM

Richard,

What do you mean with "disappear" ? Does the ActiveX gets hidden ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 218
Joined: Fri Oct 07, 2005 01:55 AM
ActiveX question?
Posted: Fri Sep 29, 2006 07:07 AM
Antonio Linares wrote:Richard,

What do you mean with "disappear" ? Does the ActiveX gets hidden ?


Hello Antonio,

Look it.
DEFINE WINDOW OK.


DEFINE DIALOG
REDEFINE ACTIVEX not display


Richard