Jan 16, 2021, 01:00 AM

News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids


Practical Learning: Creating a Map of Messages

Started by sukishan, Jul 12, 2009, 10:54 PM

previous topic - next topic
Go Down

sukishan

Create a new and empty Win32 Project located in C:\Programs\MSVC Exercises and set its name to Messages1.
Specify that you want to use MFC in a Shared DLL.

Create a C++ file and name it Exercise.
To create a frame for the window, in the Exercise.cpp file, type the following:  Collapse Copy Code#include <AFXWIN.H>

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

protected:
   
    DECLARE_MESSAGE_MAP()
};

CMainFrame::CMainFrame()
{
    // Create the window's frame
Create(NULL,"WindowsApplication",WS_OVERLAPPEDWINDOW,
                       CRect(120, 100, 700, 480), NULL);
}

class CExerciseApp: public CWinApp
{
public:
    BOOL InitInstance();
};

BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)

END_MESSAGE_MAP()

BOOL CExerciseApp::InitInstance()
{
    m_pMainWnd = new CMainFrame ;
    m_pMainWnd->ShowWindow(SW_SHOW);
    m_pMainWnd->UpdateWindow();

    return TRUE;
}

CExerciseApp theApp;Test the application and return to MSVC.
A good beginning makes a good ending

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:
Verification:
Please leave this box empty:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
IT Acumens Web Designing Chennai | GinGly :: Build your Personal Website | CineBuzz :: Cinema News | My Kids Diary :: Kids Memories Writing :: Book Website @ 349 Rs monthly
Copyright 2005 - 2020 :: IT Acumens :: All Rights Reserved. :: Sitemap
ITAcumens Discussion Forum with 2 lakhs post running for 15 years - Powered by IT Acumens Dedicated Server