Solved

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

Posted on 1999-01-21
14
203 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Independent Software Vendors: 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!

Question has a verified solution.

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

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

632 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