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
185 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Installing Microsoft R server on REDHAT or SUSE Linux 4 147
Whole sheet autoscrub still needed 19 51
dog bark java program 15 109
wordcount challenge 11 132
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.

840 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