Font problem with metafile

I have the following code to draw vertical text to a DC.

lf.lfEscapement = 900;
lf.lfOrientation = 900;
CFont font;
CFont* pOldFont = pDC->SelectObject(&font);

it draws correctly on the screen but not to a metafile. 
When I insert the metafile to Word the text is not 
vertical. But on the save machine when I insert it to 
Excel the text is vertical.

What could be the problem. Can anybody help me.

xge (2)
7/31/2003 3:15:22 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 11

xiaoguo ge,

If the metafile looks like expected in Excel, but not in Word, I would
normally say that this seems to be a problem with Word, not your code. On
the other hand, you might want to initialize all of the LOGFONT structure,
if the below if a complete snippet of code.

If you want to get to the bottom of this, surf away to, get
the metafile specification, and go through the generated file, checking that
it looks as expected. This is tedious work to do by hand :-) If the proper
GDI-commands are encoded in the file, you might want to swear and scream to
MS that Word is not treating metafile properly :-)))

Johan Rosengren
Abstrakt Mekanik AB

"xiaoguo ge" <> wrote in message
> I have the following code to draw vertical text to a DC.
> lf.lfEscapement = 900;
> lf.lfOrientation = 900;
> CFont font;
> font.CreateFontIndirect(&lf);
> CFont* pOldFont = pDC->SelectObject(&font);
> pDC->TextOut(...);
> ...
> it draws correctly on the screen but not to a metafile.
> When I insert the metafile to Word the text is not
> vertical. But on the save machine when I insert it to
> Excel the text is vertical.
> What could be the problem. Can anybody help me.

8/2/2003 4:01:00 AM

Similar Artilces:

Problem w/X axis in chart (2003)
I didn't get any hits with my first post, so let's try again with a different subject line. I'm creating stacked bar charts where I'm tracking data from three points in time (one chart for each reporting period). I started this project a year ago and don't remember how I created the first chart, so I decided to just replicate the first chart, then change the data series. I did so by copying the source data range. For some reason, the second chart has a max capacity of 180% (instead of 100%). When I go to Format Axis, the first chart shows the following values und...

Printing Barcode Font in RS2008
We have several reports that use custom barcode fonts, and these have been working happily for ages. We have recently deployed our reports to a sql2008 instance and have hit a big problem. The Report Previews correctly in Reporting services (i.e. the user sees the barcode) The report previews AND prints correctly in VS2008. but... When we print from Reporting services the barcodes font is not displayed (gibbersish characters are displayed instead). We have checked that the users all have the barcode fonts installed locally. We have also installed the barcode fonts on t...

Frustrating problem with Windows Media Player
I opened Windows Media Player today and went to minimize it while I did other things, and it informed me that it would revert to it's miniplayer mode (the thing where it moves to the right side of the taskbar and makes a miniature player; not skin mode) and I checked the box that says "don't show me this message again" I don't even know why it was telling me this, since that is what it has until now always done, since I had already gotten that message and ok'd it ages ago. When I clicked "Ok", it did not revert to the miniplayer at all, and now...

