Date: 02-16-2022
Return to Index
'Compilable Example: (Jose Includes)
created by gbSnippets
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
Global hDlg as Dword
Function PBMain() As Long
Local style as Long
style = %WS_OVERLAPPED or %WS_CAPTION or %WS_SYSMENU or %WS_THICKFRAME or %WS_MINIMIZEBOX or %WS_MAXIMIZEBOX
Dialog New Pixels, 0, "Test Code",300,300,200,200, Style To hDlg
Control Add Button, hDlg, 100,"Push", 50,10,100,20
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Local style as Long
If CB.Msg = %WM_Command AND CB.Ctl = 100 AND CB.Ctlmsg = %BN_Clicked Then
style = %WS_OVERLAPPED or %WS_CAPTION or %WS_SYSMENU or %WS_THICKFRAME
SetWindowLong hDlg, %GWL_Style ,style
End If
End Function
'gbs_01085
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm