?
Solved

code organization

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

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

839 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