03 2011 档案
摘要:效果:程序:#if !defined(_LJF_LJFHOOK_H)#define _LJF_LJFHOOK_H#if _MSC_VER > 1000#pragma once#endif #include <afxtempl.h>#define sLjfDialogOldProcTag _T("CDialog_oldProc")#define SYSBTN_NON -1#define SYSBTN_MIN 0#define SYSBTN_NOM 1#define SYSBTN_MAX 2#define SYSBTN_CLS 3#define SYSBTNS
阅读全文
摘要:获得MFC窗口其它类指针的方法来源:中国自学编程网 发布日期:2008-09-26 获得CWinApp: -在CMainFrame,CChildFrame,CDocument,CView中直接调用AfxGetApp()或用theApp -在其它类中只能用AfxGetApp() 获得CMainFrame: -在CMinApp中用AfxGetMainWnd()或者m_pMainWnd -在CChildFrame中可用GetParentFrame() -在其它类中用AfxGetMainWnd() 获得CChildFrame: -在CView中用GetParentFrame() -在CMainFram
阅读全文
摘要:CChildFrame *pChild = (CChildFrame *) ((CMainFrame*)theApp.GetMainWnd())->GetActiveFrame(); CMyDoc* pDoc = NULL; pDoc = (CMyDoc*)pChild->GetActiveDocument(); CView* pView; if(pDoc!=NULL) { POSITION pos=pDoc->GetFirstViewPosition(); while(pos!=NULL){ pView=pDoc->GetNextView(pos); if(pView
阅读全文
摘要:2010-01-11 17:23如何在MFC单文档中创建多视图基本步骤如下:1.首先创建一个MFC单文档应用程序。2.添加4个MFC类TopLView、BottomLView、TopRView、BottomRView,基类为CView。3.添加一个MFC类CControlForm,基类为CFormView,对话框ID默认。4.创建一个切分类,如MySplitter,基类为CSplitterWnd(默认基类选项中无此类,自己添加即可)。5.在框架类Cmainframe的头文件中,添加2个MySplitter的变量(因为下面要进行两次切分操作)。6.重写框架类Cmainframe的OnCreate
阅读全文
浙公网安备 33010602011771号