// MyFrame.cpp : implementation file
//
#include "stdafx.h"
#include "MyDllPj.h"
#include "MyFrame.h"
#include "MyDocument.h"
#include "MyView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyFrame
IMPLEMENT_DYNCREATE(CMyFrame, CFrameWnd)
CMyFrame::CMyFrame()
{
}
CMyFrame::~CMyFrame()
{
}
BEGIN_MESSAGE_MAP(CMyFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMyFrame)
ON_WM_CREATE()
ON_COMMAND(IDR_MYTEST,OnMenuDown)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};
/////////////////////////////////////////////////////////////////////////////
// CMyFrame message handlers
BOOL CMyFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
return CFrameWnd::PreCreateWindow(cs);
}
int CMyFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
// CCreateContext context;
// context.m_pNewViewClass = CRuntimeClass(CMyView);
// context.m_pCurrentDoc = new CMyDocument;
return 0;
}
void CMyFrame::OnMenuDown()
{
MessageBox("Yes");
}
没有合适的资源?快使用搜索试试~ 我知道了~
VC++MDI框架的dll简单源码
共26个文件
h:7个
cpp:6个
ico:2个
4星 · 超过85%的资源 需积分: 3 33 下载量 119 浏览量
2011-02-14
10:59:19
上传
评论
收藏 32KB RAR 举报
温馨提示
这是一个基于MDI框架的DLL源码,网上很多都是基于对话框,MDI的讲得很少
资源推荐
资源详情
资源评论
收起资源包目录
MyDllPj.rar (26个子文件)
MyDllPj
StdAfx.h 1KB
MyDllPj.def 157B
MyView.h 1KB
res
MyDllPj.rc2 399B
MyDllPj.cpp 2KB
MyDllPj.ncb 65KB
MyFrame.h 1KB
MyDocument.h 1KB
MyDllPj.aps 36KB
MyDllPj.opt 56KB
MyApps.h 1KB
MyView.cpp 1KB
MyDllPj.plg 2KB
Debug
MyDllPj.clw 1KB
toolbar1.bmp 598B
Resource.h 691B
MyDocument.cpp 1KB
TestDllFrameDoc.ico 1KB
MyApps.cpp 2KB
MyDllPj.dsp 5KB
MyDllPj.dsw 539B
MyDllPj.rc 6KB
StdAfx.cpp 209B
MyDllPj.h 1KB
MyFrame.cpp 2KB
TestDllFrame.ico 1KB
共 26 条
- 1
gzw_371
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页