Ulrich Czekalla ulrich.czekalla@utoronto.ca writes:
- if (ctx && (hwnd = WindowFromDC(ctx->hdc)) != 0)
- {
roothwnd = GetAncestor(hwnd, GA_ROOT);
if (roothwnd != hwnd)
{
GetClientRect(roothwnd, &rootrc);
rheight = rootrc.bottom - rootrc.top;
GetWindowRect(hwnd, &rc);
width = rc.right - rc.left;
height = rc.bottom - rc.top;
Now that you can get access to the physDev, you should use this to retrieve the position and size instead of using the window rectangles, it will be more correct. For instance physDev->org gives you the origin relative to the drawable, and you can get the clip rectangle from physDev->region.