zoom on RTF text

Hi all,
I am currently developing a windowless textbox object using ITextServices.
Everything went very well until performed zoom on text. In my code the RTF
text is rendered using TxDraw, which calculates zoom factor as this: zoom
factor = (pixel height of client rect)*2540/[Himetric vertical
extent]*[pixel per vertical inch]. But the result wasn't really that good,
the scaled text often went out of box, and word wrap wasn't consistent
specially when it scaled below 60%(above 100% much better). Does anybody
know what problems caused it? Any input would be appreciated. Thanks.

jm


0
jmzheng (2)
8/21/2004 2:57:12 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
944 Views

Similar Articles

[PageSpeed] 25

Hi, in my experience the RTF control (i.e. richedxx.dll or msftedit.dll) is incapable
of zooming correctly. Instead I let TxDraw() render its output to an inmemory metafile,
which I then can play and zoom with good results. Note that this requires either
that GDI+ is installed or that ::SetGraphicsMode(GM_ADVANCED) is supported,
which means that Windows 95 is out of the picture...
Rgrds /Henry


"Nick" <jmzheng@hotmail.com> wrote in message news:cSyVc.38599$X12.6698@edtnps84...
> Hi all,
> I am currently developing a windowless textbox object using ITextServices.
> Everything went very well until performed zoom on text. In my code the RTF
> text is rendered using TxDraw, which calculates zoom factor as this: zoom
> factor = (pixel height of client rect)*2540/[Himetric vertical
> extent]*[pixel per vertical inch]. But the result wasn't really that good,
> the scaled text often went out of box, and word wrap wasn't consistent
> specially when it scaled below 60%(above 100% much better). Does anybody
> know what problems caused it? Any input would be appreciated. Thanks.
>
> jm
>
>


0
8/23/2004 12:54:02 AM
Thanks for responding. But the different rendering from ITextServices means
the different positions of characters, which will make its editting
capability very difficult.

jm


"Henry Skoglund" <fromnewsgroups@tungware.com> wrote in message
news:OwRcvuKiEHA.3320@TK2MSFTNGP11.phx.gbl...
> Hi, in my experience the RTF control (i.e. richedxx.dll or msftedit.dll)
is incapable
> of zooming correctly. Instead I let TxDraw() render its output to an
inmemory metafile,
> which I then can play and zoom with good results. Note that this requires
either
> that GDI+ is installed or that ::SetGraphicsMode(GM_ADVANCED) is
supported,
> which means that Windows 95 is out of the picture...
> Rgrds /Henry
>
>
> "Nick" <jmzheng@hotmail.com> wrote in message
news:cSyVc.38599$X12.6698@edtnps84...
> > Hi all,
> > I am currently developing a windowless textbox object using
ITextServices.
> > Everything went very well until performed zoom on text. In my code the
RTF
> > text is rendered using TxDraw, which calculates zoom factor as this:
zoom
> > factor = (pixel height of client rect)*2540/[Himetric vertical
> > extent]*[pixel per vertical inch]. But the result wasn't really that
good,
> > the scaled text often went out of box, and word wrap wasn't consistent
> > specially when it scaled below 60%(above 100% much better). Does anybody
> > know what problems caused it? Any input would be appreciated. Thanks.
> >
> > jm
> >
> >
>
>


0
jmzheng1 (1)
8/23/2004 5:45:16 PM
Well, if you retrieve the coordinates for drawing your own caret, frame etc. by using
TOM.h
(for example:  pTextRange->GetPoint(tomStart,&cr.left ,&cr.top);
then if you zoom the output 200% you just zoom the coordinates the same way.
Shouldn't be too difficult.
/Rgrds Henry


"JIANMING ZHENG" <jmzheng@telus.net> wrote in message
news:M2qWc.48806$X12.21462@edtnps84...
> Thanks for responding. But the different rendering from ITextServices means
> the different positions of characters, which will make its editting
> capability very difficult.
>
> jm
>
>
> "Henry Skoglund" <fromnewsgroups@tungware.com> wrote in message
> news:OwRcvuKiEHA.3320@TK2MSFTNGP11.phx.gbl...
> > Hi, in my experience the RTF control (i.e. richedxx.dll or msftedit.dll)
> is incapable
> > of zooming correctly. Instead I let TxDraw() render its output to an
> inmemory metafile,
> > which I then can play and zoom with good results. Note that this requires
> either
> > that GDI+ is installed or that ::SetGraphicsMode(GM_ADVANCED) is
> supported,
> > which means that Windows 95 is out of the picture...
> > Rgrds /Henry
> >
> >
> > "Nick" <jmzheng@hotmail.com> wrote in message
> news:cSyVc.38599$X12.6698@edtnps84...
> > > Hi all,
> > > I am currently developing a windowless textbox object using
> ITextServices.
> > > Everything went very well until performed zoom on text. In my code the
> RTF
> > > text is rendered using TxDraw, which calculates zoom factor as this:
> zoom
> > > factor = (pixel height of client rect)*2540/[Himetric vertical
> > > extent]*[pixel per vertical inch]. But the result wasn't really that
> good,
> > > the scaled text often went out of box, and word wrap wasn't consistent
> > > specially when it scaled below 60%(above 100% much better). Does anybody
> > > know what problems caused it? Any input would be appreciated. Thanks.
> > >
> > > jm
> > >
> > >
> >
> >
>
>


0
8/24/2004 5:46:11 PM
Reply:

Similar Artilces:

transfer data from one text box in a form to another
how do i transfer data from one text box located on a form to another text box located on a sub-form on the main form. complicated i know. what vba code do i use. any solutions thank you you need to specify if you want to make the operation after which event in subform. then you need to put something like this: [textboxinsubform] = Forms!FormName![texboxinform].text LD -- Lorenzo Díaz Cad Technician "vss85" wrote: > how do i transfer data from one text box located on a form to another text > box located on a sub-form on the main form. complicated i know. ...

how do you reflect text?
how do you mirror text so that it looks like a reflection? WordArt will do that but not regular text. I usually use Photoshop Elements when I want that tho - it give me a higher level of creativity. If this is something for a tee shirt, your printer driver may do what you want without going thru a lot of trouble. -- JoAnn Paules MVP Microsoft [Publisher] "Tammy" <Tammy@discussions.microsoft.com> wrote in message news:4F67EBEC-E894-4827-BD67-8FA79518B1A6@microsoft.com... > how do you mirror text so that it looks like a reflection? ...

Using text boxes and command buttons to search
hi i am using excel 2000, i have a few columns but the main ones are: Christian Name Surname Employee Number i want to have a text box or combo box at the sheet for each serach, they will only be, Surname and employee number, when i typ in for example bloggs into the surname text box and click the command button "next" i want it to find every entry in the surname column matching the word bloggs, and the same with employee number? but i have no idea how? i have created the text box and button but dont know what to do with them? is this the best way? this is...

Extracting the numbers from the Text Field
I have a table in which in a text field is having Equipments models and data entry is been not properly entered, the data is as below : 456ZX ZX965 ZX785M ZX956MN 45NM96ZX I need to retrieve only the numeric part like below 456 965 785 956 4596 I tried left, right, mid etc but failed. not sucess. Please advice a solution to pull/extract only the number portions from a text field Regards Irshad On 17 apr, 09:40, Irshad Alam <IrshadA...@discussions.microsoft.com> wrote: > I have a table in which in a text field is having Equipments models and data &...

Uppercase text to Proper text
I'm new at this so please excuse me. I have an excel spreadsheet in Office 97. It's all in upper case letters and I need it in upper/lower case letters. Can anyone tell me how I can simply change a column (say column "C") from uppercase text to Proper text? Example: MR & MRS KEN HOAGLAND to Mr & Mrs Ken Hoagland Must I do a formula in code module or is there a simple way to do this? If not, how do I do it any other way? Make a backup copy of your file first and try this on the COPY, don't experiment with the original With the data in column C In D1 (...

Zoom-in and Zoom Out
I am relatively new to charting so I am hoping this is a feature I am just ignorant of, Can anyone fill me in ? I am use to programs that produce maps. these programs allow you to start at country may and zoom into a state and resize, then zoom into a city and resize, zoom into a street and resize, and the same in reverse if you want. I thought I could do the same with a chart. Start with a 100 year chart, using the mouse select an X, Y range and it would zoom into that range. But it does not do anything like that. Is there anyway to get excel to do this ? If not does anyone know of an add-...

Text box won't allow text
Trying to create a business flyer and half way through I insert another text box and it will not let me type in the text box. I have already created several text boxes on this document and did not have this problem. Why can't I type in the text box? -- Karen What happens when you try? -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "Karen Keith - Six L''s Packing" <karen@sixls.com> wrote in message news:DD67D41C-347B-4006-8FEB-F72EE141DAE9@microsoft.com... > Trying to create a business flyer a...

Sorting Text Column by Most Frequent item
I am trying to process a list of several thousand items ( business names) in Excel (imported from Database.. Is there a quick way to sort the text column so the 'most frequently ocurring items' are grouped together nearest the top of the column and vice-versa I alphabetized the column first, with obvious results... but would like to create a new column showing only 1 ocurrence of each item from the original column, arranged from most common item on list to least common Thanks in advance.. Have you thought about a Pivot table? A good intro:- http://www.geocities.com/jonpeltier/Exce...

text #3
I entered text in column A and 5 rows I want to change that information that I entered in A1, A2,A3,etc to go to A1,B1,C1,D1,etc. Can you help Select A1:A5 > Copy Right-click on A2 > Paste special > Check "Transpose" > OK Delete col A -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Chris" <Chris@discussions.microsoft.com> wrote in message news:E7A78016-0C2F-48D3-8AC5-C2B7459F03EE@microsoft.com... > I entered text in column A and 5 rows > I want to change that information that I entered in A1, A2,A3,etc > to go to A1,B1,C1,D1...

Inserting text from a .txt file
I'm trying really hard to jump on the bandwagon and migrate from Outlook Express to Outlook, but the more I try, the more frustrated I get. Anyway, here is my question: How do I insert the text from a text file into my e-mail document. I am using the rtf editor. thank you, ~alan copy/paste? "~~Alan~~" <alan.shepro_NOSPAM@verizon.net> wrote in message news:%23%23AwZrIKEHA.1264@TK2MSFTNGP12.phx.gbl... > I'm trying really hard to jump on the bandwagon and migrate from Outlook > Express to Outlook, but the more I try, the more frustrated I get. > > Anywa...

Cutomize the zoom to 80%
Dear all I have to open a lot of excel files one day, but the view size is not the same. How can do that the view size will always change to 80% when I open each file. -- wuwu Hi you have to put this code into the workbook_open event of these files. AFAIK there's no other option to achieve this -- Regards Frank Kabel Frankfurt, Germany "wuwu" <wuwu@discussions.microsoft.com> schrieb im Newsbeitrag news:DB0A8875-19A3-4113-A19F-0D642A9E02F3@microsoft.com... > Dear all > > I have to open a lot of excel files one day, but the view size is not the > same. Ho...

wrapping text around another text box
My problem is this...I have two text boxes. I want to wrap one text box around the other text box but nothing seems to be working. What I want to do with the one to the left is make it into an "L" shape so that the box on the right simply fits in the empty space of the "L" to form basically a square. I have tried turning on all those text wrapping features with both boxes and cannot figure out for the life of me what is happening. I have a box drawn around the box on the right...don't know if that has something to do with it. I have tried removing it and sti...

Outlook Rule
Is there a way to forward a message and add text to the forwarded message? When looking at Outlook's rule wizard, I haven't been able to find any combination that allows me to forward with added text. Does anyone know of any Outlook rule add-in's that will forward with text? Thanks Ron K. No, there is no rule to do this. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and f...

How can I change the colour of text written with track changes?
How can I change the colour of a text or edit a text that was written with track changes? I have disabled track changes but unable to edit the text. Please help You must accept the changes. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Surya" <Surya@discussions.microsoft.com> wrote in message news:7D2D0445-030C-424F-9B29-9444B55102F0@microsoft.com... > How can I change the colour of a text or edit a text that was written with > track changes? I have disabled track changes but unable to edit th...

Exporting Reports to Text
I'm trying to export the detailed historical aged trial balance in Payables to a comma-delimited file for use in Excel. Unfortunately, the numbers are shifting to the left. Does anybody have a solution to this? Thanks Charles, I think I remember something like this once before. Don't recall the details though. have you midified the report? Are the fields all sized the same? You may have to put in a dummy text field to overcome alignment errors. Regards Habib "Charles Allen" <callen@bkd.com> wrote in message news:ejXrLbZNFHA.1172@TK2MSFTNGP12.phx.gbl... > ...

Text extends off screen when viewing e-mails in outlook
How can I get get the text to wrap when viewing received e-mails? Even Microsoft Notebook has text wrap; where is it in Outlook 2007? it normally does wrap. What message format? Do you scan incoming emails with a virus scanner? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LSOFT.COM Let's Really Fix Outlo...

Text Format/Size of Cells
I have a worksheet w/ 5000 cells, and i only need the 1st 8 character of text for a cut and paste into a web portal, is there anyway to hav it remove all of the information that is after the 8th character....fo ex "abcd001 " <----they all have an extra space that i do not need, wan to know if i can format the column to remove everything after the 8t character Thanks, Chri -- ChiPhiZ ----------------------------------------------------------------------- ChiPhiZD's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3319 View this thread: http://www.exc...

speech to text
my project is to an application for converting speech to text in VC++. this is for a warehouse management system i.e to voice enable the application. speech has to be tranmitted through wireless. any idea how to proceeed?thanks in advance. For VC++, try older versions of the MS Speech SDK, at http://www.microsoft.com/speech/download/old/sapi5.asp "sree" <sree@discussions.microsoft.com> wrote in message news:219C0643-8B04-4E3F-A98B-C22E34069430@microsoft.com... > my project is to an application for converting speech to text in VC++. > this is for a warehouse managemen...

How do I add circular text to an Auto Shape (circle)?
How do I add circular text inside a circle at the same (or near) arc as the circle in Publisher 2007? Have you tried WordArt? Look at this web page, scroll way down to the bottom. http://msauer.mvps.org/wordart_in_microsoft_publisher.htm If you are trying to put your text inside the circle so it contours to the circle, it is not an easy operation. Look here: Scroll down http://msauer.mvps.org/more_graphics.htm "dbpeart" wrote: > How do I add circular text inside a circle at the same (or near) arc as the > circle in Publisher 2007? ...

Problem in Zoom in and Zoom out
hi all, I have created project in SDI. I have a class MyZoomView derived from CScrollView. i have some rectangular shaped box in the View window of SDI.... when i press zoom button in toolbar the rectangular shaped box is getting zoomed in and out. I have added two button's in the View window of SDI... Now when i click the zoom button in toolbar my rectangular shaped box is getting zoomed but the buttons are in same size.... i want the buttons also to get zoomed along with the rectangular shaped boxes.... Can anyone plz help to solve this problem..... If possable get me the sou...

report the date found in a cell of text
Hi, I'm trying to grab and use the dates from thousands of cells of text. I think I'm making this too complicated. My horrible formula, so far, sort of reports on dates that use "/" and I can tell I'm going in the wrong direction with it. There is very little consistency in the text length or date. I've been looking at this for too long. Does anyone have any advice, please? =IF(OR(RIGHT(MID(SUBSTITUTE(MID(A1,SEARCH("/"&"*"&"/0", A1,1)+3,8),"0",""),1,7))="/",RIGHT(MID(SUBSTITUTE(MID(A1,SEARCH(&quo...

Why won't text show in SOME cells?
I have the following text formatted as Word Wrap, Text, Top Align, Left Align, but all I get in cell is ############. This has worked in other cells in the same column. Please let me know ASAP what else I need to change--I'm on deadline for a project. Thanks! Next Step: Get more current information to greeters (where are various tickets being sold, where is the virtues pick today, where's Rev. Noel's class, etc.), since they are visible sources of information. Once a system is in place to fully inform greeters, hold up their ribbons during announcements so peo...

Signature Problems with RTF
Hi all, I don't know if anyone else out there has tried this or not, but I got Outlook 2003 at work. I have two accounts setup, one for work and one for personal use. They are both configured within the same profile. I got two signatures setup, one for each account. If I use WORD as my email editor everything works fine, meaning that when I click on Accounts and Select another account to send email from it works. However if I use Outlook as my email editor and choose RTF or HTML for mail format, Outlook only selects the signature for the first account in Accounts List regardless of my...

formatting text
Is it possible to use multiple font formats in a string? Such as italicizing some words, varying color and using small caps? On Mar 11, 9:03 am, "SteveR" <sruss...@removethisinnernet.net> wrote: > Is it possible to use multiple font formats in a string? Such as > italicizing some words, varying color and using small caps? Yes. But these are not properies of a string but the control which displays the string. Look at RichEdit Control to do this. --- Ajay To add to Ajay's post this class might be interesting to you. Perhaps you could extend it: http://www....

I need to combine a fixed text statement to a variable text state.
I am importing text into cells in a column. I want to put a formula into another colum that will append a fixed text statement to each one of the variable statement in the first collumn. Example: Col #1 Col #2 ABC Set - ABC CDE Set - CDE EFG Set - EFG ="Set - "&A1 best wishes -- Bernard Liengme www.stfx.ca/people/bliengme remove CAPS in e-mail address "Eddie Crocker" <Eddie Crocker@discussions.microsoft.com> wrote in message news:19090B86-AE9A-423B-8EA4-CBED5222885F@microsoft.com... >I am importing text into cells in a column....