Winsock2 and ImageList?!?!

S

Steffo

Hi I seem to experience a problem when including "Winsock2.h" in my Windows
Forms application. I can't insert any images to an imagelist. I get the
following error:

: error C2039: 'GetObjectA' : is not a member of
'System::Resources::ResourceManager'
stdafx.cpp(0) : see declaration of 'System::Resources::ResourceManager'

and the line it complains at looks like this:
this->imageList1->ImageStream =
(__try_cast<System::Windows::Forms::ImageListStreamer *
(resources->GetObject(S"imageList1.ImageStream")));

If I remove the "Winsock2.h" it works fine.

Steffo
 
J

Jochen Kalmbach

Steffo said:
Hi I seem to experience a problem when including "Winsock2.h" in my
Windows Forms application. I can't insert any images to an imagelist.
I get the following error:

: error C2039: 'GetObjectA' : is not a member of
'System::Resources::ResourceManager'
stdafx.cpp(0) : see declaration of
'System::Resources::ResourceManager'


add the following after the include file:

#undef GetObject


--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top