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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 96
Define unique primary key 9 92
move a line in eclipse 3 103
NotAlone Challenge 20 83
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 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