Solved

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

Posted on 1999-01-21
14
200 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Converting to C# also VS2015 5 128
SendMessage fails while PostMessage works 2 114
C++ assignment question 7 201
FMX enumerated colours 2 101
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

803 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