|
I have been struggling over this and I have come to the conclusion that the CRichEditCtrl is NOT a true WYSIWYG control.
To see this, create a control that is say 4 inchs wide by 1 inch deep. Now use the SetTargetDevice to attach the control to your default printer, set the font of the control to be 12 pt Times New Roman. The only thing that SetTargetDevice will do is have the control look like it will print for the word break. It will not make the text within the control look like it will when it prints (spacing wise).
Now draw a rectangle around the control (have the rectangle several pixels bigger in each direction from the control, since the control will overwrite the rectangle on the screen if they are the same size.
If you type some text into the control, when it wraps, you may notice that where the text wraps and the area to the end of the control seems too big and could contain some text. When I first saw this, I was wondering if I didn't correctly calculate the width for the SetTargetDevice. But, when I printed, the text went up to the end of the control next to the right side of the rectangle (well, not all the way).
Now if anyone can show me how to make the text spacing within the control look like it will print, please do!
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
i want to add unicode support to my project.
for example i changed atoi to _ttoi.
please tell me which macro is equivalent with atof.
|
|
|
|
|
|
you don't have a ready-made macro, but you can use _wtof instead of atof. Define your own macro to deal with it.
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
How to abort reading operation on blocking socket? WSAAsyncSelect doesn't work.
|
|
|
|
|
What do you mean WSAAsyncSelect does not work? WSAAsyncSelect is a non-blocking I/O model.
Kuphryn
|
|
|
|
|
He means following situation. There are 2 threads. One thread sets the socket to blocking state and starts to receive data. Let the next recv() function blocks the socket. The second thread wants to terminate this operation. What should it do? Calling AssyncSelect() from the second thread doesn't set the socket back to non-blocking mode.
|
|
|
|
|
All is OK now. Sockets set back to non-blocking mode after a few seconds - use select()
|
|
|
|
|
Hi, how do I use the RichEdit 4.1 control? I have XP sp1 and the msftedit.dll file exists on my machine. I don't know the class name I should use... RICHEDIT20W or RICHEDIT20A doesn't work.
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
sagmam wrote:
how do I use the RichEdit 4.1 control?
The same way you'd have used the RE library in the past. Each one is a superset of the previous one (with the exception of new functionality, only the name of the DLL changes). After calling LoadLibrary() , you can then use the API just like normal. Assuming you already knew all that, the different between RICHEDIT20W and RICHEDIT20A is that the former is for Unicode and the latter is for ANSI.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
That's what I thought too... I used the Unicode version of RE (I'm developing an international app) by manually entering RICHEDIT20W in the .RC file of VStudio. I loaded msftedit.dll in my InitInstance(), and nothing happened - the app didn't open. That's the same symptom as when not initializing a rich-edit control. I'm assuming that I use the wrong class name, since its the only thing that doesn't explicitly exist in any documentation I've encountered. All docs that are relevant for RE v2 or v3 don't seem to work with 4.1. Any suggestions?
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
What does LoadLibrary() return? If you remove the control from the .RC file, does the app start? Do you have any non-XP machines to test on? If so, change the library being loaded to whatever is on the other machine (e.g., "RICHEDIT").
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
LoadLibrary() returns 0x9000000 (not NULL).
I remove the control, everything loads.
On win2K, if I use riched20.dll, it works great.
If I use class name "RICHEDIT" and riched32.dll (or AfxInitRichEdit), it runs (but no multilanguage support).
Did you successfully use this control? If so, can you send me some piece of code that works? Thanks...
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
sagmam wrote:
Did you successfully use this control?
No, I've never used Windows XP. Just for grins, have you tried "RichEdit20A" or "RichEdit20W" in the .RC file?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Of course... This is the standard procedure when working with RichEdit 2.0/3.0...
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
So all of these variations of case produce the same results:
RichEdit20A<br />
RichEdit20W<br />
RICHEDIT20W<br />
RICHEDIT20A<br />
RichEdit20a<br />
RichEdit20w
??
The only other thing I can suggest is to send a message to this person as he has been chest-deep in rich edit code the past few months. Maybe he has some other ideas to try.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I've tried all of the combinations above. I also tried RichEdit41W and other weird things
How do I technically send a message to this person?
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
sagmam wrote:
How do I technically send a message to this person?
At least three different ways I can think of to send a message to someone:
Find one of their posts and click the Email link instead of the Reply link.
Go to the person's bio page and start a New thread link.
Sometimes the person will include their e-mail address on their bio page.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The class name for Richedit 4.1 is RICHEDIT50W - and only unicode is supported.
|
|
|
|
|
I am developing an application using vc++,MFC AppWizard ,Dialog form. I have a Dialog box on which I have put an Excel sheet Control. I would like to know how to access the control.
|
|
|
|
|
adibalaji wrote:
I have a Dialog box on which I have put an Excel sheet Control.
How did you go about doing this?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
hi,
is there a way to get a connecter's ip before calling accept()?
thx
Don't try it, just do it!
|
|
|
|
|
hello,all,
How to filter URL and Web in windows2000/WinXP?
|
|
|
|
|
What is the source? Is it a file, socket, or from another process such as IE?
Kuphryn
|
|
|
|
|
This source is a process such as IE ,MSN Explorer and web brows.
|
|
|
|