Solved

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

Posted on 1999-01-21
14
202 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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
Should CArray be used for a list of pointers in C++? 19 144
C++ question 3 84
Indy 10 not Receiving UDP broadcast 3 57
MFC COM Server not showing  form 4 27
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

752 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