Solved

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

Posted on 1999-01-21
14
199 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now