Вопрос

I have one window which is painted with some colorkey(16,0,16). Occasionally some part of window is getting painted by different colorkey. I would like to create a region out of this windows which has only my colorkey(16,0,16).

Please advice what is the best way to achieve this.

Any help will be greatly appreciated!!!!

Это было полезно?

Решение

If by region you mean an HRGN, then you can render the window to an in-memory bitmap and create an array of RGNDATA elements describing the rectangles where your colored pixels still exist, then pass that array to ExtCreateRegion() to create the HRGN.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top