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,hGW As Dword
Function PBMain () As Long
Graphic Window "Big Cursor", 200,200,600,600 To hGW
Graphic Attach hGW, 0
Graphic Clear %rgb_Blue
Graphic ReDraw
Dim P(4) As Point
Dialog New Pixels, 0, "Un-Square Dialog",300,300,400,400, %WS_Popup To hDlg
Dialog Set Color hDlg, %rgb_Yellow, %rgb_Yellow
P(0).x = 0 : P(0).y = 0
P(1).x = 115 : P(1).y = 40
P(2).x = 65 : P(2).y = 100
P(3).x = 0 : P(3).y = 0
hRgn = CreatePolygonRgn(P(0),4, %Alternate)
SetWindowRgn(hDlg, hrgn, %True)
Dialog Show Modal hDlg Call DlgProc
DeleteObject hRgn
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
Case %WM_LButtonDown
If Cb.WParam = %MK_LBUTTON Then SendMessage hDlg, %WM_NCLButtonDown, %HTCaption, ByVal %Null ' force drag
Case %WM_ContextMenu
Dialog End hDlg
End Select
End Function
'gbs_01192
'Date: 05-11-2013
http://www.garybeene.com/sw/gbsnippets.htm