Application

Mpiangu 0 Tallied Votes 154 Views Share

This code will create for you an application. we are goig to use visual c++ for it
open visual, c++.
click file then New.
in the New dialogue box click projects.
click win32 application.
give it a name eg my_project.
and click finish.

Then again click file.
click files.
the C++ source.
give it a name eg CMyApp.
click ok.
specify that it is an empty application.
finish.

#include <afxwin.h>

class CMyApp : public CWinApp
{
public:
	virtual BOOL InitInstance();
};

class CMainFrame : public CFrameWnd
{
public:
	CMainFrame();
};

CMainFrame::CMainFrame()
{
	Create(NULL, "my application");
}

BOOL CMyApp::InitInstance()
{
	m_pMainWnd = new CMainFrame;
	m_pMainWnd->ShowWindow(SW_NORMAL);

	return TRUE;
}

 CMyApp theApp;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.