Hi,
thanks for reply. Now I get the new editing toolbar in 9.4. But when I add an custom label to the toolbar, ArcMap crashed with a cryptically error report. Before the crash is coming I get an error message, witch is thrown in the esri.arcgis.framework. This is the message:
�??An attempt was made to read protected memory or write. This is often an indication that other memory is corrupt.�?�
For a short moment, before ArcMap is crashing, I can see my own label. It�??s shown about the text of the editor.
Here is my code:
Try
Dim pDoc As ESRI.ArcGIS.Framework.IDocument
pDoc = ClassGlobalExt.App.Document
'Get all Commandbars
Dim pCmdBars As ESRI.ArcGIS.Framework.ICommandBars
pCmdBars = pDoc.CommandBars
'Get the Editor Toolbar
Dim pUID As New ESRI.ArcGIS.esriSystem.UID
pUID = New ESRI.ArcGIS.esriSystem.UID
'pUID.Value = "esriEditor.EditingToolbarNew"
pUID.Value = "{605F0528-1B64-4862-93B1-484A2C534EA3}"
Dim pCmdBar As ESRI.ArcGIS.Framework.ICommandBar
pCmdBar = pCmdBars.Find(pUID)
'Get my own Label
Dim pLblEditUID As New ESRI.ArcGIS.esriSystem.UID
pLblEditUID.Value = "{92d26706-91eb-43b4-9c8e-c0506745b9f5}"
Dim pItem As ICommandItem
'Find label on Editortoolbar
pItem = pCmdBar.Find(pLblEditUID)
If pItem Is Nothing Then
'Label not found, add
pItem = pCmdBar.Add(pLblEditUID) 'Here is ArcMap crashing
End If
pItem.Refresh()
Catch ex As Exception
DoErrorHandling(ex)
End Try
What�??s wrong? How can I add custom elements to the editor toolbar?
Here is the header of my own label:
Public Class clsLblEdit
Implements ESRI.ArcGIS.SystemUI.ICommand
Implements ESRI.ArcGIS.SystemUI.IToolControl
Implements ESRI.ArcGIS.Framework.ICommandItem
Private m_Label As New System.Windows.Forms.Label
Private m_pCompletionNotify As ICompletionNotify
It work�??s under 9.2 and 9.3 very fine, but not under 9.4, for the moment.
Best regards
Sascha Fricke