C
|
C++
|
Objective-C
|
VC++
|
Win32
|
MFC
|
Java
|
Php
|
Delphi
|
Visual Basic
|
.Net
|
Networking
|
General
|
Games
|
Jobs
|
Javascript
|
Menu
Project Upload
Project Download
Articles
Programs
Search
Solution
pickSourcecode.com
Login
Register
About us
Contact us
VCpp
>
Programs
VC++ - Simple program creates window , Hello world program
// Header file 1
// myapp.h
class myapp : public CWinApp
{
public :
BOOL InitInstance( ) ;
} ;
// Header file 2
// myframe.h
class myframe : public CFrameWnd
{
public :
myframe( ) ;
void
OnPaint( ) ;
DECLARE_MESSAGE_MAP( )
} ;
// Give a name as " myapp.cpp "
#include <afxwin.h>
#include "myframe.h"
#include "myapp.h"
myapp a ;
BOOL myapp::InitInstance( )
{
myframe *p ;
p = new myframe ;
m_pMainWnd = p ;
p -> ShowWindow ( SW_SHOWNORMAL ) ;
return TRUE ;
}
// Give a name as "myframe.cpp "
#include <afxwin.h>
#include "myframe.h"
BEGIN_MESSAGE_MAP ( myframe, CFrameWnd )
ON_WM_PAINT( )
END_MESSAGE_MAP( )
myframe::myframe( )
{
Create ( 0, "Draw" ) ;
}
void
myframe::OnPaint( )
{
CPaintDC d ( this ) ;
d.TextOut ( 50, 50, "Hello", 5 ) ;
}
// Output
Privacy Policy
|
About Us