From: Marc on
Hello.

Using Visual C++6, when we add the Microsoft FlexGrid activeX control to our
project, we have the 4 wrapper classes :
- CMSFlexGrid
- CRowCursor
- COleFont
- CPicture

but using Visual Studio 2005, there is only the wrapper for the IMSFlexGrid
interface.
How to automatically generate the missing classes COleFont, CPicture... ?

With many thanks.

Marc

From: Giovanni Dicanio on
"Marc" <no_spam(a)free.fr> ha scritto nel messaggio
news:upqptf#pKHA.1548(a)TK2MSFTNGP04.phx.gbl...

> Using Visual C++6, when we add the Microsoft FlexGrid activeX control to
> our project, we have the 4 wrapper classes :
[...]
> but using Visual Studio 2005, there is only the wrapper for the
> IMSFlexGrid interface.
> How to automatically generate the missing classes COleFont, CPicture... ?

I'm not sure, but this may be a bug of VS2005.

You may want to generate the wrappers using VC6, and then import code in a
VS2005 project.

In addition, you may want to consider other quality (and freely available)
C++/MFC grid components:

http://www.codeproject.com/KB/miscctrl/gridctrl.aspx
http://www.codeproject.com/KB/MFC/UltimateGrid.aspx

Giovanni



From: Marc on
This is not only for the flexgrid control, but for all controls.
If you have another VS version (for example Visual Studio 2008), could you
please try to add an wrapper class for such an activeX control (which may
integrate wrapper classes for COleFont or CPicture) and tell me if Visual
does its job correctly.

Marc

"Giovanni Dicanio" <giovanniDOTdicanio(a)REMOVEMEgmail.com> a �crit dans le
message de groupe de discussion : u5yEb2AqKHA.5480(a)TK2MSFTNGP04.phx.gbl...
> "Marc" <no_spam(a)free.fr> ha scritto nel messaggio
> news:upqptf#pKHA.1548(a)TK2MSFTNGP04.phx.gbl...
>
>> Using Visual C++6, when we add the Microsoft FlexGrid activeX control to
>> our project, we have the 4 wrapper classes :
> [...]
>> but using Visual Studio 2005, there is only the wrapper for the
>> IMSFlexGrid interface.
>> How to automatically generate the missing classes COleFont, CPicture... ?
>
> I'm not sure, but this may be a bug of VS2005.
>
> You may want to generate the wrappers using VC6, and then import code in a
> VS2005 project.
>
> In addition, you may want to consider other quality (and freely available)
> C++/MFC grid components:
>
> http://www.codeproject.com/KB/miscctrl/gridctrl.aspx
> http://www.codeproject.com/KB/MFC/UltimateGrid.aspx
>
> Giovanni
>
>
>
From: Giovanni Dicanio on
"Marc" <no_spam(a)free.fr> ha scritto nel messaggio
news:ed56ToJqKHA.5480(a)TK2MSFTNGP04.phx.gbl...

> This is not only for the flexgrid control, but for all controls.
> If you have another VS version (for example Visual Studio 2008), could you
> please try to add an wrapper class for such an activeX control (which may
> integrate wrapper classes for COleFont or CPicture) and tell me if Visual
> does its job correctly.

Unfortunately, I can't find the MS Flex Grid control installed on my system
(the corresponding ActiveX is not shown in the list of registered controls,
and I can't find the msflexgrid.ocx file either).

With VS2008 SP1 on a Win7 x64 PC, I tried creating a wrapper class for the
Microsoft Calendar Control, and I noted that a couple of methods are exposed
by the wrapper:

void put_DayFont(LPDISPATCH newValue)
LPDISPATCH get_DayFont()

Do you expect COleFont to be exposed directly?
It seems to me that late-binding IDispatch interface is used instead...

Unfortunately, I don't have VS6 installed on this machine so I can't verify
and compare VS2008 result vs. VC6 result.

Giovanni



From: Marc on
With my Calendar Control 8.0 (C:\windows\system32\mscal.ocx) :

VC++6 generates 2 wrapper classes CCalendar and COleFont
Opening the calendar.h generated file, I can see :
COleFont GetDayFont();
COleFont GetGridFont();
COleFont GetTitleFont();

VS2005 SP1 generates only one class CCalendar
Opening the calendar.h generated file, I can see :
LPDISPATCH get_DayFont()
LPDISPATCH get_GridFont()
LPDISPATCH get_TitleFont()

So, it seems that you have the same problem as me.
Is there a way to automatically create these COleFont or CPicture (or ...)
wrapper classes ?
I'm not supposed to use VC++6 anymore !

Marc

"Giovanni Dicanio" <giovanniDOTdicanio(a)REMOVEMEgmail.com> a �crit dans le
message de groupe de discussion : eT5KG3JqKHA.556(a)TK2MSFTNGP02.phx.gbl...
> "Marc" <no_spam(a)free.fr> ha scritto nel messaggio
> news:ed56ToJqKHA.5480(a)TK2MSFTNGP04.phx.gbl...
>
>> This is not only for the flexgrid control, but for all controls.
>> If you have another VS version (for example Visual Studio 2008), could
>> you please try to add an wrapper class for such an activeX control (which
>> may integrate wrapper classes for COleFont or CPicture) and tell me if
>> Visual does its job correctly.
>
> Unfortunately, I can't find the MS Flex Grid control installed on my
> system (the corresponding ActiveX is not shown in the list of registered
> controls, and I can't find the msflexgrid.ocx file either).
>
> With VS2008 SP1 on a Win7 x64 PC, I tried creating a wrapper class for the
> Microsoft Calendar Control, and I noted that a couple of methods are
> exposed by the wrapper:
>
> void put_DayFont(LPDISPATCH newValue)
> LPDISPATCH get_DayFont()
>
> Do you expect COleFont to be exposed directly?
> It seems to me that late-binding IDispatch interface is used instead...
>
> Unfortunately, I don't have VS6 installed on this machine so I can't
> verify and compare VS2008 result vs. VC6 result.
>
> Giovanni
>
>
>