Query regarding A,B,C char. width values returned in 16-bit and 32-bit OS

I am trying to retrieve individual character widths of a string
(from a TrueType font) and I tried using GetCharWidth (which weirdly
works for TrueType fonts too tho' MSDN says otherwise) and/or
GetCharABCWidths to retrieve the A,B and C spacings. Please
note that I have selected the TrueType font (hFont) into the Device
Context (hDC).

I used GetCharABCWidths. Problem is this: GetCharABCWidths returns
correct A,B and C widths in Win 98 and incorrect (much lesser A,B and
C widths such that the characters OVERLAP) in other 32-bit OS (NT,
XP).
The effect is seen across all TrueType fonts, though the overlapping
is
clearly visible in Lucida Sans Unicode and some other fonts.

I wish to clarify on if the same API could return different values on
different OS and if so, what could be the solution for this...

0
6/2/2008 7:31:52 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
1035 Views

Similar Articles

[PageSpeed] 32

When you get the ABC widths:

are you using the same display, with the same display card, with the same version of the
display driver, with the same screen resolution, using the same font, of the exact same
size, on both systems?  (That's just a start...)

What does GetLogFont tell you about the fonts on both systems?  
					joe

On Mon, 2 Jun 2008 00:31:52 -0700 (PDT), NHSubramanian@gmail.com wrote:

>I am trying to retrieve individual character widths of a string
>(from a TrueType font) and I tried using GetCharWidth (which weirdly
>works for TrueType fonts too tho' MSDN says otherwise) and/or
>GetCharABCWidths to retrieve the A,B and C spacings. Please
>note that I have selected the TrueType font (hFont) into the Device
>Context (hDC).
>
>I used GetCharABCWidths. Problem is this: GetCharABCWidths returns
>correct A,B and C widths in Win 98 and incorrect (much lesser A,B and
>C widths such that the characters OVERLAP) in other 32-bit OS (NT,
>XP).
>The effect is seen across all TrueType fonts, though the overlapping
>is
>clearly visible in Lucida Sans Unicode and some other fonts.
>
>I wish to clarify on if the same API could return different values on
>different OS and if so, what could be the solution for this...
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15973)
6/8/2008 3:46:12 AM
Reply:

Similar Artilces:

How do I create a B&B reservation system in Excel?
Trying to create a reservation system for 6 room B&B in excel. Does anyone have template or know where to get one? ...

Erratic results from query criteria
I am getting different results from running the same query with the same selections. One moment it is all behaving as expected, the next it has gone haywire. (I have done what appears to me to be EXACTLY what I have done in another database, where it works perfectly every single time.) In a query I have, amongst others, the following fields: Category SubCategory Company I want to be able to select any OR ALL of the relevant fields. I have the following criteria: Like "*"&[Type Category otherwise leave blank for ALL]&"*" Like "*"&a...

Drillthrough report using "Jump to URL" quits working when Parent Report Parameter values are changed
I have a summary report that lists totals and the report has the ability to drillthrough to another "details" report by clicking the numbers on the summary report. The details report is rendered in a separate window using "Jump to URL" and passing the parameters from the summary report to the details report. This has worked fine for some time, but my problem is I need to modify the values of one of the report parameters that is used by the summary report and passed to the detail report. When I modify the parameter "value" and deploy the report the ...

Timer for Queries?
Does anyone know of a macro or add-on that I could use as a simple timer for queries? I don't like to use the CPU time in the Task Manager because of it's inaccuracy when not receiving full CPU usage. THanks for any suggestions -- cmungs Exactly what are you trying to accomplish? Are you trying to cause a query to run automatically every so often? If so, you will need to use the timer event on a form to do that. -- Lynn Trapp Microsoft MVP (Access) www.ltcomputerdesigns.com "cmungs" <cmungs@discussions.microsoft.com> wrote in message news:88EC7019-045F-4EF...

Update Query ?
Is there a way to 1) Assign events when adding in data thru an update query for example if you append a bunch of data into a table could you then do some kind of an update query to say if there is an initial event and no others tag this one Renewal 1 etc.. the only real data you have to go on would be Customer A and the total amt .. the event, renewal event and the delta would all need to be added in example: Say Customer A comes in with an initial deal then Customer A renews their deal So, the data would look like when you're done.: Year Custo...

Using Access form to assign values of variables in an Excel VBA program
I have created a VBA program for Ms Excel.But,to get desired results, every time, I go into the code to change the values of variables.Is there a way to get the values of variables stored in an Access table? YOu need to do a search for ADO method (ActiveX Data Object). There are plenty of example of code on the web. You need to add two references in your VBA to use the method. from VBA menu tools - References 1) Microsoft Access XX.X object library 2) Microsfot ActiveX Data Objects X.X library Use the latest versio of the two libraries on your PC. You will make a conn...

