Solved

Programm design tip. Best way to design standalone dialog applications which should also work within an SDI background.

Posted on 2004-04-23
5
183 Views
Last Modified: 2013-11-20
Hi experts,
I am not a studied programmer so I do not design my classes before I code them.
I know I should do that but the more I write the more features come up that could or should be implemented into the code.
We are talking biological systems here.

That means I am frequently changing components, design and code of the dialogs I create.
Go here for example on a dialog I want to reuse within an SDI application:
http://hippler.bio.upenn.edu/dnat/downloads/DNATranslator.exe
1 - I would like to design the dialogs in separate projects.
2 - I would like to incorporate them as easy and quickly as possible into one SDI project
3 - I need to do a little data exchange inbetween the dialogs and the SDI ... shouldn't be a problem.
At the moment I have to copy the components (resources and files) from one folder to the other.
I actually have to copy and paste within the resource files.
I would like to learn about different means to achieve my goal.
They shouldn't be too complicated, though, if possible.
Let's start this at 125 for I have no idea how difficult this is or may get.
Cheers,
Jens

BTW I am using VS .net and I cannot copy inbetween two opened resource files for whatever reason.
0
Comment
Question by:allmer
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
r2far earned 125 total points
ID: 10912482
>> I cannot copy inbetween two opened resource files

You can only copy and paste resources in text mode, not in resource view.  Open the *.rc files as text.

>> I would like to design the dialogs in separate projects.

This is possible.  Copy the dialog resource as explained above.  Then copy over all classes except the *App class, this is the class that makes that dialog standalone and is not needed if the dialog goes to another app, in fact it would cause problems if you copied it over.

>> I need to do a little data exchange inbetween the dialogs and the SDI

Dialogs support this easily.  In the SDI before and after the dialog.DoModal() call,  you should be able to access any public variables and functions of the dialog.  Just set these variables before DoModal() to set initial data, and read the variables after DoModal() to find out what was changed from when the dialog opened.
0
 
LVL 5

Author Comment

by:allmer
ID: 10918241
Hi r2far,
is it also possible to share ressources?
I mean I could have all shared classes in one directory.
So I would only have some ressources and the *App in
the Dialog specific project.
What would I have to do to achieve that?
This is because some classes need to work in the Dialog
as well as in the Application. But I do not want to end up
with different versions of this shared class.
I guess it should be easy to get that to work.
Thanks,
Jens
0
 
LVL 5

Author Comment

by:allmer
ID: 10918815
It seems possible to have all shared classes in one directory.
So far there is no problem. I can easily include them and it works fine.

So, one last question.
Is there an easy way to open the resource files as text files?
They always seem to pop up in the resource view whatever
I do.

Cheers,
Jens
0
 
LVL 4

Expert Comment

by:r2far
ID: 10919232
To open a resource as text.  Close any open workspaces and files.  then go 'file->open', then select 'Text' under 'Open As', select the *.rc file and open it.

That is how it works under VS6 anyway... so hopefully they did not change it for VS .NET.
0
 
LVL 5

Author Comment

by:allmer
ID: 10919800
Well,
MS didn't do a good job here.
Several things have to be done by hand wich is error prone, I should say.
Good answer, though r2far.
Jens
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 29
Looking for a specific application/software 2 104
Line meaning 9 82
Problem to App 4 40
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 …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

25 Experts available now in Live!

Get 1:1 Help Now