Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pixel Num of a Window 1

Status
Not open for further replies.

Warrioruw

Programmer
Jan 30, 2004
24
CA
Hi all, I want to count the num of pixels in a client area, and I use getClientRect. My question is:

Will (getClientRect.right)* (getClientRect.bottom) be the num of pixels in a client area?

Thanks.
 
in most cases yes, but it could deppend on how client coordinates are organized.

Ion Filipski
1c.bmp
 
if possible, give an example to illustrate the exception when coordinates are organized differently from the most cases.
 
I believe at the first you should learn what is window organization. Look at the function SetWindowOrg.
If window organization is ohter than the screen organization then you should convert the (0, 0) and (right, bottom) points from window client coordinates to screen coordinates by using ClientToScreen and then calculate the number of pixels.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top