hi guys,
i really need your help!! i want to add a toolbar with some push
buttons in which i put some icons. it works without including
<windows.h>. However, i really need this library so i dont know what
to do. HELP ME. i get this error:
d:\Generic Control\SMACT\Form1.h(473): error C2039: 'GetObjectA' :
n'est pas membre de 'System::Resources::ResourceManager'
and here is the code:
this->imageList1->ImageStream =
(__try_cast<System::Windows::Forms::ImageListStreamer *
>(resources->GetObject(S"imageList1.ImageStream")));
Help me!!
Ben Schwehn - 20 Sep 2004 14:54 GMT
> i really need your help!! i want to add a toolbar with some push
> buttons in which i put some icons. it works without including
[quoted text clipped - 11 lines]
>
> Help me!!
this problem is caused by several #defines in windows.h and other header
files like:
#ifdef _UNICODE
#define GetObject GetObjectW
#else
#define GetObject GetObjectA
#endif
so your code gets preprocessed to
resources->GetObjectA instead of
resources->GetObject
solution is to undef the offending define like
#undef GetObject or
#define GetObject GetObject
hth

Signature
Ben
http://bschwehn.de