how to draw text vertically?

for example, some software like Microsoft Word, when docking a toolbar to 
left or right, the text on button will be drawn vertically. 


0
billgates1 (55)
4/20/2006 9:44:10 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
922 Views

Similar Articles

[PageSpeed] 26

In article <eShIl7FZGHA.3704@TK2MSFTNGP03.phx.gbl>, Bill Gates says...
> for example, some software like Microsoft Word, when docking a toolbar to 
> left or right, the text on button will be drawn vertically. 

Basically you specify the angle in lfEscapement of the LOGFONT 
structure. Then call CreateFontIndirect with this structure and you'll 
get a rotated font of type HFONT. Use SelectObject to select the font 
and then you can use TextOut or similar to draw the text.
-- 
stefan
0
me5306 (285)
4/20/2006 12:00:07 PM
Thanks!

"Stefan Ascher" 
<me@here.com>:MPG.1eb19630c8ff651a989680@msnews.microsoft.com...
> In article <eShIl7FZGHA.3704@TK2MSFTNGP03.phx.gbl>, Bill Gates says...
>> for example, some software like Microsoft Word, when docking a toolbar to
>> left or right, the text on button will be drawn vertically.
>
> Basically you specify the angle in lfEscapement of the LOGFONT
> structure. Then call CreateFontIndirect with this structure and you'll
> get a rotated font of type HFONT. Use SelectObject to select the font
> and then you can use TextOut or similar to draw the text.
> -- 
> stefan 


0
billgates1 (55)
4/21/2006 7:08:52 AM
Reply:

Similar Artilces:

Updating multiple text boxes at the same time?
Is it possible to update one text box and have another text box update with the same information? For example, on one page, there are 4 text boxes with the same information. If I change the information in one text box, how can I get the other 3 to update to the new information? Thanks, Karen Only way in Publisher is to copy/paste. -- Mary Sauer http://msauer.mvps.org/ "KM" <KM@discussions.microsoft.com> wrote in message news:D95ABFC9-AE90-466A-9011-EA5C00D5054F@microsoft.com... > Is it possible to update one text box and have another text box update with > the...

a new drawing not erase previous drawing?
visual studio c++ 6.0, mfc, graphics in my program a new drawing erases previous drawing. How to manage that all that is drawn stays alive on the window? And is not erased when the window is covered by another window, as well. And that the image does not flicker... Those last two have from time to time appeared in my attempts to solve the first problem. And that I didn't manage at all - make the first drawing, then the second, see them both at the same time on the window. I have tried the following and maybe more: Invalidate(false), InvalidateRect(false), override OnEraseBkgnd, ...

Serializing object graph directly to XML document rather than to text
Is there a way to serialize a graph of objects and get the output as an XML document, without first serializing to text and then parsing the text (I know how to do this but I find it really silly and inefficient). I googled around and from what I found, the answer is NO. Am I missing something obvious? Is there something new coming in .NET 2.0? Of course, I'm also interested in the reverse operation (deserializing directly from XmlDocument rather than from text). Bruno Bruno Jouhier wrote: > Is there a way to serialize a graph of objects and get the output as an XML > ...

text file, unicode
Not specifically about MFC, but here goes If there is a text file, like the ones created with Notepad, how can one know if it contains unicode or not. I tried to save a file in notepad with just english text, and checked to see what bytes it contains. The first 2 bytes seemed to be a flag, like a header. All other characters which would consume 1 byte in ASCII, consume 2 bytes with the first bytes beeing zero. I'm guessing a second way to know if a text contains unicode is to search for a "zero byte". Anybody have experience with this? Hanna-Barbera wrote: > Not speci...

Chart Text columns
Is it possible to make a pie chart with text only in Excel columns. Example: column with different city names and then create a chart that compiles the percentage of cells with each of the different city names? Thanks in advance.... @ Hi you have to create a list of the frequency of each 'text' first on your own :-) You could use for example a pivot table to create such a list. See: http://www.cpearson.com/excel/pivots.htm http://peltiertech.com/Excel/Pivots/pivotstart.htm http://www.contextures.com/xlPivot02.html http://www.ozgrid.com/Excel/excel-pivot-tables.htm http://www.tech...

Text values to numeric values
Is there a formula to convert a text value in a cell to a numeri value? Thanks, Jayveeja -- jayveeja ----------------------------------------------------------------------- jayveejay's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=504 View this thread: http://www.excelforum.com/showthread.php?threadid=39463 Good afternoon Jatveejay Yes there is. Say your numeric value is in A1, in B1 the formula: =VALUE(A1) will show the number as a value. If you wanted to convert a number in its cell from a text number to a value number, ie., not use a formula in a di...

