I'm currently developing a GUI using the CAppDialog class in MQL4. My application has the capability to save and load its state, including all GUI controls, to and from a binary file. I use the Save method provided by CAppDialog for this.
The issue I'm facing is related to dynamic changes in the GUI layout. Specifically, if I add or remove controls from the GUI and then attempt to load a previously saved state, the application tries to load wrong data into the wrong controls, which eventually crashes the GUI.
I'm wondering if anyone has dealt with similar issues and what approaches you took to make your GUI robust against such dynamic changes. For example, have you used versioning, control identifiers, or other techniques to ensure that state loading is more resilient to layout changes?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello everyone,
I'm currently developing a GUI using the CAppDialog class in MQL4. My application has the capability to save and load its state, including all GUI controls, to and from a binary file. I use the Save method provided by CAppDialog for this.
The issue I'm facing is related to dynamic changes in the GUI layout. Specifically, if I add or remove controls from the GUI and then attempt to load a previously saved state, the application tries to load wrong data into the wrong controls, which eventually crashes the GUI.
I'm wondering if anyone has dealt with similar issues and what approaches you took to make your GUI robust against such dynamic changes. For example, have you used versioning, control identifiers, or other techniques to ensure that state loading is more resilient to layout changes?
Thank you in advance for your insights!