ImagePath= \??\C:\... (Start and stop driver driver using net start/stop drivername)
Hi, it is a non Pnp Driver ImagePath= \??\C:\Windows\system32\drivers\myDriver.sys -> The driver can be startet but no Driver details For what is the \??\ for ? Can some one explain it ? Why does it not work on if the following paths are set? ImagePath= system32\drivers\myDriver.sys -> System error 2 has occurred. -> The system cannot find the file specified. ImagePath= %SystemRoot%\system32\drivers\myDriver.sys -> System error 2 has occurred. -> The system cannot find the path specified. cheers, GeminiServer > Why does it not work on if the followi...

setting label width
Hello, I'm new to Visio. I'm trying to find out how to set the label width. I feel I must be over-looking the obvious, but I just can't find where to set this. The problem is that my text for the label wraps down on the next line and I want it to be all on the same line. Thanks for any help... :) Use the Text Block tool and stretch the box. The Text Block tool is the Letter "A" with an arrow around it (It is behind the Text tool (just a letter "A")) John... Visio MVP Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm Need VBA examples? h...

How to update values in message boxes from within VBA?
I have a macro (in VB) as shown down below invoked by F11 - I created it initially with record macro. It allows me to type in a name for an invoice and increment the invoice number. When I first press F11 it invokes two consecutive message boxes to accept input to update two fields on the invoice. The first message box comes up with the current value of the field from the invoice template (Client Name). I change the name in the this first message box and press OK on the message box. The second message box comes up with the current value of the field from the invoice templat...

