From: "H.Vidal, Jr." on
Howdy.

I am having a rather specific issue with ActiveX usage under
wxWidgets.

The example at:
http://www.wxwidgets.org/manuals/stable/wx_wxactivexcontainer.html#wxactivexcontainer

Is fairly specific, so I am trying to emulate this with regards to Flash
usage.

However, even though I have copied the code fairly closely (and am a
fairly seasoned C++ programmer), I am seeing a problem that suggests
my platform has simply decided not to allow OLE objects such
as wxActiveXContainer.

Platform:
WindowsXP

Compiler:
Cygwin suite, latest and greatest)
(which I am pretty sure is 3.4.4)

wxwidgets 2.8.0 was installed with:

--with-msw --enabled-debug --enable-debug_gdb --disable-shared

However, when I use a type as in:

wxActiveXContainer *m_pActiveX;

(of course, including files
#include "wx/msw/ole/activex.h" // wxActiveXContainer
#include "wx/msw/ole/automtn.h" // wxAutomationObject )

The compilation yields

ISO C++ forbids declaration of 'wxActiveXContainer' with no type

A bit of poking around suggests that there is a define that must be
set called

wxUSE_ACTIVEX

that enables the class body and such in the code. However this code:

#if defined(wx_USE_ACTIVEX)
#warning "ACTIVEX is ON"
#else
#warning "ACTIVEX is OFF"
#endif

of course, displays.....ACTIVEX is OFF

To be fair, my code is a bit different from example code in that,
as a test, I am embedding wxActiveXContainer in my wxFrame derived
class. This is just a test bed, I just want to see if I can get
things to compile. Perhaps one cannot do this (as in wxFrame),
perhaps there are other magic incantations that allow the wxActiveXContainer
to exist in other-than-wxFrame classes, using some other magical mystery
macro. I just can't tell, wxActiveX... stuff is not really all that
documented.

So, your collective wisdom and insights would be greatly appreciated.

Many thanks. If I posted incorrectly somehow, please pardon me, it's
my first post to list.

hvidal

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Vadim Zeitlin on
On Wed, 07 Feb 2007 09:41:19 -0500 "H.Vidal, Jr." <hvidal(a)tesseract-tech.com> wrote:

HJ> A bit of poking around suggests that there is a define that must be
HJ> set called
HJ>
HJ> wxUSE_ACTIVEX
HJ>
HJ> that enables the class body and such in the code. However this code:
HJ>
HJ> #if defined(wx_USE_ACTIVEX)
HJ> #warning "ACTIVEX is ON"
HJ> #else
HJ> #warning "ACTIVEX is OFF"
HJ> #endif
HJ>
HJ> of course, displays.....ACTIVEX is OFF

It looks like wxUSE_ACTIVEX is not set by configure. As a quick
workaround, you should be able to just edit the setup.h file created by
configure and add "#define wxUSE_ACTIVEX 1" to it (and rebuild). And I'll
(really) fix it in the cvs.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "H.Vidal, Jr." on
Vadim Zeitlin wrote:
> On Wed, 07 Feb 2007 09:41:19 -0500 "H.Vidal, Jr." <hvidal(a)tesseract-tech.com> wrote:
>
> HJ> A bit of poking around suggests that there is a define that must be
> HJ> set called
> HJ>
> HJ> wxUSE_ACTIVEX
> HJ>
> HJ> that enables the class body and such in the code. However this code:
> HJ>
> HJ> #if defined(wx_USE_ACTIVEX)
> HJ> #warning "ACTIVEX is ON"
> HJ> #else
> HJ> #warning "ACTIVEX is OFF"
> HJ> #endif
> HJ>
> HJ> of course, displays.....ACTIVEX is OFF
>
> It looks like wxUSE_ACTIVEX is not set by configure. As a quick
> workaround, you should be able to just edit the setup.h file created by
> configure and add "#define wxUSE_ACTIVEX 1" to it (and rebuild). And I'll
> (really) fix it in the cvs.
>
> Regards,
> VZ
>
Much double plus good:::

After a check of this file:

(relative to directory from 'build/' relative to wx-widgets install:)
lib/wx/include/msw-ansi-debug-static-2.8/wx/setup.h

Indeed, wxUSE_ACTIVEX was set to 0

So I set it to 1

then issued a 'make clean' from 'build/' directory.
Then a 'make.'

Voila! Running the make for my .o file was successful.
That is, compilation of 'sources' was fine, meaning that g++ found
all relevant prototypes and such, and happily built code.

However, libraries did not want to cooperate. Issuing a build
with `wx-config --libs` as is prescribed yielded:

undefined reference to
wxActiveXContainer::wxActiveXContainer(wxWindow*, _GUID const&, IUnknown*)

So it seems that the hack on 'setup.h' fixed things for availability of
class prototype, but '--libs' query did not correctly yield a missing
library where wxActiveXContainer lives.

Any thoughts on how one might tackle this?

hvidal

p.s. Many Thanks!!! for this truly useful bit of code, wxWidgets,
it's really a lot of run and most productive to run with.

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "H.Vidal, Jr." on
Please see interspersed comments:

Vadim Zeitlin wrote:
> On Wed, 07 Feb 2007 13:15:16 -0500 "H.Vidal, Jr." <hvidal(a)tesseract-tech.com> wrote:
>
> HJ> So I set it to 1
> HJ>
> HJ> then issued a 'make clean' from 'build/' directory.
> HJ> Then a 'make.'
>
> Sorry, it's not clear: did you do make clean for wx itself or just your
> application?

'make clean' was issued inside wxwidgets.../build directory,
and, of course, inside 'my code's' build directory, just to be safe.

> HJ> However, libraries did not want to cooperate. Issuing a build
> HJ> with `wx-config --libs` as is prescribed yielded:
>
> `wx-config --libs` doesn't include media lib (which is a relatively new
> one and so not subject to backwards compatible behaviour of --libs option),
> you need to use `wx-config --libs std,media` to get it.

