In SolidWorks 2015 and 2016 (and maybe with earlier versions) it is possible to resize icons of the commands and feature manager pages icons via Customize/Icon size.
But API allows to define only one icon size for a newly created feature manager window. I use the following code for a new feature manager window creation:
if (_bmpHandler == null) _bmpHandler = new BitmapHandler();
var icon = _bmpHandler.CreateFileFromResourceBitmap(ResourcePrefix + "16_App_Piping.ico", Assembly.GetExecutingAssembly());
pipingFeature = (actDoc as ModelDoc2).ModelViewManager.CreateFeatureMgrWindowFromHandlex64(icon, PluginState.Piping.Container.Handle.ToInt64(), PipingCaption, (int)swFeatMgrPane_e.swFeatMgrPaneBottom);
pipingFeature = (actDoc as ModelDoc2).ModelViewManager.CreateFeatureMgrWindowFromHandle(icon, PluginState.Piping.Container.Handle.ToInt32(), PipingCaption, (int)swFeatMgrPane_e.swFeatMgrPaneBottom);
So with this code I create a feat. manager window with one icon size (usually 16x16). When user uses customization and select some bigger size of icon, two following things happens:
1. My own feature manager window icon disappears (window must be recreated to get icon back)
2. Ofter window recreation, the icon is smaller than other SW native icons (because it is 16x16 of course).
So I would like to ask:
1. How to handle that user changed size of icons via customization
2. How to define more sizes of the icon (I tried to use icon file with all possible sizes from 16x16 to 64x64, but no effect)
Retrieving data ...