CScrollView and text height

I call DrawText to draw text on the CScrollView.When text has multi-line,how
do I get the screen height to draw them?
Thanks.

___________________________________
http://www.msale.net/bbs
a Chinese-language message board for developers,including
palm,ppc,symbian,and etc.

http://www.zirong.net/blog/
Miken's private life


0
2/15/2005 4:34:36 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1910 Views

Similar Articles

[PageSpeed] 59

If you are trying to calculate the height of a multiline string user
DrawText with the DT_CALCRECT flag.
It will use the width of the Rect that you pass it, and sets the bottom of
the rect to what the bottom would be if you draw it.

AliR.

"Miken" <mikenwonder@msn.com> wrote in message
news:OPl$Aw3EFHA.2052@TK2MSFTNGP09.phx.gbl...
> I call DrawText to draw text on the CScrollView.When text has
multi-line,how
> do I get the screen height to draw them?
> Thanks.
>
> ___________________________________
> http://www.msale.net/bbs
> a Chinese-language message board for developers,including
> palm,ppc,symbian,and etc.
>
> http://www.zirong.net/blog/
> Miken's private life
>
>


0
AliR1 (391)
2/15/2005 6:24:45 PM
Miken,

GetClientRect for the view will get the available height of your output
window.

Johan Rosengren
Abstrakt Mekanik AB

"Miken" <mikenwonder@msn.com> a �crit dans le message de
news:OPl$Aw3EFHA.2052@TK2MSFTNGP09.phx.gbl...
> I call DrawText to draw text on the CScrollView.When text has
multi-line,how
> do I get the screen height to draw them?
> Thanks.
>
> ___________________________________
> http://www.msale.net/bbs
> a Chinese-language message board for developers,including
> palm,ppc,symbian,and etc.
>
> http://www.zirong.net/blog/
> Miken's private life
>
>


0
2/15/2005 6:29:28 PM
Reply:

Similar Artilces:

Sorting by Text field of numbers
I am using Access 2003. I have created a database to help me files by "Lot#'s". Our lot numbers for one of our products is all over the place so I created the Lot # field as a text field. Ex: 02-01-01, 10000272925, 10-06-02-04-06 and 1503011 A1-02. Why does access put - 1000272925 before 10-06-02-03-05? Does this look right to anyone? My thinking is that "10" comes before "1000272925". What affect does the "-" have in sorting the numbers. Would I be better off to put a space instead of the "-"? Can anyone help me ...

Importing Multiple Text Files using VB
Hiya I have found a very useful macro except that there are a couple of changes needed for it to suit my purpose.Being "vb" challenged I can't seem to get it to work fthe way I want it. The macro will import text files from a specified directory however it places the text file name on top of each column as well as the data. I need it to enter the information row by row with the text file name at the start of each row. The data would be entered into a single cell where I have formulas to extract the information that I need. Please help. Sub Consolidate() With Application.FileSear...

cannot import text with pub 2000
I have Publisher 2000 as part Office and I use it very infrequently. I need to import the text in a word Doc and there seems to be no way to import text. I start Publisher and click "insert", and "text file" is grayed out. I have tried to repair and finally, I uninstalled by going through setup and making publisher "not available". I then reinstalled, and there was no change. thanks Copy the text in the Word doc Create a text box in the Publisher file Select Edit and Paste. -- Don -------- Vancouver, USA - One of the great cities in one of the 45+ countri...

Sorting without changing row height
Greetings! This is my first post -- and I'm hopeful that one or more o you know a quick fix for this problem. I maintain a list of projects in Excel. Two of the columns ar "Requesting Manager" and "Project". Dozens of managers access thi spreadsheet on the network, and to make it easier for them to fin their projects I sort the worksheet first by manager, then by project. The problem is that row height varies across the spreadsheet dependin on how much in the way of notes are included in a "Notes" field. Whe I do the sorting I have to scroll down and m...

Lost Jobs and Full Text Search in CRM 3.0
Greetings! Recently we moved all our databases on the new SQL Server 2005. Then we deleted old database server. MSCRM 3.0 databases connected and work OK, but we have some troubles. In Microsoft CRM Environment Diagnostics Wizard we have 2 warnings: Job MSDN_Subscriber_MSCRM.Update Contract States could not be found in the sysjobs table. Job Start_Incremental on MSDN_Subscriber_MSCRM.ftcat_documentindex.[7.5] could not be found in the sysjobs table. Does anyone know how to create these jobs manually? Also we lost full-text catalog ftcat_documentindex. Any ideas how to recreate it? T...

Outlook 2000 Calendar Text Entry query. Help!
Husband and I are both retired and have never used Outlook before, even though it's installed on our home computer. Now that we have more time on our hands, we're using the Outlook monthly calendar: we print out a "blank" month at a time, pop the page into a ring bind folder, and then write (by hand) notes on the various days. We would like to be able to do this on-screen though, rather than with a pen! We're planning a day-by-day schedule for a holiday next February but we cannot work out how to "write" timetable notes into the squares for each separate...

