M
msnews.microsoft.com
I am writing my first managed project and I am a bit confused in loading
resource strings. In old unmanaged C++ if I had a resource string in my
rc file called GX_ERR_DEVICE_ALREADY_OPEN. I would simply call:
int LoadString(HINSTANCE hInstance,
UINT uID,
LPTSTR lpBuffer,
int nBufferMax
);
inserting GX_ERR_DEVICE_ALREADY_OPEN for uID.
I understand that I now use to ResourceManager?
I tried:
String *GetErrMsg ()
{
ResourceManager *rm = new
ResourceManager("app",this->GetType()->Assembly);
return rm->GetString("GX_ERR_DEVICE_ALREADY_OPEN");
}
where app is the name of my rc file. But this does not seem to work.
Actually it doesn't make sense to me that I would pass a String in
GetString so I must be doing something wrong.
Where did I go wrong?
resource strings. In old unmanaged C++ if I had a resource string in my
rc file called GX_ERR_DEVICE_ALREADY_OPEN. I would simply call:
int LoadString(HINSTANCE hInstance,
UINT uID,
LPTSTR lpBuffer,
int nBufferMax
);
inserting GX_ERR_DEVICE_ALREADY_OPEN for uID.
I understand that I now use to ResourceManager?
I tried:
String *GetErrMsg ()
{
ResourceManager *rm = new
ResourceManager("app",this->GetType()->Assembly);
return rm->GetString("GX_ERR_DEVICE_ALREADY_OPEN");
}
where app is the name of my rc file. But this does not seem to work.
Actually it doesn't make sense to me that I would pass a String in
GetString so I must be doing something wrong.
Where did I go wrong?