cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Dialog: swap/remove icon during runtime

MudratDetector
Booster

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 i7-7700K CPU @ 4.20GHz
NVIDIA Quadro M4000
32.0 GB RAM
Windows 10 Pro 64-bit
0 REPLIES 0

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!