Home > database >  Pb with FRAMERGN draw a border
Pb with FRAMERGN draw a border

Time:09-27

Declare functions are as follows:
The FUNCTION ulong GetDC (ulong HWND) LIBRARY "user32. DLL
"The FUNCTION ulong DeleteDC (ulong HDC) LIBRARY "gdi32. DLL
"Ulong FUNCTION ulong CreateRectRgn (ulong X1, Y1, ulong X2, ulong Y2) LIBRARY "gdi32. DLL
"Ulong FUNCTION ulong CreateRoundRectRgn (ulong X1, Y1, ulong X2, ulong Y2, ulong X3, ulong Y3) LIBRARY "gdi32. DLL
"The FUNCTION ulong SetWindowRgn (ulong hWnd, ulong hRgn, Boolean bRedraw) LIBRARY "user32. DLL
"The FUNCTION ulong CombineRgn (ulong hDestRgn, ulong hSrcRgn1, ulong hSrcRgn2, ulong nCombineMode) LIBRARY "gdi32. DLL
"The FUNCTION ulong CreatePolygonRgn (ref st_Point lpPoint [], ulong nCount, ulong nPolyFillMode) LIBRARY "gdi32. DLL
"Ulong FUNCTION ulong CreateEllipticRgn (ulong X1, Y1, ulong X2, ulong Y2) LIBRARY "gdi32. DLL
"The FUNCTION ulong FrameRgn (ulong HDC, ulong hRgn, ulong hBrush, ulong nWidth, ulong nHeight) LIBRARY "gdi32. DLL
"The Function ulong CreateSolidBrush (ulong crColor) LIBRARY "gdi32. DLL
"The function of Integer ReleaseDC (long HWND, long HDC) library "user32
"
The function long DeleteObject (long hobject) library "gdi32
"The FUNCTION ulong GetWindowRgn (ulong hWnd, ulong hRgn) LIBRARY "user32. DLL
"



With PB opened a window in the window OPEN event:

Constant integer CORNER=16
Long HWND, HDC, ll_FullRgn ll_PointRgn, w, h
St_point shapev []
Long hbrush
////variable initialization
HWND=Handle (this)
HDC=GetDC (HWND)

W=UnitsToPixels (enclosing Width, XUnitsToPixels!)
H=UnitsToPixels (enclosing Height, YUnitsToPixels!)



Ll_fullrgn=CreateRectRgn (0, 0, 100100)//build rectangular clipping area,





HBrush=CreateSolidBrush (16479614)
FrameRgn (HDC, ll_FullRgn, hBrush, 3, 3)//here, with the function of drawing frame, but the window opens, still no border, somehow
SetWindowRgn (HWND ll_FullRgn, FALSE)


DeleteObject (ll_FullRgn)
ReleaseDC (HWND, HDC)

CodePudding user response:

The incident is wrong, paint event in picture
  • Related