1.Copy the green highlighted code into your MapBasic x32 source code.
2.Give an Addin_Name
3.Delete your old menu and buttonpad commands
declare sub Main
declare sub mShow
declare sub mTheme
Declare Sub EndHandler
Declare Method New_RibbonSDK Class "GeoAS.RibbonSDK.Addin" Lib "GeoAS.RibbonSDK.dll" Alias Ctor_CreateInstance() as This
Declare Method Initialize Class "GeoAS.RibbonSDK.Addin" Lib "GeoAS.RibbonSDK.dll" Alias Initialize(ByVal p1 as This, ByVal p2 as refptr, ByVal p3 as String)
Declare Method Unload Class "GeoAS.RibbonSDK.Addin" Lib "GeoAS.RibbonSDK.dll" Alias Unload(ByVal p1 as This)
Declare Function AddIn_Name() As String
Global myAddIn as This
'******************************
Sub EndHandler
call Unload(myAddIn)
End Sub
'******************************
Function AddIn_Name() As String
AddIn_Name = "MyApp"
End Function
'********************************
sub Main
'Create Menu "MyApp" as
' "Show" calling mShow,
' "Theme" calling mTheme
'Alter Menu bar add "MyApp"
myAddIn = New_RibbonSDK()
call Initialize(myAddIn, SYSTEMINFO(SYS_INFO_IMAPINFOAPPLICATION), ApplicationName$() )
end sub
'********************************
sub mShow
note "Show"
end sub
'********************************
sub mTheme
note "Theme"
end sub
'********************************