Click here to Skip to main content
15,926,290 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Please answer me !!!! It is very URGENT !!! Pin
Christian Graus14-Oct-01 0:31
protectorChristian Graus14-Oct-01 0:31 
GeneralRe: Please answer me !!!! It is very URGENT !!! Pin
14-Oct-01 1:02
suss14-Oct-01 1:02 
GeneralRe: Please answer me !!!! It is very URGENT !!! Pin
Christian Graus14-Oct-01 1:07
protectorChristian Graus14-Oct-01 1:07 
GeneralRe: simple client program for ATL ! Please HELP !!! Pin
Not Active14-Oct-01 6:41
mentorNot Active14-Oct-01 6:41 
GeneralDefine a String DLL Pin
Maer72713-Oct-01 19:13
Maer72713-Oct-01 19:13 
GeneralRe: Define a String DLL Pin
Sijin14-Oct-01 0:25
Sijin14-Oct-01 0:25 
GeneralRe: Define a String DLL Pin
Maer72714-Oct-01 0:55
Maer72714-Oct-01 0:55 
GeneralRe: Define a String DLL Pin
Mukkie14-Oct-01 0:36
Mukkie14-Oct-01 0:36 
First, I am not really sure, whether You can use value 1 for string. There a table is somewhere in MSDN which shows ranges for data types stored in resources.

If You want to load this string from dll, You've got 2 solutions:
1) dynamically load dll, by using LoadLibrary(), then LoadString with instance argument pointing to that dll.
There is also an option to create resource only dll. Search for "resource only dll" string in MSDN to read about it.

2) Generate lib and dll, link mentioned lib into the exe, and simply call "LoadString". But, the resource numbers must be unique (at least in type and number). And as I wrote before, try using higher number, for instance: 10000.

According to MSDN documentation:

Prefix Resource Type Valid Range
IDR_ multiple 1 -> 0x6FFF
IDD_ dialog templates 1 -> 0x6FFF
IDC_,IDI_,IDB_ cursors, icons, bitmaps 1 -> 0x6FFF
IDS_, IDP_ general strings 1 -> 0x7FFF
ID_ commands 0x8000 -> 0xDFFF
IDC_ controls 8 -> 0xDFFF
Reasons for these range limits:
By convention, the ID value of 0 is not used.
Windows implementation limitations restrict true resource IDs to be less than or equal to 0x7FFF.
MFC's internal framework implementations reserve several ranges: 0xE000->0xEFFF and 0x7000->0x7FFF.
Several Windows system commands use the range of 0xF000 -> 0xFFFF.
Control IDs of 1->7 are reserved by IDOK, IDCANCEL, and so on.
The range of 0x8000->0xFFFF for strings is reserved for menu prompts for commands


mukkie
GeneralRe: Define a String DLL Pin
Maer72714-Oct-01 1:09
Maer72714-Oct-01 1:09 
Questionhow can I get the character of a 'center dot' as CString? Pin
DanYELL13-Oct-01 16:10
DanYELL13-Oct-01 16:10 
AnswerRe: how can I get the character of a 'center dot' as CString? Pin
13-Oct-01 16:25
suss13-Oct-01 16:25 
GeneralHelp:CHtmlView and Servlet Problem Pin
13-Oct-01 13:12
suss13-Oct-01 13:12 
GeneralMFC vs STL containers Pin
User 988513-Oct-01 12:35
User 988513-Oct-01 12:35 
GeneralRe: MFC vs STL containers Pin
13-Oct-01 15:34
suss13-Oct-01 15:34 
GeneralActive DEsktop - Methods for testing if it is enabled Pin
Jase Jennings13-Oct-01 12:09
Jase Jennings13-Oct-01 12:09 
GeneralRe: Active DEsktop - Methods for testing if it is enabled Pin
Mukkie14-Oct-01 0:45
Mukkie14-Oct-01 0:45 
GeneralRe: Active DEsktop - Methods for testing if it is enabled Pin
Jase Jennings14-Oct-01 6:04
Jase Jennings14-Oct-01 6:04 
GeneralCTreeCtrl Pin
Sara Burns13-Oct-01 11:18
Sara Burns13-Oct-01 11:18 
GeneralRe: CTreeCtrl Pin
Christian Graus13-Oct-01 11:24
protectorChristian Graus13-Oct-01 11:24 
GeneralCWebBrowser2 Pin
Matt Newman13-Oct-01 10:22
Matt Newman13-Oct-01 10:22 
GeneralRe: CWebBrowser2 Pin
13-Oct-01 10:50
suss13-Oct-01 10:50 
GeneralRe: CWebBrowser2 Pin
Matt Newman13-Oct-01 15:33
Matt Newman13-Oct-01 15:33 
GeneralRe: CWebBrowser2 Pin
Not Active14-Oct-01 6:49
mentorNot Active14-Oct-01 6:49 
GeneralRe: CWebBrowser2 Pin
Matt Newman14-Oct-01 9:09
Matt Newman14-Oct-01 9:09 
GeneralTell me about it! Pin
13-Oct-01 10:58
suss13-Oct-01 10:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.