?
Solved

code organization

Posted on 2006-11-15
3
Medium Priority
?
217 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 1000 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 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

770 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