Microsoft Visual C++ MFC. Win95 WinNT




- 3


CMFMessageWindow::CMFMessageWindow()

{

// ,

// CMFMessageWindow

Create(NULL, "Hello MFC", WS_OVERLAPPEDWINDOW,

rectDefault, NULL, MAKEINTRESOURCE(IDR_MENU));

}

, Test, , , . IDR_MENU. .

Test

In Frame Class

ID_TEST_INFRAMECLASS

In App Class

ID_TEST_INAPPCLASS

In Both Class

ID_TEST_INBOTHCLASS

Exit

ID_APP_EXIT

2.11 MFMessage.rc, . , MFMenu .

2.11. MFMessage.rc

//////////////////////////////////////////////////////////////

//

//

IDR_MENU MENU DISCARDABLE

BEGIN

POPUP "Test"

BEGIN

MENUITEM "In Frame Class", ID_TEST_INFRAMECLASS

MENUITEM "In App Class", ID_TEST_INAPPCLASS

MENUITEM "In Both Class", ID_TEST_INBOTHCLASS

MENUITEM "Exit", ID_APP_EXIT

END

END

, , resource.h, 2.12. . - - MFMessage.cpp.

2.12. resource.h

//{{NO_DEPENDENCIES}}

// , Microsoft Developer Studio

// MFMessage.rc

//

#define IDR_MENU 101

#define ID_TEST_BEEP 40001

#define ID_TEST_EXIT 40002

#define ID_TEST_INAPPCLASS 40003