Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Compiler PBWin 10
#Dim All
#Include "win32api.inc"
#Resource Bitmap test, "cowgirl.bmp"
Function PBMain () As Long
Local hDlg As Dword
Dialog New Pixels, %HWND_Desktop, "Flat Image Button", , , 300, 200, %WS_Popup Or %WS_SysMenu Or %WS_Caption To hDlg
Dialog Set Color hDlg, -1, %rgb_Black
Control Add Image, hDlg, 101, "test", 10, 10, 70, 30
Dialog Show Modal hDlg, Call WndProc
End Function
CallBack Function WndProc
Select Case Long Cb.Msg
Case %WM_LButtonUp
Dialog Set Text Cb.Hndl, "up"
Control Set Loc Cb.Hndl, 101, 10,10
Case %WM_LButtonDown
Dialog Set Text Cb.Hndl, "down"
Control Set Loc Cb.Hndl, 101, 11,11
End Select
End Function
'gbs_01226
'Date: 05-11-2013
http://www.garybeene.com/sw/gbsnippets.htm