Memory Problem
Hi While using new and delete operator for eg) for(i=0;i<condition;i++) { nFileSize=GetFileSize; if(nFileSize>=10000) { DWORD size=10000; DWORD dRemaining=nFileSize%size; HANDLE hFile; hFile=::CreateFile (filename,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,CREATE_ALWAYS ,FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH,NULL); for(int i=size;i<=nFileSize;i+=10000) { ...

Printing problems
My computer is running Windows XP with 384MB of RAM, and I am using Publisher 2000. I am printing to a HP color laserjet 5 which HP does not offer any drivers on thier site for this printer and Win XP. The HP driver site for this printer says that the driver was included into Windows XP. The printer is connected using the parallel port. I have cropped a picture of a group of teens and made three pictures out of the one and added some text to create a publicity flier. I accomplish this by inserting the picture and then making 2 copies of it and then I crop each one to make 3 dif...

caption font
Hi, I would like to know if it is possible to change by program the font used in caption bar, menu, status bar, ... Thank you Raymond Mercier Raymond Mercier wrote: > Hi, > > I would like to know if it is possible to change by program the font > used in caption bar, menu, status bar, ... > > Thank you > > Raymond Mercier The status bar is a control, and like other controls its font can be changed by calling its SetFont function with a CFont that you initialize. But the caption bar and menus are drawn by Windows using the system preferences. You cannot direct...

Logical problem
I have a "selection" problem: I have several files, and in each an undefined amount of numbers is stored (as text). For example: In file "A" you would find the numbers 1, and 9. In file "B" you would find the numbers 2, 3 and 5. In file "C" you would find the numbers 8 and 9. In file "D" you would find the numbers 1, 5 and 6. (...) In file "Z" you would find the numbers 3, 4 and 6. I may select only 10 files of all the files I have, and these 10 files should cover as many different numbers as possible. If possibl...

problems with messages FROM GroupWise users
For the past week or so, I have had a couple of users report that some messages they receive are "garbled." Essentially, it appears that the messages are not being decoded properly, and show up as plain text, with all the internet headers in the body of the message and the actual content of the message looking like garbage: ---------------------------------- X-Mailer: Groupwise 6.5 Message-ID: <> From: "<sender>" <sender's email address> Subject: RE: E-mail test To: "Milbrand, Rachel A." <rmilbrand...

How to write in Japenese font?
I want to write in Japenese font in Word. Is there any possibility to write in MS Office 2003 with On-screen keyboard? Yes. It's not a Word thing, it's a Windows thing. Go to Start > Control Panel > Regional and Language Options, and try to follow the tabs and buttons for "installing a new keyboard" (not "installing a new language") They are rather different in XP, Vista, and 7. In XP you need to check the box for "Asian scripts" (not "complex scripts"). There are many different input methods for Japanese; you can read ...

Odd e-mail duplication problem
All e-mails promoted or Tracked in CRM Outlook client are being copied to one particular Account that is unrelated. The e-mails are copied correctly to the history of the desired accounts and Contacts but also copy to one particular Accountl as well. As anyone seen anything like this and have any ideas what could be wrong? -- Darryl - - Only Microsoft CRM ...

Read-only problems
When I down load pictures from the card into a publisher file, some of the pictures are "read-only". It will not allow me to do anything with them because "access is denied". How do I remove the "read-only"? -- Thank you, Bonnie When you say card, do you mean removable media? Copy the image to your hard drive, right-click, properties, uncheck read only. -- Mary Sauer MSFT MVP news:// "Bonnie" <> wrote in message news:0BA840F5-14C7-4C...

OWA Change password problem!
Hi All I have Exchange 2003 SP1 running on W2K Advanced server with SP4. Whenever I try to change my password through OWA I get a 404 error page. Can someone help me with this?? Thanks in advance Saleh Ghaleb ...

Word OLE Problem
I am using VC6 to write an MFC application in which a Word 2003 document is embedded in the formview. 1. Is it possible to prevent the ole object being deactivated? For example by the escape key. 2. After the Word document is edited and changed, the SaveAs and Printout methods do not work when the OLE object is in-place active. I have to deactivated it before using the SaveAs and PrintOut methods. Any work-around? Thank you! Regards, Steven LO ...

POP 3 Connector problem on Exchange Server 5.5
Hi there, I am having a problem with junk email with null characters. (see;en-us;280331). This has only become a problem is the last month or so. As the article says, "This behavior occurs because one or more e-mail messages in the mailbox of the POP3 server may contain Null characters and the POP3 Connector for Small Business Server 4.5 is not able to download e-mail messages if they contain Null characters." 1. Can someone explain to me what a "null character" is? 2. What are some options to cure the problem. Simp...

Problem in Advanced Find
I have added another value in the drop down for activities search and that is to search in activity body text. It works fine but when ever i combine it with the criteria to find for last 7 days it got stucked and after a while gives time out expired message for ADO. I have searched the error on MS support and according to the solution reseted the timeout value to unlimited but it didnt work both on unlimited and 1 hour settings. It works fine if i give it the criteria of 7 days the other way like on or after 15/09/2004 while current date is 22/09/2004. Can any one know the solution to ...

Signature Fonts
We are using Outlook 2000 and need to disable the font selection for signature blocks (we want to keep it at Times New Roman 10). Is this possible? Again thank you in advance for your help. ...

Out of Office problem #4
We are working on Exchange 2K with SP3 installed. All PC's have either Outlook 2002 or 2003. For some reason, one user's Out of Office doesn't send out Out of Office replies. To save time, I've checked that: -other users are able to use OOF successfully -Exchange allows OOF replies -the user in question doesn't have other rules set up in Outlook -after turning OOF off and on again for this user doesn't work -logged in as this user on another machine with a different version of Outlook and had the same problem -logged in as this user in Outlook Web Access and still had t...

Is there font size limitation on antialiasing?
Hi, I made a program to display a character on LCD. To apply anti-aliasing, I created font with ANTIALIASED_QUALITY flag. [ CFont.CreateFont(... , lfQuality, ...) ] The problem is like this: When I displayed characters that the font size is larger than about 680-pixel, the anti-alising is not applied on displayed character. So I tested my program on the other computer. (My computer is Win2k, the other is WinXP.) At this time, characters that the font size is larger than 330-pixel is displayed with no anti-aliasing. On MSDN, [ ANTIALIASED_QUALITY ] Windows NT 4.0 and later: Font is ant...

Problem Inserting Images
Whenever I use Word or Powerpoint 2007, and I insert either a jpg or png, I get a line around the top and left side of my images. Like a border. This line sometimes prints, but it shows up online. It mostly happens after I will save the file or move throughout the document. I have no borders, no bevelled edges etc. I can't understand why this keeps happening? are you inserting the pictures into a placeholder on the slide? (where it says "click to add text.") If there's an empty one on the slide, the picture will insert into it automatically. As a test, inse...

Excel 97
Hi all. I'm currently designing an Excel spreadsheet at work, and everything is exactly the way I want it when unprotected. However, my group and outline (1 group for each Quarter of the year (Q1, Q2, Q3, Q4) and 1 group for Yearly summary (QSummary)) does not expand when I protect the worksheet. The worksheet MUST be protected as I have some extremely large formulas and chart data that I need locked / hidden, but I want the users to be able to select what quarter they enter data into. Currently, I have to unlock the worksheet every time I want to expand a new section. Does anybody know ...

problem with sending this-pointer thru a hook
i have multiple dialogs (Modeless, in TabCtrl) associated with classes (all derived from a single derived class of CPropertyPage) and i need to fill in data from outside. my principal design is this: <pagebase (derived from CPropertyPage)> | | | | <page 1> <page 2> <page 3> <page 4> (all derived from base) then i have a class for the dialog (lets call it "super") containing the TabCtrl with page (1-4) as members. up to this point, all is running perfectly well. now to my following little problem: in the pagebase i defined a st...

Plugin problem
Hi all, I have plugin registered for Quote products update. Now I want to trigger plugin when my total sales price of quote product changes. I am not able to find from where total sale price is being changed but its changing when i save the quoteproduct from but plugin is not triggered although i selected attribute as total sale price and post and pre satages. I have seen both onload and onsave methods of form but it was not updated from there. Any body has an idea on this please help me out. Regards, MKR ...

Password Problem
Hello everyone I have lots of users whom connect through the Internet to the Exchange 2000 server using either Outlook or Outlook express. Because of my gateway resides in the same computer than the exchange, the last uses port 6000 to send e-mails. The problem is that even with the passwords configured on the Outlook client, when the users try to send e-mail, the login screen comes up again, every time they close the outlook and re-open it it asks for password. I know I must validate the users that send mail to prevent the open relay, but is there something I can do to stop the password windo...

font size in comments
Excel 2003 all sp and patches loaded OS: Windows XP Can you change the default font size in comments? Thanks, Will Will From Debra Dalgleish.............. You can change the font size of new comments by changing the settings in your Control Panel. (Instructions for Windows XP) Right-click on the desktop, and choose Properties On the Appearance tab, click Advanced. From the Item dropdown, choose Tooltip Choose a font Size, click OK, click OK (Note: selecting a font type here will not affect the default font used in Excel's comments) Gord Dibben MS Excel MVP On Tue, 9 Jan...

Money 2003 password problems
Hi, I run Windows XP and Money 2003. I recently moved all my "c:\documents and settings" to another drive, which involved me having to make registry changes so windows knew where the "My documents" and "Shared Documents" had moved to. Everything worked fine, although I had some problems with MS money after the move so I uninstalled it and reinstalled it again (the exact same version). Since I have reinstalled it, the password I used to use to open my money file is not recognised. I am 100% certain that I am using the correct password. I tried using salv.exe to...