Dj_Fx8
asked on
'class' type redefinition
Hi
My app is a 4x4 splitter, with 4 Formviews (frmV1, frmV2, frmV3, frmV4), in frmV4 is a tab ctrl with 4 dialogs (dlg1, dlg2 dlg3, dlg4). Now in frmV1 I inserted a custom ctrl (KsVolumeDisplay)some time ago, and it has worked well, but now I inserted the control into dlg4 and used the class wiz to create a member var of type voulme display control, when I complie I get the following error msg
error C2011: 'CKsVolumeDisplay' : 'class' type redefinition
in 14 of my classes which points to
////////////////////////// ////////// ////////// ////////// ////////// ////////// /
// CKsVolumeDisplay wrapper class
class CKsVolumeDisplay : public CWnd <<<<<<<This line
Now if I remove the #include "ksVolumeDisplay.h" from my dlg4.h it stops this error but of course I get
error C2079: 'm_xxxxxxxxx' uses undefined class 'CKsVolumeDisplay' (which I understand)
I don't understand why I'm getting the redefinition error and what to do to prevent it??
My app is a 4x4 splitter, with 4 Formviews (frmV1, frmV2, frmV3, frmV4), in frmV4 is a tab ctrl with 4 dialogs (dlg1, dlg2 dlg3, dlg4). Now in frmV1 I inserted a custom ctrl (KsVolumeDisplay)some time ago, and it has worked well, but now I inserted the control into dlg4 and used the class wiz to create a member var of type voulme display control, when I complie I get the following error msg
error C2011: 'CKsVolumeDisplay' : 'class' type redefinition
in 14 of my classes which points to
//////////////////////////
// CKsVolumeDisplay wrapper class
class CKsVolumeDisplay : public CWnd <<<<<<<This line
Now if I remove the #include "ksVolumeDisplay.h" from my dlg4.h it stops this error but of course I get
error C2079: 'm_xxxxxxxxx' uses undefined class 'CKsVolumeDisplay' (which I understand)
I don't understand why I'm getting the redefinition error and what to do to prevent it??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That has done the trick it now compiles and works, many thanks