Project

General

Profile

Just a question

Added by Kubilay Kaan about 13 years ago

Is it possible using ocx libraries in wt??


Replies (3)

RE: Just a question - Added by Wim Dumon about 13 years ago

Hello,

In respect to using libraries, Wt is like any other C application. I haven't used OCX libraries myself, but my understanding is that it is possible to interact with them from C, hence also from a Wt application.

Best regards,

Wim.

RE: Just a question - Added by Kubilay Kaan about 13 years ago

Hmm, ok interacting with c or Wt as a c Framework is trivial. As I ask the question, I think of say custom controls as ocx.

Is it possible to use custom controls in or on Wt application??

Mfg

K.K.

RE: Just a question - Added by Wim Dumon about 13 years ago

Hello,

Again, I'm not a specialist in the matter, but I'll give it a try.

I'd assume that you can interact with an ocx in much the same way as Flash is handled, which means that you can do this by (1) instantiating the proper DOM element and (2) use JavaScript to interact with that DOM element.

Point (2) should be handled by Wt's normal features for interacting with JS (WWidget::doJavaScript() and JSlot). While for (1) in the case of Flash we have a convenient WFlashObject, we don't have something similar for OCX. You can either take inspiration from WFlashObject and implement your WActiveXObject (WFlashObject is complicated by its support for layout managers and fallbacks; not sure if you need those), or alternatively you can instantiate your OCX in the browser by simply rendering the required dom element as a WText (with the 'unsafe' attribute).

Best regards,

Wim.

    (1-3/3)