|
-
April 7th, 2001, 07:08 PM
#1
How to load a string from string table
LoadString() function is used to load the string from a executable file, but this function is not working if I try to load a string from Library file( working fine with dll file).
For example I have executable named
1.exe which is linked with a library file 1.lib.
if i try to load a string from 1.lib using loadlibrary it is failing. Is their any way to load a string inside a library.
Please help
-
May 10th, 2001, 12:52 PM
#2
Re: How to load a string from string table
Use this line as the first line of your dll function that loads the String.
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
e.g.
void LoadString()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
CString str;
str.LoadString(IDS_MYSTR);
}
This should work
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|