>>>> But I am not sure if these variables will woring as global or reserve its values during the cycle of the system.

Surely they will. The application class will be instantiated directly from main function and is a singleton. When you close the dialog the control will go back to YourApp::InitInstance which will return FALSE such exiting the program. But in any phase of teh program theApp.m_YourVariable will be available.