Hi

I'm trying to create a polygon window using SetWindowRgn().
But a problem is, I can't use CreatePolygonRgn(). They say at windows CE,
they only support CreateRectRgn().
So I tried to create lots of rectangle region, and combine it with
CombineRgn function.
It works, but the speed is too slow.

Here's the code I tried:

HRGN newRgn = NULL;
if(!m_hRgn)
m_hRgn = CreateRectRgn(rt.left, rt.top, rt.right, rt.bottom);
else
{
newRgn = CreateRectRgn(rt.left, rt.top, rt.right, rt.bottom);
CombineRgn(m_hRgn, m_hRgn, newRgn, RGN_XOR);
}

int i;
int j = 1;
for(i=0;i<25;i++)
{
rt.left-=j;
rt.right+=j;
rt.top+=j;
rt.bottom+=j;
newRgn = CreateRectRgn(rt.left, rt.top, rt.right, rt.bottom);
CombineRgn(m_hRgn, m_hRgn, newRgn, RGN_XOR);
}
SetWindowRgn(m_hWnd, m_hRgn, TRUE);

Is there any way I can create some polygon region?
I found ExtCreateRegion(), but I can't figure out how to use this function
in MSDN.
Is there any good sample source about usage of this function?

Please advice.
Thank you in advance.