Objidl.h problem

  • Thread starter Thread starter Steve Strommen
  • Start date Start date
S

Steve Strommen

Every time I add a particular form to my VS 2003 C++ project, the project
can no longer compile. The error message indicates an ambiguity because
IDataObj is defined both in System::Windows::Forms and also in objdl.h.

I have no idea why objidl.h is being included in my project, but it must
have something to do with the objects in my form other than controls. There
are no COM objects involved.

The problem line in objidl.h is line 7408:

typedef /* [unique] */ IDataObject *LPDATAOBJECT;

Can anyone help me get past this compiler error? And maybe explain how
objidl.h gets included in my project?

Thanks for any help.
 
This problem disappeared when I included the line

#define WIN32_LEAN_AND_MEAN

in stdafx.h. I had previously commented that line out while researching a
different problem.

I have no idea why this solved the problem, but it must have eliminated
objidl.h from the #include list.
 
Back
Top