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"
%IDC_ButtonA = 500
%IDC_ButtonB = 500
%IDC_ButtonC = 500
Global hDlgA,hDlgB,hDlgC As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Test Code",300,300,200,200, %WS_OverlappedWindow To hDlgA
Control Add Button, hDlgA, %IDC_ButtonA, "Push", 10,10,50,20
Dialog Show Modal hDlgA Call DlgProcA
End Function
CallBack Function DlgProcA() As Long
If Cb.Msg = %WM_Command And Cb.Ctl = %IDC_ButtonA Then DisplayDialogB
End Function
Sub DisplayDialogB()
Dialog New Pixels, hDlgA, "DialogB", 100, 100, 280, 175, %WS_OverlappedWindow To hDlgB
Control Add Button, hDlgB, %IDC_ButtonB, "Push", 10,10,50,20
Dialog Show Modal hDlgB Call DlgProcB()
End Sub
CallBack Function DlgProcB() As Long
If Cb.Msg = %WM_Command And Cb.Ctl = %IDC_ButtonB Then DisplayDialogC
End Function
Sub DisplayDialogC()
Dialog New Pixels, hDlgB, "DialogC", 100, 100, 280, 175, %WS_OverlappedWindow To hDlgC
Control Add Button, hDlgC, %IDC_ButtonC, "Push", 10,10,50,20
Dialog Show Modal hDlgC Call DlgProcC()
End Sub
CallBack Function DlgProcC() As Long
If Cb.Msg = %WM_Command And Cb.Ctl = %IDC_ButtonC Then ? "Dialog C"
End Function
'gbs_00717
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm