- menumodifier.zip
- MenuModifier
- Class
- Help
- Help.htm
- img
- addblank.gif
- pixels2.gif
- problem.gif
- result_change.gif
- sample3.gif
- Sample01_SDI_TrackPopupMenu
- Sample02_MDI_TrackPopupMenu
- Sample03_Dlg_TrackPopupMenu
- Sample04_Dlg_TrackPopupMenu_Color
|
// MDIView.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "MDIView.h"
#include "ZFrm.h"
#include "ZChild.h"
#include "ZDoc.h"
#include "ZView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// ZApp
BEGIN_MESSAGE_MAP(ZApp, CWinApp)
//{{AFX_MSG_MAP(ZApp)
ON_COMMAND(M0_HELP, On_Help)
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// ZApp construction
ZApp::ZApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// The one and only ZApp object
ZApp theApp;
/////////////////////////////////////////////////////////////////////////////
// ZApp initialization
BOOL ZApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register document templates
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_MDIVIETYPE,
RUNTIME_CLASS(ZDoc),
RUNTIME_CLASS(ZChild), // custom MDI child frame
RUNTIME_CLASS(ZView));
AddDocTemplate(pDocTemplate);
// create main MDI Frame window
ZFrm* pMainFrame = new ZFrm;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
m_pMainWnd = pMainFrame;
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// ZApp message handlers
void ZApp::On_Help()
{
::ShellExecute(0,0,"..\\..\\Help\\Help.htm",0,0,SW_SHOW);
::ShellExecute(0,0,"..\\Help\\Help.htm",0,0,SW_SHOW);
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.