How to add other widgets such as ComboBox to the Toolbar Control During arcgisengine development?
If you add a ComboBox to the ESRI Toolbar Control, you must implement the itoolcontrol interface in the Command class.
Return the handle of the specified control as itoolcontrol. hwnd.
Process description
Public class mycombobox: basecommand, itoolcontrol
{
Private int _ HANDLE = 0;
Private icompletionpolicy _ compnotify;
Public mycombobox (INT handle)
{
_ HANDLE = handle;
}
Public override void oncreate (Object hook)
{
// Todo: Add symboltype. oncreate implementation
}
# Region itoolcontrol Member
Public int hwnd
{
Get
{
// Todo: Add symboltype. hwnd getter implementation
Return _ HANDLE;
}
}
Public void onfocus (icompletionpolicy complete)
{
_ Compnotify = complete;
// Todo: Add symboltype. onfocus implementation
}
Public bool ondrop (ESRI. ArcGIS. systemui. esricmdbartype bartype)
{
// Todo: Add symboltype. ondrop to implement
If (bartype = esricmdbartype. esricmdbartypetoolbar)
{
Return true;
}
Else return false;
}
# Endregion
}