format text in textbox
I have Publisher 2003 and copied text form Notepad into textbox. How do I change the formatting so that lines wrap properly? I have one word lines, etc. Thanks for information. Susan After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Susan <anonymous@discussions.microsoft.com>... > I have Publisher 2003 and copied text form Notepad into textbox. How > do I change the formatting so that lines wrap properly? I have one > word lines, etc. This is a problem with the original text - if you resize your Notepad window, you will probably find that the text w...

Underlining Data in a Text Box
I am trying to create a form that allows underlining for specific characters when the users wants to enter them underlined. I'm not sure how to do this. I have a Text Box over a Memo field. When I add the Formatting toolbar to the form, and the user clicks on underlining, all the characters in the control become underlined. What I need is a way for the user to underline only one character at a time when needed. I am using Access 2000, and am familiar with VBA if needed. Any help would be appreciated -- Frank Wagner fwagner111@aol.com "Frank Wagner" <FrankWagner@d...

Estimating contrast between text and background RGB colors
Hello I don't think this is the right place to post my question, but I would appreciate if someone could direct me towards the appropriate forum. I'm developping a program with MS VC 6.0 and the user of this program can pick the colors he/she wants for the text, and its background. Of course, if the colors are the same or if they are close, one cannot read the text because of a contrast too low. I'm looking for a test based on the comparison of the RGB colors and whose output would be either "OK, contrast is large enough" or "Sorry, contrast is too low, pick another ...

how to converts a number to text eg. "2" become "two" #2
http://support.microsoft.com/default.aspx?scid=kb;en-us;213360 many excel utilities from third parties have this built in http://xcell05.free.fr/ Morefunc for instance, see above link -- Regards, Peo Sjoblom Northwest Excel Solutions Portland, Oregon "CQ" <CQ@discussions.microsoft.com> wrote in message news:03EC3E12-2919-4F4F-9D6B-101F7C095860@microsoft.com... > ...

Contact attribute "websiteurl" coded as format "text" and not "url"
I have some contacts that need a website associated with their record. I noticed that the Contact has a built in attribute "websiteurl" built in, so I added it to the default form. I then entered a url to the field in one of my contact records. I noticed that this field is not a hyperlink/hotlink. i.e. I cant click on it and open the web-site. When I checked the "websiteurl" attribute, I noticed it was set as a format of "text" and NOT "url" as should be the case. The "Account" entity already had the web site field added to its form, and thi...

Pasting a line of text
I just started using Microsoft Office Outlook 2003 SP2 as my work in now requiring it for all email access. Today I noticed while composing an email that when I cut a line of text (ctrl-x) and then try to paste the line of text somewhere else (ctrl-v) it strips off the carriage return/newline! grrr... I've verified that the cut (ctrl-x) works correctly by pasting the line of text into a text/hex editor, and all the bytes show up correctly. But even if I copy the line of text from another editor and paste it into the email it strips off the carriage return/newline. Is there some prefer...

Text strings from a variable string
Is there anyway I can set up a system where if I type a variable ( alpha numeric/numeric) in say d1, it will automatically put strings assigned to this variable in D2, D3 e.g variable P1234 D1 D2 D3 D4 P1234 op1 op2 op3 etc VLOOKUP table and formulas should do the trick. See help on VLOOKUP I note you have your D1, D2, D3 and D4 horizontally displayed when they should be vertically oriented. Is that a typo or did you mean D1, E1, F1 and G1? Gord Dibben MS Excel MVP On Mon, 26 Oct 2009 11:21:01 -0700, Ferdy <Ferdy@discussions.microsoft.com> wrote: >Is ther...

convert a number to text (in english)
How can i convert a number to text , but in english (for example, i have the number 12345 stored on cell A1 and i want to somehow have the text "Twelve thousand and three hunderd and fourty five" in another cell, for example cell A2). i tried to do it using BAHTTEXT but i get a nonreadable text. Costa, Put the functions below into a standard codemodule - watch line wrapping errors - and use it by entering =MakeWords(12345) or =MakeWords(A2) where A2 contains 12345 HTH, Bernie Function MakeWords(ByVal InValue As Double) As String MakeWords = "" n = InValue tr...

Rules
Can anyone help please? I can create a rule to look for specfic text in the subject line of incoming emails, but it uses "OR" so that Outlook looks for any one of the words I type. Can I get it to use "AND" instead to look for all of the words? Any help would be much appreciated. Rob E. ...

