On 07/08/2018 at 01:02, xxxxxxxx wrote:
Hi,
well, yes, in theory you can register two different icons, I'll get back to this at the end, but it's actually way simpler.
The key is to set the BASEBITMAP_DATA_GUIPIXELRATIO correct (for a 64 by 64 icon it's 2.0) for the bitmap, then everything will work automatically with just one icon. Therefore you have several options:
// when using [AutoBitmap](https://developers.maxon.net/docs/Cinema4DCPPSDK/html/class_auto_bitmap.html), set it directly
BaseBitmap* bmp = AutoBitmap("myicon_64x64.tif", 2.0);
// Or when allocating a bitmap manually
BaseBitmap* bmp = BaseBitmap::Alloc();
if (bmp->Init(GeGetPluginResourcePath() + "myicon_64x64.tif") != IMAGERESULT_OK)
return false;
bmp->SetData(BASEBITMAP_DATA_GUIPIXELRATIO, 2.0);
But if you want to, you can also register as many icons of various sizes as you like, via RegisterIcon() (with ICONFLAG_2X).
Then you'd need to set the RESULT_CURSOR in the BaseContainer in GetCursorInfo() to the registered icon ID. Remember to use unique IDs to register icons.