在视图中弹出一个对话框
来源:互联网 发布:霍建华横店炮王 知乎 编辑:程序博客网 时间:2024/06/06 01:10
1.在DIalog中插入一个新的对话框;
2.在菜单中添加新的工能;
3.在视图中添加头文件;
// wenbenkuangView.cpp : implementation of the CWenbenkuangView class//#include "stdafx.h"#include "wenbenkuang.h"#include "MyDialog.h"#include "wenbenkuangDoc.h"#include "wenbenkuangView.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CWenbenkuangViewIMPLEMENT_DYNCREATE(CWenbenkuangView, CView)BEGIN_MESSAGE_MAP(CWenbenkuangView, CView)//{{AFX_MSG_MAP(CWenbenkuangView)ON_COMMAND(ID_MENUITEM32771, OnMenuitem32771)//}}AFX_MSG_MAP// Standard printing commandsON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CWenbenkuangView construction/destructionCWenbenkuangView::CWenbenkuangView(){// TODO: add construction code here}CWenbenkuangView::~CWenbenkuangView(){}BOOL CWenbenkuangView::PreCreateWindow(CREATESTRUCT& cs){// TODO: Modify the Window class or styles here by modifying// the CREATESTRUCT csreturn CView::PreCreateWindow(cs);}/////////////////////////////////////////////////////////////////////////////// CWenbenkuangView drawingvoid CWenbenkuangView::OnDraw(CDC* pDC){CWenbenkuangDoc* pDoc = GetDocument();ASSERT_VALID(pDoc);//pDC->TextOut();// TODO: add draw code for native data here}/////////////////////////////////////////////////////////////////////////////// CWenbenkuangView printingBOOL CWenbenkuangView::OnPreparePrinting(CPrintInfo* pInfo){// default preparationreturn DoPreparePrinting(pInfo);}void CWenbenkuangView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/){// TODO: add extra initialization before printing}void CWenbenkuangView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/){// TODO: add cleanup after printing}/////////////////////////////////////////////////////////////////////////////// CWenbenkuangView diagnostics#ifdef _DEBUGvoid CWenbenkuangView::AssertValid() const{CView::AssertValid();}void CWenbenkuangView::Dump(CDumpContext& dc) const{CView::Dump(dc);}CWenbenkuangDoc* CWenbenkuangView::GetDocument() // non-debug version is inline{ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWenbenkuangDoc)));return (CWenbenkuangDoc*)m_pDocument;}#endif //_DEBUG/////////////////////////////////////////////////////////////////////////////// CWenbenkuangView message handlersvoid CWenbenkuangView::OnMenuitem32771() { MyDialog my; my.DoModal();
Invalidate();// TODO: Add your command handler code here}
- 在视图中弹出一个对话框
- 在网页中弹出一个自定义对话框
- 在驱动中弹出对话框
- 在servlet中弹出对话框
- 在servlet中弹出对话框
- 在servlet中弹出对话框
- 在Service中弹出对话框
- 在broadcastReceiver 中弹出对话框
- 在ASP.NET(GridView)中弹出一个对话框
- 在ASP.net中弹出"另存为"对话框
- 在服务程序中弹出对话框
- 在服务程序中弹出对话框
- 在服务程序中弹出对话框
- 在服务程序中弹出对话框
- 在浏览器中弹出模式对话框
- android在Service中弹出Dialog对话框
- 在service中弹出全局对话框AlertDialog
- Android在Service中弹出对话框(Dialog)
- mydialog.h
- 用pictureBox做类似QQ头像的功能
- poj1925-Spiderman(dp)
- Ubuntu 下针对不同扩展名的安装包进行安装的方法
- html自定义checkbox、radio、select —— checkbox、radio篇
- 在视图中弹出一个对话框
- sizeof进行结构体大小的判断
- 如何把form中的runat="server"删除?
- 使用敏捷开发结论
- excel导出
- 把apk装入模拟器
- linux putty命令
- MyDoc.cpp
- NYOJ 8-一种排序