c++ - How to automatically close my GUI application from within? -
Let me explain your question with an example. In my app, I have to provide a way to stop myself from within "myself". (An example of such a task is when my app's installer / updater needs to close it before installing an update. Another example is that when my app performs the schedule and after completing it automatically
I think that this window will be completed in the simplest position to post your message to My app can display an arbitrary number of child dialog window. My app may be displaying a normal control window, such as open file dialog: Or this one, but there may be others: < P> There is no answer, it depends on the architecture of your app and what it is doing. I do not quite understand why you want to force your application to shut down while It is in a common dialogue, but if you do, then exit () is safe, in that case the process is actually shut down from the perspective of the operating system, which is in opposition to forced termination (Terminaprops) in TerminateProcess OS The objects (DLL, global data and such) may leave in an inconsistent state, and exit () will become cleaner in that respect. Generally though I'm avoiding that visible UI, the user has just vanished and instead of turning off windows in response to some users' choice. But, exit () will work. WM_CLOSE , but there are some such cases which That its L will not work:
Comments
Post a Comment