Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Class Wizard and resource dll.

Posted on 2002-04-30
3
Medium Priority
?
272 Views
Last Modified: 2013-11-20
Ok here is the situation.  I have a project that consist of .exe and several .dll.  After finishing with the first revision all resources were stripped out of exe and dll and moved into resourse dll, for future transation in other languages.
Now I come back working on rev.2 of the same project.  I would like continue to use Class Wizard whe I am working with dialog resources.  But now I have .h and .cpp file of dialog class in one dll and resource template in other.  Class Wizard doesn;t seem to handle this situation properly.

Anybody can give me a points on addressing this problem?  I was told that there is some software on a market, but I am totally unintrested in buying any third party software solutions..... at least for now.
0
Comment
Question by:mblat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 800 total points
ID: 6982852
I assume that you want to, for instance, add a new button to a dialg box and then immediately be able to edit the associated code with a double-clik in the dilaog editor.  Here is one way I go that to work:

I have two projects, the EXE and the resource-only DLL.  I deleted the .CLW file from the DLL project dir.  When I open the workspace and attempt to do some ClassWizard stuff, it prompts "do you want to re-create from your files"  I clicked yes.

In the resulting screen, you need to explore around to locate all of the resource-related .cpp and .h files; for instance, I have to go to the parent dir, then to the EXE dir to locate CMyDlg.cpp (and .h) and click the [Add] button to add them to the list.  Do this for all such resource-related class objects.

Now the ClassWizard associates the resource (in the res-only DLL) with the correct source code (in the Exe).

You may need to be careful about the resource.h file.  I'm not sure which copy the ClassWizard will tweak when you add new resources or change IDs, so you need to have just ONE resouce.h file for both projects.  Delete (well rename to keep for backup) the one in the EXE folder and in
    project / settings / c/c++ /Category: Preprocessr / Additional Include dirs:

put a referecne to the project directory for the EXE.

I'm not sure how this will affect your current setup (I assume you had to do some miscellaneous tweaking to get the res-only DLL to be used...).  So please make a complete backup of your current functional system before trying this.

-- Dan
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 6983345
2 mblat
I try to explain how we used one resource DLL for many sub projects.
1. We rename all resource.h to rc_projectName.h from resource editor.
2. We create a new project for Resource DLL.
3. On the Resource View/Resource Includes we add all needed headers and Rc files.
4. We create new project configuration and exclude from build resource files.
5. In source code if we not found the resource dll we use standard resource handle.

With this technique we can use sub projects for different application with or without resource DLL and we can use Class Wizard without the problem.
Note: each sub project has a predefined resource id range.
0
 
LVL 4

Author Comment

by:mblat
ID: 6983844
Thank you, I'll try both ways and let you now what the result.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question