?? fpsystemdoc.cpp
字號(hào):
// FPSystemDoc.cpp : implementation of the CFPSystemDoc class
//
#include "stdafx.h"
#include "FPSystem.h"
#include "FPSystemDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFPSystemDoc
IMPLEMENT_DYNCREATE(CFPSystemDoc, CDocument)
BEGIN_MESSAGE_MAP(CFPSystemDoc, CDocument)
//{{AFX_MSG_MAP(CFPSystemDoc)
ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFPSystemDoc construction/destruction
CFPSystemDoc::CFPSystemDoc()
{
// TODO: add one-time construction code here
}
CFPSystemDoc::~CFPSystemDoc()
{
}
BOOL CFPSystemDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CFPSystemDoc serialization
void CFPSystemDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CFPSystemDoc diagnostics
#ifdef _DEBUG
void CFPSystemDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CFPSystemDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CFPSystemDoc commands
/************************系統(tǒng)響應(yīng)事件:文件打開(kāi)*****************************/
void CFPSystemDoc::OnFileOpen()
{
// TODO: Add your command handler code here
CFileDialog openDlg(TRUE);
openDlg.m_ofn.lpstrFilter="BMP Files(*.bmp)\0*.bmp\0All Files(*.*)\0*.*\0\0";
if(IDCANCEL==openDlg.DoModal())
{
return;
}
CString strBmpFilePath=openDlg.GetPathName();
POSITION pos;
pos=this->GetFirstViewPosition();
CWnd *pWnd=(CWnd *)this->GetNextView(pos);
CDC *pDC=pWnd->GetDC();
m_bmpobject.LoadBmpFile(strBmpFilePath,pDC); //圖像加載
pWnd->ReleaseDC(pDC);
AfxGetMainWnd()->SetMenu(NULL);
CMenu menu;
menu.LoadMenu(IDR_MYMENU);
AfxGetMainWnd()->SetMenu(&menu);
menu.Detach();
//使得不可用的菜單項(xiàng)可用
// ((CButton*)GetDlgItem(ID_FP_EMBED))->Enable(); //水印嵌入菜單項(xiàng)
// ((CButton*)GetDlgItem(ID_FP_EMBED))->Enable(); //水印提取菜單項(xiàng)
UpdateAllViews(NULL);
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -