madhav119
asked on
ATL com error C2385
Hi,
I have created a new class CTestBaseClass derived from AxDialogImpl. Added some specialized code in OnInitDialog of this class.
I want to derive all ATL dialog classes (classes derived from CAxDialogImpl) in my project to be derived CTestBaseClass so that I invoke CTestBaseClass::OnInitDial og() in
OnInitDialog of all the ATL classes (to make use of the specialised code )in my project. My code looks something like this.
ex:
class CTestBaseClass : CAxDialogImpl
{
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
CAxDialogImpl<CTestBaseCla ss >::OnInitDialog(uMsg, wParam, lParam, bHandled);
//specialized code
return 1; // Let the system set the focus
}
}
class CMYDerivedClass:
public CAxDialogImpl<CFilterDlg>,
public IDispEventImpl< IDC_XB, CMYDerivedClass>,
public IPropertyNotifySinkImpl<CM YDerivedCl ass>,
public CTestBaseClass
{
---
----
}
When I do this I get following comilation errors. Please help on resolving these issues.Thanks in advance.
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atl com.h(4769 ): error C2385: ambiguous access of 'm_hWnd'
could be the 'm_hWnd' in base 'ATL::CWindow'
or could be the 'm_hWnd' in base 'ATL::CWindow'
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atl win.h(4126 ) : see reference to function template instantiation 'HRESULT ATL::AtlAdviseSinkMap<T>(T *,bool)' being compiled
with
[
I have created a new class CTestBaseClass derived from AxDialogImpl. Added some specialized code in OnInitDialog of this class.
I want to derive all ATL dialog classes (classes derived from CAxDialogImpl) in my project to be derived CTestBaseClass so that I invoke CTestBaseClass::OnInitDial
OnInitDialog of all the ATL classes (to make use of the specialised code )in my project. My code looks something like this.
ex:
class CTestBaseClass : CAxDialogImpl
{
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
CAxDialogImpl<CTestBaseCla
//specialized code
return 1; // Let the system set the focus
}
}
class CMYDerivedClass:
public CAxDialogImpl<CFilterDlg>,
public IDispEventImpl< IDC_XB, CMYDerivedClass>,
public IPropertyNotifySinkImpl<CM
public CTestBaseClass
{
---
----
}
When I do this I get following comilation errors. Please help on resolving these issues.Thanks in advance.
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atl
could be the 'm_hWnd' in base 'ATL::CWindow'
or could be the 'm_hWnd' in base 'ATL::CWindow'
c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atl
with
[
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.