Does either of 'std' or 'media' lib, in above noted syntax,
force availability or flags of library containing built wxActiveXContainer
class?

Incidentally, the same syndrome as discussed before (ISO C++ forbids no type
declaration, or whatever, for class xxxx...) applies to wxMediaCtrl, whether one builds
with --enable-mediactrl or not....

Same problem in ./configure???

Thanks.

hv

> Regards,
> VZ
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "H.Vidal, Jr." on
Vadim Zeitlin wrote:
> On Wed, 07 Feb 2007 14:55:53 -0500 "H.Vidal, Jr." <hvidal(a)tesseract-tech.com> wrote:
>
> HJ> > `wx-config --libs` doesn't include media lib (which is a relatively new
> HJ> > one and so not subject to backwards compatible behaviour of --libs option),
> HJ> > you need to use `wx-config --libs std,media` to get it.
> HJ>
> HJ> Does either of 'std' or 'media' lib, in above noted syntax,
> HJ> force availability or flags of library containing built wxActiveXContainer
> HJ> class?
>
> Yes, wxActiveXContainer is currently included in the media lib. It doesn't
> make much sense to me to be honest, although it is only used by wxMediaCtrl
> currently it doesn't mean it can't be used by user code which is not
> interested in wxMediaCtrl, as it seems to be the case for you. OTOH I don't
> know what library does this belong to, not really core so adv probably.
>
> HJ> Incidentally, the same syndrome as discussed before (ISO C++ forbids no type
> HJ> declaration, or whatever, for class xxxx...) applies to wxMediaCtrl, whether one builds
> HJ> with --enable-mediactrl or not....
> HJ>
> HJ> Same problem in ./configure???
>
> This is strange, it should compile the media library if you give
> --enable-mediactrl. Do notice that it is turned off by default, so you need
> to rerun configure with this option.

Yes, this also occurred to me after I tried test, but I have not been able
to re-build with this option for lack of availability of dev machine
(it is being used for games at the moment by non-programmers in-house...).
Food for tomorrow's thoughts.....

So, I will continue to advise as I test/find out more.

Is there a *substantial* tutorial somewhere on wxActiveXContainer and
wxAutomationObject? I know this is *very* platform and,
in fact, COM specific, but this would certainly be useful for the
damned among us who prefer unix but have customers demanding
Windows support.

Also, has wxWidgets (including ActiveX bits) been tested with Win Vista?

Again, many thanks.

hv

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org