Solved

code organization

Posted on 2006-11-15
3
212 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 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now