15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


VC42b and ActiveX SDK => problems

Riso Nemec -- nemec@softec.sk
Wednesday, November 20, 1996

Environment: VC++ 4.2b, Win95, ActiveX SDK

1. VisualC++ 4.0 had old version of common controls header file
   (commctrl.h ver 1.0).
2. The version 4.2 had new version of the 'commctrl.h' file (ver 1.2)
   with InitCommonControlsEx() function (and others).
3. The 4.2b patch returned the version of commctrl.h file back
   to 1.0 (without *Ex() functions).
4. Installing ActiveX SDK (from www.microsoft.com) new version
   of 'commctrl.h' appears (says ver 1.2, but not the same as
   in VC++ 4.2) having all *Ex() functions.
5. Unfortunately in this file are renamed some structures
   used in C*Ctrl MFC classes (e.g. _LV_ITEMA to LVITEMA etc.)
   and linking of MFC-based project doesn't work.
6. Experiments with the file show that some changes in the
   commctrl.h file (1.2 from ActiveX SDK) may help:
   - rename struct LVITEMA back to struct _LV_ITEMA
   - typedef LVITEMA as _LV_ITEMA
   and the same with all problematic structs.

Q1: Is this correct?
Q2: Does anybody have working version of the commctrl.h file?

Thanks

Richard

  ___  ___  ____ _   ___________________________________________________
 / __)/   \|    ) |  Richard NEMEC, SOFTEC, Bratislava, Slovakia, Europe
(___ \  |  \   (| |  phone:  +42-7-273805
(_____)____/_|\_\_|  e-mail: nemec@softec.sk
 ____ _  ___  ___    www:    http://www.fmph.uniba.sk/~nemec
|    ) |/ __)/   \           http://softec.softec.sk/~nemec
|   (| |___ \  |  \  hobby:  iveta@home.dnv.sk
|_|\_\_|_____)____/  ___________________________________________________




Mike Blaszczak -- mikeblas@nwlink.com
Thursday, November 21, 1996

At 10:27 11/20/96 +-100, Riso Nemec wrote:
>Environment: VC++ 4.2b, Win95, ActiveX SDK

>1. VisualC++ 4.0 had old version of common controls header file
>   (commctrl.h ver 1.0).

Yes.

>2. The version 4.2 had new version of the 'commctrl.h' file (ver 1.2)
>   with InitCommonControlsEx() function (and others).

These weren't new: they were beta versions that the systems guys told
us to ship before they should have.  This has been frequently addressed
on the list.

>3. The 4.2b patch returned the version of commctrl.h file back
>   to 1.0 (without *Ex() functions).

Yep.

>4. Installing ActiveX SDK (from www.microsoft.com) new version
>   of 'commctrl.h' appears (says ver 1.2, but not the same as
>   in VC++ 4.2) having all *Ex() functions.

Yep.

>5. Unfortunately in this file are renamed some structures
>   used in C*Ctrl MFC classes (e.g. _LV_ITEMA to LVITEMA etc.)
>   and linking of MFC-based project doesn't work.

You must use the version installed by the patch.  You don't
give specific error messages, so I can't tell you if you have
the wrong headers or if you incorrectly patched the libraries.
I've answered this question no less than six times on the list,
and other people have probably answered it a couple of times,
too.  So maybe your best bet is to look for the answers on the list
archive.

>6. Experiments with the file show that some changes in the
>   commctrl.h file (1.2 from ActiveX SDK) may help:
>   - rename struct LVITEMA back to struct _LV_ITEMA
>   - typedef LVITEMA as _LV_ITEMA
>   and the same with all problematic structs.

Hacking system headers isn't a very good idea.  Some people would
call it pretty bad, in fact.

>Q1: Is this correct?

What does "this" refer to, in your question?

>Q2: Does anybody have working version of the commctrl.h file?

The MFC 4.2B patch does, if you install it correctly.

.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.




Riso Nemec -- nemec@softec.sk
Monday, November 25, 1996

Mike Blaszczak[SMTP:mikeblas@nwlink.com] wrote:
> >5. Unfortunately in this file are renamed some structures
> >   used in C*Ctrl MFC classes (e.g. _LV_ITEMA to LVITEMA etc.)
> >   and linking of MFC-based project doesn't work.
> 
> You must use the version installed by the patch.  You don't
> give specific error messages, so I can't tell you if you have
> the wrong headers or if you incorrectly patched the libraries.

The errors are quite clear:
cannot resolve external CListCtrl::GetItem(tagLVITEMA*) etc.
I understand that in MFCxxx.lib the method CListCtrl::GetItem(_LV_ITEMA*)
exists, but due to types renaming cannot be found.

I would be happy to find better solution than NOT using succesfully
implemented parts of code using *Ex() functions...

> I've answered this question no less than six times on the list,

sorry, mea maxima culpa

> Hacking system headers isn't a very good idea.  Some people would
> call it pretty bad, in fact.

I know it.
Moreover, this "solution" may make other functions unusable, but...

> >Q1: Is this correct?
> What does "this" refer to, in your question?

I mean: Is "hacking" the commctrl.h possible solution or are there
clear problems (e.g. in another functions or so)? 

> >Q2: Does anybody have working version of the commctrl.h file?
> The MFC 4.2B patch does, if you install it correctly.

Once more: Does anybody have working version of the commctrl.h
file with all *Ex() functions?


  ___  ___  ____ _   ___________________________________________________
 / __)/   \|    ) |  Richard NEMEC, SOFTEC, Bratislava, Slovakia, Europe
(___ \  |  \   (| |  phone:  +42-7-273805
(_____)____/_|\_\_|  e-mail: nemec@softec.sk
 ____ _  ___  ___    www:    http://www.fmph.uniba.sk/~nemec
|    ) |/ __)/   \           http://softec.softec.sk/~nemec
|   (| |___ \  |  \  hobby:  iveta@home.dnv.sk
|_|\_\_|_____)____/  ___________________________________________________




John W. Podlogar Jr. -- podlogar@telerama.lm.com
Tuesday, November 26, 1996

[Mini-digest: 2 responses]

I had these same problems. All I had to do was a "Rebuild All" all errors 
went away. I'd try doing the same.

John W. Podlogar Jr.    The wise man doesn't pose the right answers, 
podlogar@lm.com                         he asks the right questions. 
http://www.lm.com/~podlogar

On Mon, 25 Nov 1996, Riso Nemec wrote:

> Mike Blaszczak[SMTP:mikeblas@nwlink.com] wrote:
> > >5. Unfortunately in this file are renamed some structures
> > >   used in C*Ctrl MFC classes (e.g. _LV_ITEMA to LVITEMA etc.)
> > >   and linking of MFC-based project doesn't work.
> > 
> > You must use the version installed by the patch.  You don't
> > give specific error messages, so I can't tell you if you have
> > the wrong headers or if you incorrectly patched the libraries.
> 
> The errors are quite clear:
> cannot resolve external CListCtrl::GetItem(tagLVITEMA*) etc.
> I understand that in MFCxxx.lib the method CListCtrl::GetItem(_LV_ITEMA*)
> exists, but due to types renaming cannot be found.
> 
> I would be happy to find better solution than NOT using succesfully
> implemented parts of code using *Ex() functions...
> 
> > I've answered this question no less than six times on the list,
> 
> sorry, mea maxima culpa
> 
> > Hacking system headers isn't a very good idea.  Some people would
> > call it pretty bad, in fact.
> 
> I know it.
> Moreover, this "solution" may make other functions unusable, but...
> 
> > >Q1: Is this correct?
> > What does "this" refer to, in your question?
> 
> I mean: Is "hacking" the commctrl.h possible solution or are there
> clear problems (e.g. in another functions or so)? 
> 
> > >Q2: Does anybody have working version of the commctrl.h file?
> > The MFC 4.2B patch does, if you install it correctly.
> 
> Once more: Does anybody have working version of the commctrl.h
> file with all *Ex() functions?
> 
> 
>   ___  ___  ____ _   ___________________________________________________
>  / __)/   \|    ) |  Richard NEMEC, SOFTEC, Bratislava, Slovakia, Europe
> (___ \  |  \   (| |  phone:  +42-7-273805
> (_____)____/_|\_\_|  e-mail: nemec@softec.sk
>  ____ _  ___  ___    www:    http://www.fmph.uniba.sk/~nemec
> |    ) |/ __)/   \           http://softec.softec.sk/~nemec
> |   (| |___ \  |  \  hobby:  iveta@home.dnv.sk
> |_|\_\_|_____)____/  ___________________________________________________
> 
> 
-----From: Mike Blaszczak 

At 16:46 11/25/96 +-100, Riso Nemec wrote:

>I would be happy to find better solution than NOT using succesfully
>implemented parts of code using *Ex() functions...

There are no "Ex" functions in the shipping version of COMCTL32.LIB
or COMMCTRL.H.  The *Ex() functions in COMCTL32.DLL are in beta and
not publicly available. Even if you've successfully implemneted this
code, it can't leave your desk until the version of COMCTL32.DLL is
out of beta and been released.

>> >Q2: Does anybody have working version of the commctrl.h file?
>> The MFC 4.2B patch does, if you install it correctly.
>
>Once more: Does anybody have working version of the commctrl.h
>file with all *Ex() functions?

This is a different question than you asked before: you're not
repeating anything.

MFC 4.2B doesn't support the beta controls. MFC, by practice,
only supports shipping, viable portions of the operating system.
The version of COMCTL32.DLL which exports *Ex() functions isn't
a shipping part of the operating system--it's in beta.  When it's
finally released, MFC will provide support for it.

Until then, if you want to use the beta stuff, you'll need to find
a different solution.

.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |