i wonder that i found nothing about CreateEllipticRgn / CreateRectRgn
https://docs.microsoft.com/en-us/window ... llipticrgn
https://docs.microsoft.com/en-us/window ... aterectrgn
this is my Xbase++ Code to make a "Mask" for a Control
Code: Select all
FUNCTION API_SetRegion( oXbp, aRegion )
LOCAL nDLL,nDLL2, hRgn,hAdd, nX, hComb, nRet
IF EMPTY( aRegion )
RETURN NIL
Endif
nDLL := DLLLOAD( 'GDI32.DLL' )
If nDll <> 0
/* Create first region */
hRgn := DLLCALL( nDLL, DLL_STDCALL,"CreateRectRgn", aRegion[1,1],;
aRegion[1,2],;
aRegion[1,3],;
aRegion[1,4] )
FOR nX := 2 to Len( aRegion )
/*create all the other regions and combine them with the first*/
hAdd := DLLCALL( nDLL, DLL_STDCALL,"CreateRectRgn", aRegion[nX,1],;
aRegion[nX,2],;
aRegion[nX,3],;
aRegion[nX,4] )
nRet := DLLCALL( nDll, DLL_STDCALL, "CombineRgn", hRgn, hRgn, hAdd, RGN_OR )
/*discard this region (no longer needed) */
DLLCALL( nDll, DLL_STDCALL,"DeleteObject", hAdd )
NEXT
nDll2 := DLLLoad( 'USER32.DLL' )
/*call windows to create the region */
DLLCALL( nDll2, DLL_STDCALL, "SetWindowRgn", oXbp:GetHwnd(), hRgn, 1 )
DLLUNLOAD(nDll)
DLLUNLOAD( nDll2 )
ENDIF
RETURN NIL
this is where i fail as harbour / HMG Newbie
btw. how to create a Form
1.) without Titlebar
2.) no Frame
3.) "inside" Transparent
4.) place a Bitmap "inside"
need : Handle of Form for this