HOW MANY TWIPS PER PIXEL

I use an API GetWindowRect(HWND hwnd, RECT *rect).
I want to know in which units (pixel or twips) are rect->top, rect->left,
rect->bottom, rect->right when this API
is called and if there are in twips how can I do to convert this measure in pixels, I want to know if this API is the best to retrieve the dimensions of the bounding rectangle of the specified window and if not, which the best.
nadiamehrezAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PIGCommented:
GetWindowRect return all in pixels
And if You want to use twips
1 twips = 1/1440 inch
Yuo must use GetDeviceCapabilities
and get howmany pixels have for inch
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nadiamehrezAuthor Commented:
>>You must use GetDeviceCapabilities
what's GetDeviceCapabilities, I don't find it and WHY I MUST USE IT, CAN YOU EXPLAIN YOU ANSWER
0
nietodCommented:
Not GetDeviceCapabilites().  Use GetDeviceCaps().  You can use

GetDeviceCaps(LOGPIXELSX);
GetDeviceCaps(LOGPIXELSY);

to get the number of pixels per inch.  Then divide 1440 by these values to get the number of twips per pixel
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

nietodCommented:
Did you mean to accept pig's answer?
0
nadiamehrezAuthor Commented:
yes i accept
0
nietodCommented:
Well, they are your points....but itit seemed like you weren't happy with it, (not surprisingly!) that is why I added information.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.