Integrate HTML in a dialog

Integrate HTML in a dialog

Postby Jack » Sat Feb 13, 2010 12:47 pm

Hello,
A customer ask me to integrate a Html file in the right size of a Dialog .
How to ??
I suppose i have to use activex .
How to insert this control in a dialog (not a window) .

Thanks
Jack
 
Posts: 280
Joined: Wed Jul 11, 2007 11:06 am

Re: Integrate HTML in a dialog

Postby Antonio Linares » Sat Feb 13, 2010 12:48 pm

Jack,

Yes, you have to use an ActiveX.
There is a working example in FWH\samples\webexp.prg

To include it in a resource dialog, use "TACTIVEX" as the control name, similar as we do with "TWBROWSE" or "TXBROWSE".

You can review the ActiveX documentation from the FiveTech's wiki:
http://wiki.fivetechsoft.com/doku.php?id=fivewin_commands_activex
http://wiki.fivetechsoft.com/doku.php?id=fivewin_class_tactivex
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: Integrate HTML in a dialog

Postby Jack » Sat Feb 13, 2010 2:14 pm

Antonio,
Thanks for this help, it is working .
Does this control responce on this events : ON CLICK or ON Double Click .
I want to open a HTML Editor when the user click or double click on the control .

Thanks
Jack
 
Posts: 280
Joined: Wed Jul 11, 2007 11:06 am

Re: Integrate HTML in a dialog

Postby Antonio Linares » Sat Feb 13, 2010 6:32 pm

Jack,

Once the ActiveX is running, it is in control and we can not use oActiveX:bLClicked, double click, etc.

A solution would be to have a button close to the ActiveX and when clicked call to your HTML editor.

Another posibility is to detect the click on a <a ref> in the HTML and process the ActiveX "BeforeNavigate2" event.
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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 65 guests