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"
Function PBMain() As Long
Local hDlg As Dword
Dialog New Pixels, 0, "Test Code",300,300,200,200, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, 100, "Hover", 50,10,100,20
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Static hCursor As Dword
Select Case Cb.Msg
Case %WM_InitDialog
hCursor = LoadCursorFromFile(Exe.Path$ + "hand.cur")
Case %WM_SetCursor
If Cb.WParam = GetDlgItem(Cb.Hndl, 100) Then
MousePtr hCursor : Function = 1
End If
End Select
End Function
'gbs_01060
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm