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
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
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
Case %WM_Command
Select Case Cb.Ctl
Case %IDC_Button : GDIPlus_Tasks
End Select
Case %WM_Destroy
End Select
End Function
Sub GDIPlus_Tasks()
'initialize GDIPlus
Local token As Dword, StartupInput As GdiplusStartupInput
StartupInput.GdiplusVersion = 1
GdiplusStartup(token, StartupInput, ByVal %NULL)
'do stuff
'shut down GDIPlus
GdiplusShutdown token ' Shutdown GDI+
End Sub
'gbs_01014
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm