请问: 如何从一个HDC中得到其中的Region句柄或者RegionData? 我知道有个API: GetClipRgn,可它只能得到SelectClipRgn进取的Rgn数据,
不能得到系统创建的Region数据。
我找遍了API,就是不知道有什么办法,
各位GDI高手请帮忙出手,这是苦恼我N久的问题,本来想不麻烦大家自己看书找找,可就是找不到,我怀疑是不是GDI根本没有提供解决之道。
不能得到系统创建的Region数据。
我找遍了API,就是不知道有什么办法,
各位GDI高手请帮忙出手,这是苦恼我N久的问题,本来想不麻烦大家自己看书找找,可就是找不到,我怀疑是不是GDI根本没有提供解决之道。
HWND hWnd, // handle of window with changed update region
HRGN hRgn, // handle of region to add
BOOL bErase // erase-background flag
);其中hRgn的解释就是Handle of region to add,如果我没搞错的话,handle在这里应该
翻译成句柄吧?
The GetClipRgn function retrieves a handle identifying the current application-defined clipping region for the specified device context. int GetClipRgn( HDC hdc, // handle of device context
HRGN hrgn // handle of region
);
ParametershdcIdentifies the device context. hrgnIdentifies an existing region before the function is called. After the function returns, this parameter identifies a copy of the current clipping region. Return ValuesIf the function succeeds and there is no clipping region for the given device context, the return value is zero. If the function succeeds and there is a clipping region for the given device context, the return value is 1. If an error occurs, the return value is - 1. ResAn application-defined clipping region is a clipping region identified by the SelectClipRgn function. It is not a clipping region created when the application calls the BeginPaint function.
If the function succeeds, the hrgn parameter identifies a copy of the current clipping region. Subsequent changes to this copy will not affect the current clipping region. See AlsoBeginPaint, SelectClipRgn