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"
#Include "GDIPlus_Simple.inc"
%IDC_Button = 500
Global hDlg as Dword
Function PBMain() As Long
'initialize GDIPlus
Local token As Dword, StartupInput As GdiplusStartupInput
StartupInput.GdiplusVersion = 1
GdiplusStartup(token, StartupInput, ByVal %NULL)
'normal app stuff
Dialog New Pixels, 0, "Test Code",300,300,200,200, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, %IDC_Button,"Push", 50,10,100,20
Dialog Show Modal hDlg Call DlgProc
'shut downn GDIPlus
GdiplusShutdown token ' Shutdown GDI+
End Function
CallBack Function DlgProc() As Long
Dim iStart As Long, iEnd As Long, Result As String
Select Case Cb.Msg
Case %WM_InitDialog
Case %WM_Command
Select Case Cb.Ctl
Case %IDC_Button
End Select
Case %WM_Destroy
End Select
End Function
'gbs_01013
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm