In case that some of the buttons' captions (or other resources)of a dialog application have been changed - is it possible at runtime to set all the resources to their original names/values? I tried with AfxSetResourceHandle(), but nothing happened. So (for now) I chose to restart the application in order to load the original values. It's an awkward decision, but it's the only one for now.
Yes, I know that, but it's not a value - there are many values - it's about changing the language of the application, but I don't want to write "an English" file if I have the opportunity to load the orinal resource.
Take a look at SetThreadLocale and the use of resource files and LoadString() and such. Create some initialization function for your dialogs. This way you won't need to restart, just reload all resource strings.
a quite cheesey way of doing this would be to get the location of the current .exe, store any settings you want to re-use, then re-launch the exe, then quit the app.
bit of a hack but may work.
Skute
"There are 10 types of people in this World, those that understand binary, and those that don't!"
Have you had a look at your "OnInitDialog" function. Obviously, this is where the Dialogue gets it's initialisation values before even starting to draw the first dialogue window (refer to MSDN for more info). It should then be possible to add a 'reset' function/button that just calls OnInitDialog function as you would any other. Any additional function you call to setup your dialogue should be called from here when the app starts anyway. If your not doing that, it might be worth moving them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.