design query match anywhere?
In the design query I want to match the letters "ABC" anywhere in the column 'description'. I could not get instr to work by using: InStr(description, "ABC")) > 0 How else can I match ABC (upper and lowercase) to anywhere in my 'description' column? Thanks! Are you saying you put that InStr bit as a criteria under your Description field in the query designer? Try putting Like "*ABC*" as the criteria instead. Alternatively, you could add a computed field to the query InStr([Description, "ABC") and then put >0 as the ...

keep value if formula has no data
I have a worksheet that automatically updates everyday and works some calculations for me. How can I get the formula sheet to keep the value from the previous day if there is no data today. Because now it is filling in all my cells with zeros. Thanks -- Nicki Taylor Post your formula. -- Regards, RD ---------------------------------------------------------------------------- ------------------- Please keep all correspondence within the Group, so all may benefit ! ---------------------------------------------------------------------------- ------------------- "NTaylor" <...

Unexpected Error- Running Advance Find Query
I am getting a message that says "Unexpected Error An Error has occurred" when I am running an advanced find query on two custom entities. It seems to be when I have certain custom fields included in my view that the query errors out. Any help on this would be greatly appreciated. Thanks so much. Just wanted to add that I seem to get errors when there is a 0.00 amount in these fields... "TJ" wrote: > I am getting a message that says "Unexpected Error An Error has occurred" > when I am running an advanced find query on two custom entities. It se...

pass through query
If a combobox is populated by a pass-through query, does it requery every time the form is closed and reopened? Thanks, Sam Yes. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Sam wrote: > If a combobox is populated by a pass-through query, does it requery every > time the form is closed and reopened? > Thanks, > Sam ...

a count field in a query?
Hello, I have a query in which I would like to create a field which increments by 1 for each record selected, so if there are 10 records selected by the query, this column would show numbers 1 to 10. Ideally I would like to have some text in front of each number, say invoice1, invoice2 etc. From a previous posting I realise that this is frowned upon but it would be the simplest solution for my problem! How can I do this? Thanks Geoff On Mon, 03 Dec 2007 08:54:00 +0000, Geoff Cox <<>> wrote: >Hello, > >I have a query in which I would like to create a field which >...

Saving Username and Pass with Web Queries
I am pulling data from a website that requires you to provide a usernam and password everytime you visit the site. Excel has cachin capabilities, but everytime you close excel and try and open up th spreadsheet again, it can't login. What is the fix for this? Thanks, Hend -- Message posted from http://www.ExcelForum.com Bump! --- Message posted from http://www.ExcelForum.com/ ...

Conditioning formating a data value to change to a color
Hello, What I am trying to do is lets say I have a bunch of numbers in column F (for illustration purposes I will only show one number) and what I would like if any of the numbers in column F are greater than 300 I want it to change the color of that number to red automatical (See example) date time day evening night 24hr. Totals 3/12/04 8:00 100 12:00 300 4:00 600 1000 (change to red) I have no problem with changing the number to red m...

Birthday query for many children in one record
I have a database for the church, it has one main flat table only. Each record for the parents have field for child1 name, child1birthday, child2 name, child2birthday, child3 name, child3birthday - up to 5 children. I am having difficulty trying to get a report to list the birthdays of the children like this parent name, child 1 name, child 1 birthday month etc. so you get something like this:- Parent John Smith, child Mary Smith January 3 Parent Fred Jones, child Bert Jones March 4 Parent John Smith, child Jane Smith March 6 Parent Harry Brown, child Jane Brown March 6 Parent Bert Taylor,...

Synchronized Multi Value Lookup Boxes
Total newbie to Access here, but I have done considerable work in Excel, VBA, etc. Anyway, I'm trying to make what should be a very straightforward database. Basically, each entry will contain an attachment (PDF, word, ppt, etc.), filename, file description, and 3 layers of categorization for each attachment. The categorization process will look something like this: Layer 1 (category): need ability to choose multiple categories Layer 2 (sub-category): each category in layer 1 has x number of sub-categories. I would like to populate the list of options for layer 2 ...

Unresponsive Query Wizard
Hi there, I have an Excel 2003 user who is using a spreadsheet that pulls data from our SQL server. When he opens it and refreshes the data it is fine, it pulls the current data, but when he tries to edit the query, the Query Wizard does not appear, he can see it on the task bar, but when he switches focus using task manager everything is greyed out and nothing works. I have tested the file from my computer and it is fine, which suggests a problem with his machine or installation. Does anyone have any ideas? Cheers, Steve Dooza wrote: > Hi there, > I have an Excel 2003 user who...

Another simple query
Dear all, I have a table that contains first names and last names in different fields. Is there any way to write a query that will give as a result the first name and last name in the same field? I hope this makes sense. Thanks in advance! SELECT [last_name_field] & ", " & [first_name_field] AS whole_name FROM [your_name_table] Change the field and table names to whatever your actual fields and tables are. Cheers, Jason Lepack On Apr 23, 9:47 am, Homer <peter.a.r...@googlemail.com> wrote: > Dear all, > > I have a table that contains first names an...

Query query
I am trying to create a new field in which it shows the sum total of 10 fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest way to do this? -- Joe NewFieldName: [Charge Time] + [Charge Time 2] + [Charge Time 3] .... etc -- Good Luck BS"D "joet5402" wrote: > I am trying to create a new field in which it shows the sum total of 10 > fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest > way to do this? > -- > Joe I tried this, and it doesn't work. Is there something I'm forgetting? -- Joe ...

group by query trouble
I'm trying to run a query that counts the number of people with hemoglobin of type SS, type SC, and then all others. There are about 12 different kinds of types. Basically I want a count for SS, a count for SC, and then a count that totals all the others into one count. Hopefully that makes sense. I'm using group by for the SS and SC which works great, but I'm not sure how to tell it to add up the others. I'm not a big fan of nested IIf statements, but this should work after you put in the proper field and table names: SELECT IIf([Hemoglobin]="SC","SC&...

Find value in column and associate result to it
Excel 2003: I need to search a value in worksheet (2) that exists in worksheet (1), confirm if it status, in the same row but another column, is "ok" or "not ok" and associate a result for the search ("yes" if "ok" or "no" if "not ok"). But in worksheet (2) there are more than one result for each search. Example: worksheet 1: | worksheet 2: column A | column A column B HOME | HOME---------------ok CAT | HOME--------------not ok DOG | ...

To Query or not to Query??
Hello all - I'm a newbe to Access but have made great progress. I'm using Acess 2003. The db is up and running prefectly. Now I need to tackle the reporting. I have seen posts about reports and queries and am a little confused. Do I need to create a query to run my reports off of? I have a tabbed subform in the main form. There are seven tabs breaking up all the services we provide. Like "Promo Items", "Leads", "Client Printed Material","Internal Print Material" and so on. The main form has the User, Branch and Marketing Rep. I need to...

Dynamic Query
Hi! I am trying to dynamically modify my pass-through query containing a procedure call with 2 parameters. When I run my access app, I get this error: "Object or provider is not capable of performing reuqested operation." Below is my access code: Dim varItem As Variant Dim strSQL As String Dim cat As ADOX.Catalog Dim cmd As ADODB.Command Dim strMyDate As String, dtMyDate As Date dtMyDate = CDate([Forms]![ySalesHistory]![Start Date]) strMyDate = Format(dtMyDate, "yyyymmdd") strSQL = "procCustomerSalesandPayments '" & s...