I am working in progame's SKIN,use MASM.
I include some little picture in resource,
and use BitBlt,StretchBlt to Paint to Windows Edage....
But When I am want to try CreatePolygonRgn to create windows shape,
I found that only little Info in Win32 SDK Reference Help:

The CreatePolygonRgn function creates a polygonal region.

HRGN CreatePolygonRgn(

CONST POINT *lppt, // pointer to array of points
int cPoints, // number of points in array
int fnPolyFillMode // polygon-filling mode

Points to an array of POINT structures that define the vertices of the polygon. The polygon is presumed closed. Each vertex can be specified only oncea.

the Problem were,How to create a pointer to array of points?
I write Like

Point1 Point<0,0>
Point2 Point<0,378>

but the compitler tell me syntax error.
Times later, I googled back some RGN format,
When I try to define a RGN directly:

hRGN db 020h,0h,0h,0h,01h,0h,0h,0h,02h,0h,0h,0h,020h,0h,0h,0h,0h,0h,0h,0h,0h,0h,0h,0h,07Ch,01h,0h,0h,02Bh,01h,0h,0h,0h,0h,0h,0h,0h,0h,0h,0h,07Bh,01h,0h,0h,02h,0h,0h,0h,0h,0h,0h,0h,02h,0h,0h,0h,07Ch,01h,0h,0h,02Bh,01h,0h,0h

in one line,The Compliter Tells me code is to complex....

God bless me!
I place a RCDATA of RGNdata in resource,but when I use FindResource,LoadResoure,LockResource,
program exit direct without any Prompt.

I've no idea....
Why point array?
Posted on 2002-10-20 08:26:55 by Const.Ex

points LONG 0,0,378,0,378,2,379,2,379,299,2,299,2,298,0,298
invoke CreatePolygonRgn,addr points,8,ALTERNATE
invoke SetWindowRgn,hWin,eax,TRUE

Posted on 2002-10-20 08:32:45 by Const.Ex