error with system::resources

G

Guest

Hello everyone

In a windows forms that i have compiled and includes code like this :

this->Icon = (__try_cast<System::Drawing::Icon * >(resources->GetObject(S"$this.Icon")));

i get an error like this:

error C2039: 'GetObjectA' : is not a member of 'System::Resources::ResourceManager'

the only thing i added to the code is to include to the main form header those includes :

#include <windows.h>

#include <wininet.h>
#include <shlobj.h>

#include <atlbase.h>

#include "AboutBox.h"
#include "OptionsBox.h"

Any suggestions ?


Thanks
 
J

Jacobo Rodriguez Villar

Emmanouel said:
Hello everyone

In a windows forms that i have compiled and includes code like this :

this->Icon = (__try_cast<System::Drawing::Icon * >(resources->GetObject(S"$this.Icon")));

i get an error like this:

error C2039: 'GetObjectA' : is not a member of 'System::Resources::ResourceManager'

the only thing i added to the code is to include to the main form header those includes :

#include <windows.h>

#include <wininet.h>
#include <shlobj.h>

#include <atlbase.h>

#include "AboutBox.h"
#include "OptionsBox.h"

Any suggestions ?


Thanks
After the #includes, put this:
#ifdef GetObject
#undef GetObject
#endif


--
Jacobo Rodríguez Villar

TyphoonLabs Lead Programmer

http://www.typhoonlabs.com
 

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