If you want to provide a window to an application it is imperative to
create a thread which can be done using CWinThread. A public member
variable is used with CWinThread is m_pMainWnd. The main advantage which
you can get when using this thread, it terminates the application
without any hassles.