DC absolute position
-
Device contexts don't really have a position on the screen. They are used to represent a drawable surface-- be it for a printer, a window, or what-have-you. A window on the screen is painted from the contents (of a bitmap) to which the dc is representative. This painting occurs where the window is located irregardless of anything about the dc. i.e. the position is a property of the window and not its dc. To get the position of a window on screen, just use GetWindowRect.
-
Depends on what DC you want I guess. 1) CClientDC 2) CWindowDC Then i'm guessing you could call
GetClientRect()
andGetWindowRect()
and convert the logical points to device points usingLPtoDP()
which would give you the absolute position of the requested DC in pixels (i think). Cheers! :) "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr