Sign in to follow this  
guyaton

this is kinda off in left field but....

Recommended Posts

guyaton    130
I know this is kind of an odd request, but i'm not sure where to look for this answer. I'm working on a tool using MFC trying to create a script engine. How do i get the text from the Document? I've been looking through MSDN, but have been unable to find much results. I don't care about formatting blah blah (thanks to MSDN for paragraphs about these things I don't need) i just need a stupid char*. I'd even settle for a CString, ATL::CStringT ATL::CSimpleString or whatever they use. thanks for any help as always

Share this post


Link to post
Share on other sites
domstyledesign    100
are you just trying to read txt from a file? this seems kinda basic for someone trying to write a scripting engine... if you are just tryinig to read txt from a file, let us know, resources are abundant... otherwise, make your question more distinct.

Share this post


Link to post
Share on other sites
guyaton    130
Reading and writing from a text file is not the problem. I used MS Visual Studio .NET (2002) to create an MFC app that used Rich Edit controls (ex. inherits CRichEditDoc, CRichEditView...etc). If someone writes say 50 lines of this script code, how do i get just the text, without having to worry about the format the text is in? Do I have to get it line by line? or can i get the whole block as one lump sum?

Share this post


Link to post
Share on other sites
khalligan    144
You could try getting a CWnd* pointer to the control and then use GetWindowText()...

That should work, you may also need to use GetDocument() to reference whatever data you have in your document.

Hope this helps.

Keith

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this