Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MFC doesn't work, plus 2 more questions, please help a moron with very few points!

Posted on 1999-01-21
14
Medium Priority
?
204 Views
Last Modified: 2010-04-02
I thought this would be more appropriate in the C++ sector because 2/3 of it is C++. Anyway, if I create an app using the MFC AppWizard in VC++, step 6 does not have the option to use the library as a statically implemented library... therefore all my apps are created using shared file implementation and none of my clients can use my programs unless they are developers themselves. How can I correct this? I've made some impressive stuff that refuses to work on other systems.

Question 2 and 3 binded together:

I created a MDI prog with the MFC AppWizard. The window is a CRichEditView window because it displays Iptscrae (a program-specific language). The child windows are CRichEditViews too. Anyway, I was wondering these three things:

1. If I have a text file in a directory of example scripts and I want to load it into a child window for editing/viewing, how would I do this? I don't want the example to be changed when the user saves it, I want a copy of their script that they edited to be saved in another directory. This is question 2. Question 3 is the function to print preset text to a WINDOW... not a dialog or a message box... a window. Anyway, thank you all in advance for accepting my puny amount of points (all of them) in order to answer this question.
I appreciate it TONS!
D
0
Comment
Question by:SuperMario
[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
  • 7
  • 6
14 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1184776
Go to options and you will find an option for that exactly.... I don't have VC++ here at the moment, but I will let you know tomorrow for sure the exact way to get to this...

-Viktor
--Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1184777
Go to options and you will find an option for that exactly.... I don't have VC++ here at the moment, but I will let you know tomorrow for sure the exact way to get to this...

-Viktor
--Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1184778
I see that you've asked two more questions now... I don't have time for the other q'ns so you can simply reject my answer for now....

-Viktor
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Author Comment

by:SuperMario
ID: 1184779
Sorry viktor... I would give you the points but the other two questions are my main concern... Thank you very much though for the MFC info because I was really stuck! Thanks!

SM
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1184780
What's your name SuperMario?

Is it Dan?
0
 
LVL 3

Author Comment

by:SuperMario
ID: 1184781
Yep... How'd you guess? haha! I figured posting it on Ground Up and Experts Exchange would give me more info.

By the way, I looked in Tools - Options and couldn't find what you meant... Is it somewhere else? (6.0)

Thanks!
D
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1184782
Hey Dan, what's up?

I'm Viktor from the "From the ground up" :)

funny, eh? :) so you use the fabulous website, after all :)

ok, here is where I have that option in VC++ 5...

Follow this...

Go to the Project from the menu after you have openned your project...

Project->Settinga then you should have a Tab control in front of you for different settings.... You should fin where it says Microsoft Foundation Classes on a static text cotnrol, and there should be a ComboBox with the options...

-Use MFC in a Static Library
and
-Use MFC in a Shared DLL...

you will have the second option when you find it, but you should change that to the first option...

You should also change Win32 Debug to Release Debug, so you get your final version of your program...then people can use it on different computers without any DLLs and stuff,,,

-Viktor
--Ivanov
0
 
LVL 3

Author Comment

by:SuperMario
ID: 1184783
Wow, thank you so much! I suppose you deserve credit for 1/3 of that but I still need some points in case I have another question...

Thanks Viktor

D
0
 
LVL 3

Author Comment

by:SuperMario
ID: 1184784
JEEZ!

So I checked it out, and yep, that shared DLL implementation thing was there, but unfortunately, I could not make it static! Shared was the only option in the combo box. This is becoming off-putting! gggrrrr!
D
0
 
LVL 3

Author Comment

by:SuperMario
ID: 1184785
JEEZ!

So I checked it out, and yep, that shared DLL implementation thing was there, but unfortunately, I could not make it static! Shared was the only option in the combo box. This is becoming off-putting! gggrrrr!
D
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1184786
well... i have no idea why it is like that,,,,
0
 
LVL 3

Author Comment

by:SuperMario
ID: 1184787
Hahaha lol! Behind every problem of mine resides a moron. So, I had the LEARNING edition of Vc++ on my computer, so I got out the Select CD and reinstalled as the Professional version... because the Learning version won't allow you to distribute! DUH!

Thank you for all your help anyway.
D
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1184788
So it worked with the new version, eh? :))

ok, let me know what you need to know about your other problems.... I might be able to help you :)

still need lots of knowledge by the way :)) till i become a good VC++ programmer... :)
0
 
LVL 1

Accepted Solution

by:
softev earned 60 total points
ID: 1184789
I think I can help you a bit here...  not sure if you still
need it...

1) CRichEdit derived controls handle RTF formatted files quite nicely. I would suggest storing the files you want to display in RTF ( MS Office will allow you to store a .DOC file as RTF ).

2) Set up your file as read only.  In your app, open your file in Read only mode, then the user will not save changes to the file. The CFile class in MFC will help you with saving to another directory. Just instantiate a new CFile object and set the desired directory path. Copy the contents of the file and save.

3)To display text in just any window, you'll need to use DrawText functions.  You'll have to first get a DeviceContext (DC) to the window, then draw away.  MFC help can show you the details on how to do this.

Good Luck, and I hope this helps...
Softev

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

670 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