Is there a specific function or method I can use to swap or remove a dialog icon during runtime? I see where I can revise text with
ACAPI_Interface (APIIo_SetMenuItemTextID, &itemRef, nullptr, itemStr);
but have not found something similar for icon images.
I'm defining the icon by the typical means in the .grc file and loading the default image by typical means in the Fix.grc file. Graphics on my dialog are permanent this way.
I would like to activate this feature with ::ButtonClicked from my dialog class. I am monitoring the button click event by typical means:
void JHP_UL_Dialog::ButtonClicked(const DG::ButtonClickEvent& ev)
{
if (ev.GetSource() == &00Button)
{
// press button to make choice/swap out different image in dialog
// wait for other dialog selections then press 'OK' to do stuff
}
if (ev.GetSource() == &01Button)
{
// press button to make choice/swap out different image in dialog
// wait for other dialog selections then press 'OK' to do stuff
}
}
thanks - chris
Chris Gilmer
Intel i9-12950HX CPU @ 2.30GHz, 16 cores
NVIDIA GeForce RTX 3080
48.0 GB RAM
Windows 10 Pro 64-bit