Monday, 4 March 2013

Activity 1: Creating a welcome screen and adding a menu item


Activity 1: Creating a welcome screen and adding a menu item
·  Open Visual C++
·  Click New in the File menu, select the MFC AppWizard (exe) entry under the projects tab
in the New dialog box.
·  Give the new program the name your initialsWelcome in the Project name box, choose
a location and click OK to start the MFC AppWizard.
·  In Step 1, select Single document. Then accept the defaults for all the other steps.
·  Use the FileView tab in the Workspace window to look for the files belonging to each of
the four objects described above.
·  Start by declaring two string variables welcome_string and enjoy_string in the
document’s header file. Open xxWelcomeDoc.h by double clicking in the Workspace
view, find this section of the code and add the two lines in bold font.


// xxWelcomeDoc.h : interface of the xxWelcomeDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if
!defined(AFX_xxWELCOMEDOC_H__9442116A_C7A7_11D3_BBC0_0000E883F891__INCLUDED_)
#define AFX_xxWELCOMEDOC_H__9442116A_C7A7_11D3_BBC0_0000E883F891__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class xxWelcomeDoc : public CDocument
{
protected: // create from serialization only
xxWelcomeDoc();
DECLARE_DYNCREATE(xxWelcomeDoc)
CString welcome_string;
CString enjoy_string;

No comments:

Post a Comment