DWORD GetWindowExt(hdc) | |||||
HDC hdc; | /* handle of device context | */ |
The GetWindowExt function retrieves the x- and y-extents of the window associated with the given device context.
hdc
Identifies the device context.
The return value specifies the x- and y-extents, in logical units, if the function is successful. The x-extent is in the low-order word; the y-extent is in the high-order word.
The following example uses the GetWindowExt function and the LOWORD and HIWORD macros to retrieve the x- and y-extents of a window:
HDC hdc;
DWORD dw;
int xWindExt, yWindExt;
hdc = GetDC(hwnd);
dw = GetWindowExt(hdc);
ReleaseDC(hwnd, hdc);
xWindExt = LOWORD(dw);
yWindExt = HIWORD(dw);