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
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

717 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