Using extendes MFC-Dll for my control
-
Hey, i've made some good controls and dialogs for me. From that time on, i'd copied all my files and resources to my new projects. Now I decided to make an DLL. So I started the project assistant and created a extended MFC-Dll and added my custem files and resources. So i build my DLL... OK, but now (after linking to my new projects) I have probleme with my resources. Is there any to way to split resources or better use separate resources (one resource for application, one for dll). Thank you for helping me....
-
Hey, i've made some good controls and dialogs for me. From that time on, i'd copied all my files and resources to my new projects. Now I decided to make an DLL. So I started the project assistant and created a extended MFC-Dll and added my custem files and resources. So i build my DLL... OK, but now (after linking to my new projects) I have probleme with my resources. Is there any to way to split resources or better use separate resources (one resource for application, one for dll). Thank you for helping me....
AnTri wrote:
I have probleme with my resources.
What problems?
AnTri wrote:
Is there any to way to split resources or better use separate resources (one resource for application, one for dll).
The resources are separate for the DLL and the EXE. It's mostly a matter of loading from the right module. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
AnTri wrote:
I have probleme with my resources.
What problems?
AnTri wrote:
Is there any to way to split resources or better use separate resources (one resource for application, one for dll).
The resources are separate for the DLL and the EXE. It's mostly a matter of loading from the right module. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
When I link my (control) dll I'll get a lot of compiler-warnings: resource already defined, duplicated resource ... e.g. in dll is a dialog with edit-control ID: IDC_EDIT1 = 1001 when I link the dll to my application e.g. Dialog with the same ID for edit-control I can't open the dialog! It seems that there is only one resource-list for the application an my dll!
-
When I link my (control) dll I'll get a lot of compiler-warnings: resource already defined, duplicated resource ... e.g. in dll is a dialog with edit-control ID: IDC_EDIT1 = 1001 when I link the dll to my application e.g. Dialog with the same ID for edit-control I can't open the dialog! It seems that there is only one resource-list for the application an my dll!
MFC maintains a list of modules with resources, and loads them from wherever it can. The simple solution is to make sure your resource IDs don;t overlap. If you do a search for Anna Jane Metcalfe, she wrote an article with a utility to make reorganising resources much easier. If you can't find it on CP, go look at her site: www.riverblade.co.uk, and prod around there. It wasn't hard to find. Iain.