Good afternoon everybody!
I'm currently trying to maintain and update a pretty old project of mine developed under AmigaOS 3.1 (or 3.5 by H&P I don't recall precisely) using Storm Wizard library and now ported on AmigaOS 4.1 FE Update 3.
The interface of my application has been completely designed using StormEditor v2.3 to generate the .wizard file and then using standard Intuition/Wizard function to interact with it.
I have a particular button (of kind IMAGEBUTTON) on the button bar that is meant to display a little flag corresponding to the currently selected language and it should be updated when the user changes the language to use.
My .wizard file has all the images defined but I'm currently struggling trying to understand how to update the image displayed by the button.
I understood that the method
WIMAGEBUTTONA_Image
can only be used at creation time so after doing:
data = WZ_GetDataAddress(surface, WDATA_IMAGE, lang_id);
I'm stuck with that WizardNewImage pointer and I cannot go beyond that.
I've found that Wizard has a function
WZ_CreateImageBitMap()
to convert a WizardNewImage into a BitMap but nevertheless how can I use that BitMap to update the image displayed by my IMAGEBUTTON button?

Without knowing how wizard_lib works, can you ADD/REMOVE gadgets when GUI is already "open"?
Can you use IDoMethod()?
If yes, then look into OM_REMMEMBER/OM_ADDMEMBER.
IDoMethod(yafd->ConnectGroup, OM_REMMEMBER, yafd->ConnectBtn);
yafd->ConnectBtn = CreateNewButton(.....);
IDoMethod(yafd->ConnectGroup, OM_ADDMEMBER, yafd->ConnectBtn);
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonRX550/SSD240GB/DVDRW :-P
I don't know, when was initially released it seemed a huge jump ahead in design UI, you could focus on the visual layout forgetting all the code and the pixels required. Once the UI was created you just needed to call a couple of Wizard libraries function and then normally use Intuition function (eg. SetGadgetAttrs or SetWindowTitles).
However I don't think you could remove or add UI elements at runtime, but I'm not sure