Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "win32api.inc"
Global hDlg,hRgn,hRgnA,hRgnB As Dword
Function PBMain () As Long
Dialog New Pixels, 0, " Un-Square Dialog",300,300,400,400, %WS_OverlappedWindow or %WS_ClipChildren To hDlg
hRgn = CreateEllipticRgn(0,0,0,0)
hRgnA = CreateEllipticRgn(0,0, 200,200)
hRgnB = CreateEllipticRgn(50,50, 150,150)
CombineRgn hRgn, hRgnA, hRgnB, %RGN_Xor
SetWindowRgn(hDlg, hrgn, %True)
Dialog Show Modal hDlg Call DlgProc
DeleteObject hRgn
DeleteObject hRgnA
DeleteObject hRgnB
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_LButtonDown
If Cb.WParam = %MK_LBUTTON Then SendMessage hDlg, %WM_NCLButtonDown, %HTCaption, ByVal %Null ' force drag
Case %WM_ContextMenu
Dialog End Cb.Hndl
End Select
End Function
'gbs_00889
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm