In Qt, when I use the QPixmap::grabWindow(hwnd,x,y,h,w) function, the coordinates are shifted slightly, when compared to the coordinates using the windows api functions GetCursorPos and GetWindowRect.
i.e. (0,0) from the point of view of GetCursorPos and GetWindowRect is at the very top left of the toolbar at the top of the window.
But (0,0) for QPixmap::grabWindow is more "inside" (i.e. ignoring the window frame).
How can I make these 2 coordinates consistent? Especially since the user might have different thicknesses for the window frame?