Code: Select all
#SBT_TOOLTIPS = $800
#SB_SETICON = #WM_USER + 15
LoadImage(0,#PB_Compiler_Home+"Examples\Sources\Data\CdPlayer.ico")
If OpenWindow(0, 0, 0, 400, 100, "", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
hSB=CreateStatusBar(0, WindowID(0))
SetWindowLongPtr_(hSB, #GWL_STYLE,GetWindowLongPtr_(hSB, #GWL_STYLE)|#SBT_TOOLTIPS)
AddStatusBarField(40)
AddStatusBarField(40)
StatusBarImage(0, 1, ImageID(0))
SendMessage_(hSB, #SB_SETTIPTEXT, 1, @"ToolTip")
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Code: Select all
#SBT_TOOLTIPS = $800
#SB_SETICON = #WM_USER + 15
LoadImage(0,#PB_Compiler_Home+"Examples\Sources\Data\CdPlayer.ico")
If OpenWindow(0, 0, 0, 400, 100, "", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
hSB=CreateWindowEx_(0,"msctls_statusbar32","",#WS_VISIBLE|#WS_CHILD|#SBT_TOOLTIPS, 0, 300, 100, 24, WindowID(0),0,0,0)
z.q=$008000000040
SendMessage_(hSB, #SB_SETPARTS, 2, @z)
SendMessage_(hSB, #SB_SETICON, 1, ImageID(0))
SendMessage_(hSB, #SB_SETTIPTEXT, 1, "ToolTip")
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf