Home / Tips / VC++ Tips / VC++: You must know that:

“Chishiki” is Japanese for “knowledge.” e-chishiki.com aims to bring software developers, information security professionals, IT executives and other IT pros a rich body of knowledge in the form of articles, interviews, tutorials and technical discussions. Our contributors are among the biggest names in the Indian IT industry and include noted authors, educators and practitioners.

VC++: You must know that:


You must know that:


m_pMainWnd is a public data member of CWinApp class which contains address of frame
window.

Function AfxGetApp( ) returns address of application object. So AfxGetApp( ) can be used
to call member functions of CWinApp class.

AfxGetMainWnd( ) function returns the address stored in m_pMainWnd i.e. address of
frame window.

Returning 0 from InitInstance( ) function will close down the application.

WS_VISIBLE style can be used in Create( ) function instead of calling ShowWindow( )
function.

MAKEINTRESOURCE is a macro declared in 'windows.h' file. It converts an integer to string.

Functions preceded by 'Afx' prefix are global function which can be called anywhere.

If changes are made in resources then during compilation only the resources get compiled and not the whole program.

Selecting 'Use MFC in static DLL' from Project | Settings will create a stand alone exe.

Comments

Log in or create a user account to comment.

On Sale From April 2008

Let Us C
8th Ed.
C programming classic & best seller. 1 million+ copies sold!

Y. Kanetkar

On Sale From April 2008

Introduction to Object Oriented Programming & C++

Y. Kanetkar

On Sale From Fall 2008

Microsoft .NET Framework: Web Application Security

Vijay Mukhi

On Sale From Nolvember 2008

Quest C++ Courseware
12+ hours of instructional audio and animated slides.

Y. Kanetkar Asang Dani

On Sale From November 2008

A Programmer's Guide to Web Application Security

Vijay Mukhi

Latest Forum Posts