Monday, April 1, 2013

visual c++(mfc) program for displaying user defined window

visual c++(mfc) program for displaying user defined window

#include<afxwin.h>
class myframe:public CFrameWnd
{
public:
myframe()
{
    CString my;
    HBRUSH hb;
    hb=(HBRUSH)::CreateSolidBrush(RGB(125,0,255));
    my=AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW),
        AfxGetApp()->LoadStandardCursor(IDC_CROSS),
        hb,AfxGetApp()->LoadStandardIcon(IDI_QUESTION);
Create(my,"my window");
}
};
class myapp:public CWinApp
{
public:
virtual BOOL InitInstance()
{
m_pMainWnd=new myframe();
m_pMainWnd->ShowWindow(1);
m_pMainWnd->UpdateWindow();
return TRUE;
}
};
myapp app;


History of visual c++ language

As the Microsoft Windows and the benefits of the graphical user interface (GUI) became widely accepted, the programming for Windows became in high demand. Programming for Windows is different from old-style batch or transaction-oriented programming. An essential difference between them is that a Windows program processes user input via messages from the operating system, while an MS-DOS program calls the operating system to get user input.
Visual C++ is a textual language which uses a graphical user interface builder to make programming decent interfaces easier on the programmer. 


 

Significant Language Features of visual c++

C++ is one of the components of Visual C++. However, its compiler can process both C source code and C++ source code. Further more, the version 4.0 compiles Fortran code as well.
Visual C++ also includes a large and elaborate collection of software development tools, all used through a windowed interface.
The 
Microsoft Visual C++  includes the tools listed below.
  • Microsoft Foundation Classes (MFC)
    A large and extensive C++ class hierarchy library that make the Windows application development easier.
  • App Wizard
    A code generator that creates a working skeleton of a Windows application with features, class names, and source code file names. It gets a programmer started quickly with a new application.
  • Class Wizard
    A program which generates code for a new class or a new function. It writes the prototypes, function bodies, and code to connect the messages to the application framework.
  • App Studio
    A resource editor which includes wysiwyg menu editor and a powerful dialog box editor.

No comments:

Post a Comment