how to draw a bitmap transparently?
Hi, I have an owner draw button associated with a bitmap. In the bitmap editor, I turn off the option "draw opaque" for the bitmap. That is, I make it transparent. However, the the bitmap's background color still shows up on the button. The bitmap has only a solid circle in the middle. What else do I have to do? Please help. Thanks. Tony One thing you can do--and this works only for some restricted cases, which you may or may not have--is to make the button background 192,192,192, and when you LoadImage, you specify LR_MAP3DCOLORS. It will change the 192,192,192 to...

Invert Text
Is there an easy way to invert text? For example, if A1 = "Blanche DuBois" I would like invert(A1) to equal "sioBuD ehcnalB" Thanks in advance -- Gary's Student You can use StrReverse in a User Defined Function, or in a macro http://groups.google.com/groups?threadm=%2352e1e%239DHA.3648@TK2MSFTNGP11.phx.gbl Function ReverseText(cell) ReverseText = StrReverse(cell.Text) End Function usage: =ReverseText(A1) --- HTH, http://www.mvps.org/dmcritchie/excel/strings.htm David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: ...

owner draw CListBox, how to draw "no item found"
Hello, I have an owner draw listbox, in the DrawItem I draw the items. If the listbox doesn't contain any item I would like to display a message "no item found" but this is no item, so DrawItem is the wrong place. Where should I do this? OnPaint, OnEraseBkgnd? I thought I would be able to do something like this for a test (just paint the window blue) but it's always white BOOL CmyListbox::OnEraseBkgnd(CDC* pDC) { if (m_pItemList.GetCount() < 1) { CRect rc; GetClientRect(&rc); pDC->FillSolidRect(rc,RGB(0,0,255)); return TRU...

Saving text
I have an amount of text covering several lines - in Excel. How do I copy and save these lines to one line of a chart using wrap round? ...

How to write text to command prompt console windows?
I am using VC++ 6.0 to build a windows based application, however, my application allows user to input command arguments in the dos prompt windows. I want to have a warning message for user if they have input the wrong arguments. How can I write text to the dos prompt windows if user input the wrong arguments? Thanks in advance. Steven. Steven wrote: > I am using VC++ 6.0 to build a windows based application, however, my > application allows user to input command arguments in the dos prompt > windows. I want to have a warning message for user if they have input the > wrong ar...

Text in autoshape not displayed
Hi, I have Excel 2002 and when i create autoshapes and enter the text in them i cannot see them. I can only see that shape and colour in it. I see the text types in it when i select that object. Plz assist me how can I see the text in that box or object. Make sure that the font color is not the same as the fill color. "Gaurav" wrote: > Hi, > I have Excel 2002 and when i create autoshapes and enter the text in them i > cannot see them. I can only see that shape and colour in it. I see the text > types in it when i select that object. Plz assist me how can I see the...

Meeting text is deleted when updated meeting request is received
Does anyone know how I can avoid the text being deleted when I receive an updated meeting request when I'm not the owner of a meeting? Right now, I type and save notes for upcoming meetings in the request, but then if someone sends an update to the meeting date/time, all my notes are gone even before I accept the update request. Thanks in advance! ...

Reply marking in original email text
I can't find how to turn on the reply marking (ie my name) when replying to an email by inserting the reply within the body of the original email. I am using Outlook 2000 TOOLS menu Select OPTIONS On the PREFERENCES tab Click the E-MAIL OPTIONS... button Near the bottom of thid window is a little box to turn on next to "Mark my comments with:" -- Nikki Peterson [MVP - Outlook] "Paul Barton" <paulb@NOSPAMcae.com.au> wrote in message news:%230g6OU%230DHA.2604@TK2MSFTNGP09.phx.gbl... I can't find how to turn on the reply marking (ie my name) when replying...

To "collapse" text within a new message
Is there a way to add text within an email message so that it can be "expanded" or collapsed" by the reader upon receipt? Sounds like you are referring to an attachment, Word doc or Notepad text file. Eric_G wrote: > Is there a way to add text within an email message so that it can be > "expanded" or collapsed" by the reader upon receipt? No, because Outlook (and many other mail clients) don't support active content. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Ce...

Can value in ControlTip Text change automatically.
Form is a multi-record form. I need to be able to set the ControlTip Text id a text box to ="abc" & variable & "xyz" Is this sort of thing possible? -- Regards Tom On Thu, 8 Nov 2007 20:19:01 -0800, ThomasAJ wrote: > Form is a multi-record form. > > I need to be able to set the ControlTip Text id a text box to > ="abc" & variable & "xyz" > > Is this sort of thing possible? You can if you use code. For example, code the control's MouseMove event: Me![ControlName].ControlTipText = "abc" & Variab...

Draw a horizontal line after the last record is printed on each pa
The details section of my report draws vertical lines which grow to accomodate text size changes. I would like to have a horizontal line drawn when last record finishes printing on the page and joins the end of the last vertical line to make a table. Please help. Thanks. -- Lydia Liu Access/VB Programmer There was at least one answer posted to your same question yesterday. -- Duane Hookom Microsoft Access MVP "Lydia" wrote: > The details section of my report draws vertical lines which grow to > accomodate text size changes. I would like to ha...

Anyone want to draw roads?
Just thought that if anyone wants to do diagrams with roads or rivers as double lines then Jeff Lanam (this n/group) kindly provided me with this link to a free programme called OCAD. Its a tiny file, is EASY to use and the results can be exported as a .bmp into Publisher. www.ocad.com I asked on this newsgroup how to achieve this and many threads resulted, so thought I'd post the solution. Many thanks Jeff (see reply to your post) Chrissss........ Glad you solved your map problem. An interesting program. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.o...

Displaying text on a controls
Hi, I want to display a text on a button control and static control from a my program. I tried doing SetButtonText() API , but it is not displaying it on a button control. Is their any API's to display a text on a" Button" and "Static" controls. Hi, Use SetWindowText(if the parent is a window) or SetDlgItemText(if the parent is dialog). Thanx, Ch.T.Gopi Kumar. "lucky" wrote: > Hi, > > I want to display a text on a button control and static control from a > my program. > I tried doing SetButtonText() API , but it is not displaying it o...

Drawing graphs on Modal dialogs
I've encounter a strange phenomenon: I have an MFC application that creates a child dialog using DoModal(). Within this child dialog I have a couple of buttons and a graph plot drawn within the area of a Cstatic using a third party API from GraphicsServer. This modal dialog has a minimize button, but when I minimize the dialog, the graph doesn't minimize with the dialog is always on top of the screen. Has anyone encountered this problem? Do you think is is a GraphicsServer issue or a Microsoft issue? I've called Graphics Server and they say that they haven't countered my proble...

Orientation of text in an autoshape
In Excel 2003, I have a rectangle that is tall and thin. I want to put some text inside it, but I need the text oriented 90 degrees in the rectangle. Is this possible? If so, how? Thanks, Tonso I will assume a recatngle fro the Drawing Toolbar. Right-click on the edge of the rectangle and "Format Autoshape" and on Alignment tab choose your orientation. Gord Dibben MS Excel MVP On Wed, 21 Apr 2010 12:32:58 -0700 (PDT), Tonso <wthomasss@hotmail.com> wrote: >In Excel 2003, I have a rectangle that is tall and thin. I want to put >some text inside i...

Right-Align Field When Exporting to Text
Is there an easier equivalent to the "xg_lPad" function in ACCESS 2007" to right-align text in a field when doing a query? That function worked with ACCESS 2003, but does not work when using ACCESS 2007 with the 2003 database. -- JL Hi Jimmie, If there are never nulls or zero-length strings in your fields, you could do something like: Format("right-justify me", "@@@@@@@@@@@@@@@@@@@@@@@@@") If there can be nulls or zero-length strings you could use something like the following: Right(Space(25) & "Right-justify me!&q...

Missing email content, body text, from etc
I have one user on our exchange 5.0 system thats having some weird problems. We have a exchange 5.0 box that handles internal mail. We also have pop accounts with our ISP. In the client (Outlook 2000) I get the pop account to drop all the pop email into the exchange mailbox. Everything seems to be working okay from inside the network. We have another building with computers setup. This computers (XP) have a vpn connection and outlook XP set up the same as it would be on the internal network. Users connect via the vpn connection and then open outlook. It shows their exchange box and also coll...

Angling Label Text on a Chart
I have a user with a Multi-Level Category Label on his chart. The label has the following data: 2 4 6 8 Nov-09 Dec-09 Jan-10 Feb-10 He's wanting the text to be aligned at an angle and so far I'm only able to get the top values to display at an angle and not both. Any ideas? -- -Karen Excel does not allow for changing the orientation of lower layers of multiple level labels. - Jon ------- Jon Peltier, Peltier Technical Services, Inc. http://PeltierTech.com/WordPress/ Advanced Excel Conference - June 17-18 2009 - Charting and...

Where did the drawing go?
Visio 2003 SP2 with all the latest patches. I have an extensive floor plan created in a file. I renamed the page by double-clicking on the tab and replacing the name with 'Current'. I then added a page and called it 'Proposed'. The program hour-glassed for a bit which I thought was curious and then hung. I could close the program and since I did some editing on the file, I saved it when prompted. The next time I opened the file, the design was not visible and the scale was literally off the charts (it says X = - 46 ft., Y = 89478492 ft. 6, and if I go into Page Setup a...