How do you create an icon on a dockable window's tab when it is docked in the map? My custom dockable windows have no place that indicates an icon property, yet on all of the ArcMap dockable windows like TOC, Attributes, Catalog and Toolbox have icons on the dockable window's tab when docked. I want my dockable window to look like the ones attached.
Any ideas?
Solved! Go to Solution.
I've not used it but I think the Interface you need to be using is IDockableWindowImageDef?
I've not used it but I think the Interface you need to be using is IDockableWindowImageDef?
Thanks, looks like IDockableWindowImageDef is correct, but I'm wondering how to return a Bitmap as an integer using that interface. Any ideas on why an integer type is used and what the integer refers to?
Finally got it working. I implemented IDockableWindowImageDef as Duncan Hornby recommended by coding the Bitmap property as follows:
public int Bitmap
{
get
{
int bitmap = 0;
try
{
IntPtr hBitmap = Properties.Resources.MyCustomImage.GetHbitmap();
bitmap = hBitmap.ToInt32();
}
catch { bitmap = 0; }
return bitmap;
}
}