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
182 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
Comment Utility
>> 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

8 Experts available now in Live!

Get 1:1 Help Now