I have implemented a splash screen and was wondering if it's possible
somehow to set one of the colours as transparent ?
So that only the "real" picture would be shown and the white colour frame
around the (non-rectangle) logo would be invisible ?
I understand that I need to define a region that will not be painted by the OS and that I have to provide that handle like so:
HRGN PolygonHandle =// code to be written
int res = SetWindowRgn(
Handle, // handle to window whose window region is to be set
PolygonHandle, // handle to region
true // window redraw flag
I have experimented with simple ellipses (successfully), e.g CreateEllipticRgn()
But now I need to define the region that is my own logo
I'm open for all suggestions. E.g. if I can make a POINT array during design time (somehow) I can use CreatePolygonRgn() for instance ?
I also tried BitmapToRegion() during design time.
This function simply lifted from this example project:
But no joy as CreateDIBSection() returns NULL all the time and GetLastError() returns 87 ?
so ... I'm stuck ...