ClassWizard derived-class message maps
Paul.B.Folbrecht@JCI.Com
Thursday, July 25, 1996
Environment: VC++ 4.1, Win95
I have noticed that ClassWizard, when dealing with a class derived
more than one level deep from an MFC class, will not recognize the
type of class and will not give a complete choice of messages. It
instead gives you nothing but the standard CWnd (WM_???) messages to
choose from. This forces me to hand-write the macros for specific
messages like CBN_SELCHANGE, etc. To make clear what I'm talking
about:
class Combo1 : public CComboBox {...}; class Combo2 : public CCombo1
{...};
When you open CW with Combo1, you get the full range of messages to
choose from, including CBN_???. However, with Combo2, you don't.
This is probably just a bug, but does anyone know any workaround?
-Paul Folbrecht
Compuware Corp.
Marty Fried -- mfried@linex.com
Sunday, July 28, 1996
One workaround that I believe will work is to derive the combo2 from
a standard CComboBox, then edit the source and change it to CCombo1.
There may be a more correct method, such as importing the CCombo1
class into the class wizard, but I haven't actually tried that.
Marty Fried (mfried@linex.com)
Marin County, Calif
--------------------------
At 08:44 AM 7/25/96 -0600, Paul.B.Folbrecht@JCI.Com wrote:
> Environment: VC++ 4.1, Win95
>
> I have noticed that ClassWizard, when dealing with a class derived
> more than one level deep from an MFC class, will not recognize the
> type of class and will not give a complete choice of messages. It
> instead gives you nothing but the standard CWnd (WM_???) messages to
> choose from. This forces me to hand-write the macros for specific
> messages like CBN_SELCHANGE, etc. To make clear what I'm talking
> about:
>
> class Combo1 : public CComboBox {...}; class Combo2 : public CCombo1
> {...};
>
> When you open CW with Combo1, you get the full range of messages to
> choose from, including CBN_???. However, with Combo2, you don't.
>
> This is probably just a bug, but does anyone know any workaround?
>
> -Paul Folbrecht
> Compuware Corp.
>
>
Svetlana Guljajeva -- svetlana@assert.ee
Monday, July 29, 1996
Environment: MFC 4.0,Win95
Hello!
I had the same problem ,but I think I found the workaround...
Try to remove this class from ClassWizard and insert it again.Then do Update
All Dependencies.
It must work.
Regards!
Svetlana Guljajeva
** svetlana@assert.ee **
| Вернуться в корень Архива
|