now, the good idea is to add icons support

Code: Select all
OfficeMenuSetIcon ( MenuID , ItemID , IconID )
Code: Select all
Procedure InitOffice ( Window )
If OSVersion ( ) => #PB_OS_Windows_98 ; #PB_OS_Windows_XP
If Not GetProp_ ( WindowID ( Window ) , "OfficeMenuHook" )
SetProp_ ( WindowID ( Window ) , "WindowProc" , SetWindowLong_ ( WindowID ( Window ) , #GWL_WNDPROC , @OfficeWindowCallback ( ) ) )
SetProp_ ( WindowID ( Window ) , "OfficeMenuHook" , SetWindowsHookEx_ ( #WH_CALLWNDPROC , @OfficeHook ( ) , #Null , GetWindowThreadProcessId_ ( WindowID ( Window ) , #Null ) ) )
ProcedureReturn #True
EndIf
EndIf
ProcedureReturn #Null
EndProcedure
Code: Select all
Procedure InitOffice ( Window )
If OSVersion ( ) > #PB_OS_Windows_98
If Not GetProp_ ( WindowID ( Window ) , "OfficeMenuHook" )
SetProp_ ( WindowID ( Window ) , "WindowProc" , SetWindowLong_ ( WindowID ( Window ) , #GWL_WNDPROC , @OfficeWindowCallback ( ) ) )
SetProp_ ( WindowID ( Window ) , "OfficeMenuHook" , SetWindowsHookEx_ ( #WH_CALLWNDPROC , @OfficeHook ( ) , #Null , GetWindowThreadProcessId_ ( WindowID ( Window ) , #Null ) ) )
ProcedureReturn #True
EndIf
EndIf
ProcedureReturn #Null
EndProcedure
Forgot to remove thatABBKlaus wrote:@eesau : again no run on Win98![]()
Code: Select all
If OSVersion ( ) > #PB_OS_Windows_98