From: Landon on
I have changed the CListBox type to CCheckListBox type but when I tried to
DoModal the dialog with CListBox inside it, a runtime error occured.

It was related with something of PreSubClassWindow( and when I change it
back to CListBox, the dialog can be called well.

What did I miss? Do I need to declare or initializing the CCheckListBox
class?

How to do that?

Thank you.
From: Joseph M. Newcomer on
Well, did you look at what the error was? Certainly, it was the ASSERT that said the
listbox must be owner-draw, in which case the solution is obvious: make the listbox be
owner-draw. You are expected to actually read the comments on the assertions. That's
why the comments are there, and why you have a debugger. Of course, this presumes that
you actually followed the instructions to enter the debugger...
joe

On Tue, 15 Jul 2008 01:56:03 -0700, Landon <Landon(a)discussions.microsoft.com> wrote:

>I have changed the CListBox type to CCheckListBox type but when I tried to
>DoModal the dialog with CListBox inside it, a runtime error occured.
>
>It was related with something of PreSubClassWindow( and when I change it
>back to CListBox, the dialog can be called well.
>
>What did I miss? Do I need to declare or initializing the CCheckListBox
>class?
>
>How to do that?
>
>Thank you.
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Victor on
Yes, Joe! You are, of course, right.
But VC++6.0 does support LVS_EX_CHECKBOXES style and doesn't need any
additional PSDK. Only "version 4.70 of the Common Controls" what means -
Microsoft® Internet Explorer 3.x and higher.
On the other hand, OP seems to not know what exactly his VC supports and
what it doesn't.

Regards,
Victor

"Joseph M. Newcomer" wrote:

> It is often the case that when someone refers to "4.2" they are *really* referring to
> MFC42.DLL, which was the name through VC6.
> joe
>
> On Mon, 14 Jul 2008 22:04:03 +0200, "Victor" <nijegorodov.otpusk(a)freenet.de> wrote:
>
> >Hi, Joe!
> >The most recent Platform SDK compatible with the VC++6.0 is from February
> >2003.
> >However, OP seems to use more older VC version: VC++4.2 ???
> >
> >Victor
> >
> >"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
> >news:dhtm74ddq5mglftmdsq7qvdp8c1cn39amv(a)4ax.com...
> >> "Connected with"? What does that mean?
> >>
> >> If it is a separate program, it can be in any language you want, including
> >> C# or VB.
> >>
> >> If it is going to be in a DLL (that is, it is not an "application" but a
> >> "component"), you
> >> can still write it in VS6; I have been using CCheckListBox for years.
> >>
> >> Note that you may be confusing the Platform SDK with the MFC library; they
> >> are not the
> >> same. You want the most recent Platform SDK that works with VS6 (I have a
> >> vague memory it
> >> is the one from October 2003, but I may have misremembered).
> >>
> >> But I know of no reason CCheckListBox should not work.
> >> joe
> >>
> >> On Mon, 14 Jul 2008 02:13:00 -0700, Landon
> >> <Landon(a)discussions.microsoft.com> wrote:
> >>
> >>>I'm afraid I cannot do that because the this application will be connected
> >>>with the old application developed with the 4.2.
> >>>
> >>>Any other ideas?
> >>>
> >>>Thank u.
> >> Joseph M. Newcomer [MVP]
> >> email: newcomer(a)flounder.com
> >> Web: http://www.flounder.com
> >> MVP Tips: http://www.flounder.com/mvp_tips.htm
> >
> Joseph M. Newcomer [MVP]
> email: newcomer(a)flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
>
From: Joseph M. Newcomer on
Note that in some cases the right #define must be set in stdafx.h; if the IE version is
too low, those advanced features become undefined symbols.

The treatment of the header files as "magic" is unfortunate; if I get an undefined symbol
like this, the first thing I do is to see if I spelled it correctly, then make sure it is
in a header file somewhere, and make sure I've included the header file. I will then make
sure that it is not under some

#if SOMEVER > 0xnnnn

conditional. But too many people seem to be afraid to actually look any of this up. One
of the most powerful tools available is find-in-files, and it should be an essential tool
every programmer takes for granted.

(Of course, one could question why something like "common controls" are coupled to the
release of a *browser*, but it is already well-established that Microsoft was
fundamentally clueless here)
joe

On Tue, 15 Jul 2008 06:39:02 -0700, Victor <Victor(a)discussions.microsoft.com> wrote:

>Yes, Joe! You are, of course, right.
>But VC++6.0 does support LVS_EX_CHECKBOXES style and doesn't need any
>additional PSDK. Only "version 4.70 of the Common Controls" what means -
>Microsoft� Internet Explorer 3.x and higher.
>On the other hand, OP seems to not know what exactly his VC supports and
>what it doesn't.
>
>Regards,
>Victor
>
>"Joseph M. Newcomer" wrote:
>
>> It is often the case that when someone refers to "4.2" they are *really* referring to
>> MFC42.DLL, which was the name through VC6.
>> joe
>>
>> On Mon, 14 Jul 2008 22:04:03 +0200, "Victor" <nijegorodov.otpusk(a)freenet.de> wrote:
>>
>> >Hi, Joe!
>> >The most recent Platform SDK compatible with the VC++6.0 is from February
>> >2003.
>> >However, OP seems to use more older VC version: VC++4.2 ???
>> >
>> >Victor
>> >
>> >"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
>> >news:dhtm74ddq5mglftmdsq7qvdp8c1cn39amv(a)4ax.com...
>> >> "Connected with"? What does that mean?
>> >>
>> >> If it is a separate program, it can be in any language you want, including
>> >> C# or VB.
>> >>
>> >> If it is going to be in a DLL (that is, it is not an "application" but a
>> >> "component"), you
>> >> can still write it in VS6; I have been using CCheckListBox for years.
>> >>
>> >> Note that you may be confusing the Platform SDK with the MFC library; they
>> >> are not the
>> >> same. You want the most recent Platform SDK that works with VS6 (I have a
>> >> vague memory it
>> >> is the one from October 2003, but I may have misremembered).
>> >>
>> >> But I know of no reason CCheckListBox should not work.
>> >> joe
>> >>
>> >> On Mon, 14 Jul 2008 02:13:00 -0700, Landon
>> >> <Landon(a)discussions.microsoft.com> wrote:
>> >>
>> >>>I'm afraid I cannot do that because the this application will be connected
>> >>>with the old application developed with the 4.2.
>> >>>
>> >>>Any other ideas?
>> >>>
>> >>>Thank u.
>> >> Joseph M. Newcomer [MVP]
>> >> email: newcomer(a)flounder.com
>> >> Web: http://www.flounder.com
>> >> MVP Tips: http://www.flounder.com/mvp_tips.htm
>> >
>> Joseph M. Newcomer [MVP]
>> email: newcomer(a)flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Landon on
Yes, you were right and I have checked the properties and now it is working
fine.

At first, I did not know what error it was. Then I find it and I realize
that I must do something with the control's properties.

Thank you very much.