Solved

code organization

Posted on 2006-11-15
3
215 Views
Last Modified: 2013-11-20
Hi Experts,

I have an include directory where I like to put all my shared code called, "inc".  In that folder I have a CWnd derived calendar that opens up a CDialog derived class that I created with ClassWizard. The CDialog is my CMyEvent dialog.  I also want to put this CMyEvent dialog into the inc folder but I can't because it's tied to the app's resources...  In the end, I am stuck pulling my calendar control out of the inc folder and into the app's directory since it opens up the app's specific CMyEvent dialog....

So my question is - is there a way to keep ClassWizard-generated dialogs generic (not program specific) - so that I can include them easily in other projects?  I had tried to do the calendar in its own dll before... tried very hard to get that working but gave up after 2 weeks of solid trying everything I could think of...  I may try to find where I went wrong because it's becoming more important to clean up my code before adding more....

Thank you very much.
Mike
0
Comment
Question by:thready
[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 1

Author Comment

by:thready
ID: 17951614
it looks like I am answering my own question here, but I am looking for alternatives...  
0
 
LVL 22

Assisted Solution

by:mahesh1402
mahesh1402 earned 250 total points
ID: 17953635
>> is there a way to keep ClassWizard-generated dialogs generic (not program specific) - so that I can include them easily in other projects?

you can have backup of your .rc files....  your resource file includes dialogs as well other dialogs.. you can easily import them into another workspace using resource copy... you can even open your resource .rc file using visual studio and copy dialogs across your workspace using File->Open->Open As Resource type select .rc file and you can view resource tree to import so that you can copy easily your dialogs.

-MAHESH
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 250 total points
ID: 17953966
Create an extension dll.  That can export classes and it will be like any other project for you to work wth in the IDE.  Then each project that you need the calender in you can just add the extension dll to the solution and use instruct the compiler that the project 'depends' on the extension dll.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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