Limit input to Text Box
I want to limit the keys available to user to make input to a numeric field. I want to do this be traping the KEYDOWN event. If the user presses a key that I don't want them to use, how do I cancel the KEYDOWN? Do I set the keycode to false? "PosseJohn" <PosseJohn@discussions.microsoft.com> wrote in message news:C9585DF0-735B-47F9-A18F-8E6B647E95AD@microsoft.com... >I want to limit the keys available to user to make input to a numeric >field. > > I want to do this be traping the KEYDOWN event. > > If the user presses a key that I don&...

Text boxes printing jumbled
In Publisher 2003, when I print only some of my text boxes are coming out jumbled, but when I look at the screen it looks fine. Jumbled? Not sure I know what that means. Have you looked on the manufacturer's web site of your model printer for an updated driver? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Wendy" <Wendy@discussions.microsoft.com> wrote in message news:475B7BA5-7D77-462A-8A93-1D2CFD648811@microsoft.com... > In Publisher 2003, when I print only some of my text boxes are coming out > jum...

Text boxes
Hi Does anyone know if Publsiher 2007 can do rounded corners on text boxes please? Serif Page Plus 11 can but........ Thanks AVB Or simply put a rounded rectangle around the text box. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "CyberTaz" <typegeneraltaz1ATcomcastdotnet> wrote in message news:ODNS%23itoHHA.3512@TK2MSFTNGP06.phx.gbl... > You can't change the shape of an existing text box, but you can right-click > [just about] any AutoShape & choose Add Text from the contextual menu. IOW, > you ...

Problems with images from the web flowing through a text box
I copy text and images from the web into a new blank publication. Some times the image I copy fades into the background of the text box and the desired result is to have the image be square in the text box. Any suggestions? Thank you Bring the image to the front. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Evelyn A. trudel" <Evelyn A. trudel@discussions.microsoft.com> wrote in message news:5D219D5E-84FE-41DD-9531-610745BADCF9@microsoft.com... >I copy text and images from the web into a new blank publication...

CScrollView question
I have created a window derived from CScrollView. When the logical view is larger then the display view, I get both horiz and vert scroll bars. The scrolling works fine with the scroll bars. I want to programatically controll the scrolling so how can I make the scroll bars disappear and still have the scrolling functionality? In other words, I want to access to the scroll bars in CScrollView and hide them with ShowWindow(SW_HIDE), and then still be able to scroll by sending scroll messages programatically. Is this possible? Thanks in advance. Aeshkar I did this a few years ago. What ...

formatting text as active hyperlinks
I have tried to format cells containing valid urls as hyperlinks. I can copy the format from a valid and active hyperlink; but when I paste it in the cell (I have tried pasting format), the contents look like a hyperlink, but the mouse cursor does not change when I hover over it, and I can't open the web site by clicking on it? Any ideas? -- dpimental ------------------------------------------------------------------------ dpimental's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=14848 View this thread: http://www.excelforum.com/showthread.php?threadid=26...

Convert text to numbers #2
I have a large spreadsheet with a column that has the numbers formatted as text. I tried reformatting the column from numbers to text but when I sum the column with other columns (that are formatted as numbers) it still doesn't show in the sum. The spreadsheet is too big for me to retype the numbers. Can anyone please help??? In a another column insert a formula that multiplies the first colum that you are having problems with by 1. i.e = a1*1 and drag all the way down. This will force Excel to create a result that is a number. Then copy this new results column on top of the old one...

Wrapping text box around a picture?
I know there is a way to do it. I want to put a picutre say in the upper left hand corner. Then Put a text box down the right of the pucture and underneath of it part way. Kind of like a back wards L. I have tried formatting the picture and text box, but I must be doing something wrong? thanks Bruce Two text boxes, one on the right and one below. Then link the bottom one with the one on the right. -- Computing should be about insight, not numbers or flash. "Bruce" wrote: > I know there is a way to do it. > > I want to put a picutre say in the upper left hand c...

How can i use" text effects" in Excell just like MSword
There's a powerful " Text effects " in MSword with features like: blinking,skimmer,etc , my question is why same effects is not available in Excell ? How can i use such effects for my exell files ? I'll appreciate your assistance . MSWord is a word processor. Excel is essentially a number cruncher. For the most part, those text effects can't be used in excel. Abbas wrote: > > There's a powerful " Text effects " in MSword with features like: > blinking,skimmer,etc , my question is why same effects is not available in > Excell ? How can ...

Change of text or background color doesn't change on the screen.
In Excel, whenever I change the color of the text or highlight a cell with a different background color, it's not being reflected on the screen. Any ideas? An idea, yes: may be the conditional format. If for example the cell is supposed to become red when the value is null, and the value is null, then it will stay while the condition is true. Even if you change the "regular" color (it will appear only when the condition is false) Under Options, View, Colour is Colour set to 'Automatic' ? Does this happen on any specific sheet or in all sheets, in an specific ...