what is the use of CWinApp class?
Submitted by: AdministratorCWinApp is an application object provides member functions
for initializing your application (and each instance of it)
and for running the application.
Each application that uses the Microsoft Foundation classes
can only contain one object derived from CWinApp. This
object is constructed when other C++ global objects are
constructed and is already available when Windows calls the
WinMain function, which is supplied by the Microsoft
Foundation Class Library. Declare your derived CWinApp
object at the global level.
When you derive an application class from CWinApp, override
the InitInstance member function to create your
application's main window object.
In addition to the CWinApp member functions, the Microsoft
Foundation Class Library provides the following global
functions to access your CWinApp object and other global
information:
► AfxGetApp Obtains a pointer to the CWinApp object.
► AfxGetInstanceHandle Obtains a handle to the current
application instance.
► AfxGetResourceHandle Obtains a handle to the
application's resources.
► AfxGetAppName Obtains a pointer to a string containing
the application's name. Alternately, if you have a pointer
to the CWinApp object, use m_pszExeName to get the
application's name.
Submitted by: Administrator
for initializing your application (and each instance of it)
and for running the application.
Each application that uses the Microsoft Foundation classes
can only contain one object derived from CWinApp. This
object is constructed when other C++ global objects are
constructed and is already available when Windows calls the
WinMain function, which is supplied by the Microsoft
Foundation Class Library. Declare your derived CWinApp
object at the global level.
When you derive an application class from CWinApp, override
the InitInstance member function to create your
application's main window object.
In addition to the CWinApp member functions, the Microsoft
Foundation Class Library provides the following global
functions to access your CWinApp object and other global
information:
► AfxGetApp Obtains a pointer to the CWinApp object.
► AfxGetInstanceHandle Obtains a handle to the current
application instance.
► AfxGetResourceHandle Obtains a handle to the
application's resources.
► AfxGetAppName Obtains a pointer to a string containing
the application's name. Alternately, if you have a pointer
to the CWinApp object, use m_pszExeName to get the
application's name.
Submitted by: Administrator
Read Online Microsoft Foundation Class (MFC) Job Interview Questions And Answers
Top Microsoft Foundation Class (MFC) Questions
☺ | If application hangs while SendMessage is waiting for the result, how you handle it? |
☺ | What is the flow of SDI application? |
☺ | Whats is DDX & DDV in MFC? |
☺ | What is model and modeless dialog box? Give some examples? |
☺ | General purpose classes in MFC? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |