• Welcome to Theos PowerBasic Museum 2017.

Undocumented flag for "GetDCEx"

Started by Theo Gottwald, October 06, 2011, 03:56:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald

GetDCEx can be used to retrieve the device context for a window during processing of %WM_NCPAINT.
The documentation states that this is achieved by using

GetDCEx(hwnd, hrgn, %DCX_WINDOW | %DCX_INTERSECTRGN)


However, this call never works, because there is an undocumented flag to include which is not mentioned anywhere.

And this is how it works:

GetDCEx(hwnd, hrgn, DCX_WINDOW | DCX_INTERSECTRGN | 0x10000)

Source: Catch22.net