I’m using one 3rd party SDK which get hwnd (window handle) and paints something on my window. And i want to specify window painting region (left, right, top, bottom) ? How it’s possible to do it ? I’m found WINAPI function SetWindowRgn, but it’s not good for me because this function specify whole window region. I need specify just window painting area.
Share
If it’s possible to give this library an
HDCinstead of the window handle – you should do this.That is, get the drawing DC for your window’s client area (
GetDC), create the needed clipping region, and set it (SelectClipRgn).In case your library insists on accepting the window handle – I can propose the following solution:
Inside your window create another child window, set the appropriate region for it. And give the handle of that window to your library.