Click to See Complete Forum and Search --> : A question about SetWindowPos
dullboy
September 28th, 2006, 11:26 AM
Among seven parameters of Win32 API SetWindowPos, there is four parameters called x for left side of the window, y for top of the window, cx for width of the window and cy for height of the window. If you check with MSDN, you will find out the unit for x and y is client coordinate and the unit for cx and cy is pixel. What is the difference between client coordinate and pixel? Thanks for your inputs.
Krishnaa
September 28th, 2006, 11:37 AM
Client coordinates are values with respect to start (usualy LEFT-TOP) of the application window, cx & cy are length values in no. of pixels. I think client/screen coordinate are also values in no. of pixels.
dullboy
September 28th, 2006, 12:35 PM
Client coordinates are values with respect to start (usualy LEFT-TOP) of the application window, cx & cy are length values in no. of pixels. I think client/screen coordinate are also values in no. of pixels.
Do you know any Win32 API to calculate the size of a pixel? Could a pixel be very different from one monitor to another monitor? Thanks for your inputs.
Zaccheus
September 28th, 2006, 02:44 PM
They are both the same size.
What MSDN is saying is that x and y are relative to the client area of the parent window:
http://www.codemorphis.com/articles/tip1/window_client_area.jpg
:thumb:
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.