CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - CMainFrame
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
GUI Develop
Windows Kernel
WinSock-NDIS
Driver Develop
ADO-ODBC
GDI-Bitmap
CSharp
.net
Multimedia Develop
Communication
Shell api
ActiveX/DCOM/ATL
IME Develop
ISAPI-IE
Hook api
Screen saver
DirextX
Process-Thread
Console
File Operate
Printing program
Multi Monitor
DNA
Other
Search - CMainFrame - List
[
Windows Develop
]
DOCTIME2.zip
DL : 0
《如何发送命令到文档对象》配套原代码 [代码性质] VC可重用代码段 我编了一个类似Windows 2000 上性能监视器的程序。在这个程序中,我创建了一个文档对象和几个视图。文档对象负责有规律地采集数据,然后通知相关的视图以不同的格式显示这些数据。文档对象为了有规律地采集数据,它需要一个定时(time)事件。但是,文档不是一个基于窗口的对象,所以它没有这样的定时事件。我权衡了三种解决方案: 1、在其中的一个视图中创建定时器。当事件发生时通知文档对象获取数据。 2、为每一个文档(或在每个文档内)创建一个单独的线程,以便这个线程能有规律地创建时间事件。 3、在CMainFrame中创建一个定时器并从中调用文档函数这三种方法我都不满意。能否给出一种更好的解决方案?
Date
: 2025-12-24
Size
: 45.87kb
User
:
[
Windows Develop
]
在动态连接库内封装应用程序框架cool
DL : 0
实现方法: 用MFC的程序向导生成一个常规DLL,在常规DLL内有一派生自CWinApp的实例,再用MFC的程序向导生成一个MFC EXE应用程序,把MFC EXE应用程序中 CAppView,CMainFrame,CAppDocument的文挡和RES目录下的资源拷贝到常规DLL项目中,添加到项目中,编译生成一DLL,在另外一个WIN32应用程序中,启动一线程,在线程函数中显式装载该DLL,取的该DLL内的当前线程, CWinThread *pThread=GetCurrentThread() pThread->Run() 就可装载启动常规DLL内应用程序框架.-method: a normal DLL file has been created with the program wizard and there is an instance generated from CWinApp in the DLL file.Create another MFC EXE appliaction and copy CAppView,CMainFram,CAppDocument and the resources in RES directory to the normal DLL and add to the projec and compile and generate a DLL. In a Win32 application, start a thread which loads the DLL with codes, get the running thread, ie.CWinThread *pThread=GetCurrentThread(), then,pThread->Run() executes the loading and start the execution of the application framework in the normal DLL file.
Date
: 2008-10-13
Size
: 68.25kb
User
:
杨杰
[
Windows Develop
]
Sample_Demo
DL : 0
In your application, override OnNotify member function in your CMainFrame to handle the WM_NOTIFY message for painting the AfxControlBar.
Date
: 2008-10-13
Size
: 21.26kb
User
:
碧蓝天
[
Windows Develop
]
POPMENU
DL : 0
C++中加入弹出菜单: 在窗口类中派生Message消息:WM_CONTEXTMENU (右键单击事件) 即在CMainFrame类中实现如下代码即可:
Date
: 2008-10-13
Size
: 966byte
User
:
杨明
[
Windows Develop
]
SingDocRglDll
DL : 0
实现方法: 用MFC的程序向导生成一个常规DLL,在常规DLL内有一派生自CWinApp的实例,再用MFC的程序向导生成一个MFC EXE应用程序,把MFC EXE应用程序中 CAppView,CMainFrame,CAppDocument的文挡和RES目录下的资源拷贝到常规DLL项目中,添加到项目中,编译生成一DLL,在另外一个WIN32应用程序中,启动一线程,在线程函数中显式装载该DLL,取的该DLL内的当前线程, CWinThread *pThread=GetCurrentThread() pThread->Run() 就可装载启动常规DLL内应用程序框架.
Date
: 2008-10-13
Size
: 68.25kb
User
:
段平平
[
Windows Develop
]
ASocket示例
DL : 0
ASocket示例 #include "stdafx.h" #include "s.h" #include "MainFrm.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMainFrame IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) //{{AFX_MSG_MAP(CMainFrame) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code ! ON_WM_CREATE() //}}AFX_MSG_MAP END_MESSAGE_MAP() static UINT indicators[] = { ID_SEPARATOR, // status line indicator ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL, }; ///////////////////////////////////////////////////////////////////////////// // CMainFrame construction/destruction CMainFrame::CMainFrame() { // TODO: add member initialization code here } CMainFrame::~CMainFrame() { } int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; 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))
Date
: 2011-06-28
Size
: 62.82kb
User
:
yanghaijun2008
[
Windows Develop
]
VC视图绘制动态曲线图
DL : 0
======================================================================== MICROSOFT FOUNDATION CLASS LIBRARY : TestDrawCurve_26 ======================================================================== AppWizard has created this TestDrawCurve_26 application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your TestDrawCurve_26 application. TestDrawCurve_26.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. TestDrawCurve_26.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CTestDrawCurve_26App application class. TestDrawCurve_26.cpp This is the main application source file that contains the application class CTestDrawCurve_26App. TestDrawCurve_26.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. TestDrawCurve_26.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions. res\TestDrawCurve_26.ico This is an icon file, which is used as the application's icon. This icon is included by the main resource file TestDrawCurve_26.rc. res\TestDrawCurve_26.rc2 This file contains resources that are not edited by Microsoft Visual C++. You should place all resources not editable by the resource editor in this file. ///////////////////////////////////////////////////////////////////////////// For the main frame window: MainFrm.h, MainFrm.cpp These files contain the frame class CMainFrame, which is derived from CFrameWnd and controls all SDI frame features. res\Toolbar.bmp This bitmap file is used to create tiled images for the toolbar. The initial toolbar and status bar are constructed in the CMainFrame class. Edit this toolbar bitmap using the resource editor, and update the IDR_MAINFRAME TOOLBAR array in TestDrawCurve_26.rc to add toolbar buttons. ///////////////////////////////////////////////////////////////////////////// AppWizard creates one document type and one view: TestDrawCurve_26Doc.h, TestDrawCurve_26Doc.cpp - the document These files contain your CTestDrawCurve_26Doc class. Edit these files to add your special document data and to implement file saving and loading (via CTestDrawCurve_26Doc::Serialize). TestDrawCurve_26View.h, TestDrawCurve_26View.cpp - the view of the document These files contain your CTestDrawCurve_26View class. CTestDrawCurve_26View objects are used to view CTestDrawCurve_26Doc objects. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named TestDrawCurve_26.pch and a precompiled types file named StdAfx.obj. Resource.h This is the standard header file, which defines new resource IDs. Microsoft Visual C++ reads and updates this file. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. If your application uses MFC in a shared DLL, and your application is in a language other than the operating system's current language, you will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. For example, MFC42DEU.DLL contains resources translated to German.) If you don't do this, some of the UI elements of your application will remain in the language of the operating system. /////////////////////////////////////////////////////////////////////////////
Date
: 2011-12-18
Size
: 1.88mb
User
:
xiayang168
[
Windows Develop
]
DOCTIME2
DL : 0
《如何发送命令到文档对象》配套原代码 [代码性质] VC可重用代码段 我编了一个类似Windows 2000 上性能监视器的程序。在这个程序中,我创建了一个文档对象和几个视图。文档对象负责有规律地采集数据,然后通知相关的视图以不同的格式显示这些数据。文档对象为了有规律地采集数据,它需要一个定时(time)事件。但是,文档不是一个基于窗口的对象,所以它没有这样的定时事件。我权衡了三种解决方案: 1、在其中的一个视图中创建定时器。当事件发生时通知文档对象获取数据。 2、为每一个文档(或在每个文档内)创建一个单独的线程,以便这个线程能有规律地创建时间事件。 3、在CMainFrame中创建一个定时器并从中调用文档函数这三种方法我都不满意。能否给出一种更好的解决方案?- How to send commands to the Document Object matching the original code [code nature] VC reusable code segment I made a similar on the Windows 2000 Performance Monitor procedures. In this process, I created a document object and several view
Date
: 2025-12-24
Size
: 46kb
User
:
代伟
[
Windows Develop
]
在动态连接库内封装应用程序框架cool
DL : 0
实现方法: 用MFC的程序向导生成一个常规DLL,在常规DLL内有一派生自CWinApp的实例,再用MFC的程序向导生成一个MFC EXE应用程序,把MFC EXE应用程序中 CAppView,CMainFrame,CAppDocument的文挡和RES目录下的资源拷贝到常规DLL项目中,添加到项目中,编译生成一DLL,在另外一个WIN32应用程序中,启动一线程,在线程函数中显式装载该DLL,取的该DLL内的当前线程, CWinThread *pThread=GetCurrentThread() pThread->Run() 就可装载启动常规DLL内应用程序框架.-method: a normal DLL file has been created with the program wizard and there is an instance generated from CWinApp in the DLL file.Create another MFC EXE appliaction and copy CAppView,CMainFram,CAppDocument and the resources in RES directory to the normal DLL and add to the projec and compile and generate a DLL. In a Win32 application, start a thread which loads the DLL with codes, get the running thread, ie.CWinThread*pThread=GetCurrentThread(), then,pThread->Run() executes the loading and start the execution of the application framework in the normal DLL file.
Date
: 2025-12-24
Size
: 68kb
User
:
[
Windows Develop
]
Sample_Demo
DL : 0
In your application, override OnNotify member function in your CMainFrame to handle the WM_NOTIFY message for painting the AfxControlBar.
Date
: 2025-12-24
Size
: 194kb
User
:
碧蓝天
[
Windows Develop
]
POPMENU
DL : 0
C++中加入弹出菜单: 在窗口类中派生Message消息:WM_CONTEXTMENU (右键单击事件) 即在CMainFrame类中实现如下代码即可:-C++ Add pop-up menu: In the window class derived Message news: WM_CONTEXTMENU (right-click events) in the CMainFrame class to achieve the following code:
Date
: 2025-12-24
Size
: 1kb
User
:
杨明
[
Windows Develop
]
SingDocRglDll
DL : 0
实现方法: 用MFC的程序向导生成一个常规DLL,在常规DLL内有一派生自CWinApp的实例,再用MFC的程序向导生成一个MFC EXE应用程序,把MFC EXE应用程序中 CAppView,CMainFrame,CAppDocument的文挡和RES目录下的资源拷贝到常规DLL项目中,添加到项目中,编译生成一DLL,在另外一个WIN32应用程序中,启动一线程,在线程函数中显式装载该DLL,取的该DLL内的当前线程, CWinThread *pThread=GetCurrentThread() pThread->Run() 就可装载启动常规DLL内应用程序框架.-Realize Methods: The MFC AppWizard to generate a conventional DLL, in the conventional DLL there is one derived from CWinApp instance, reuse of the MFC AppWizard to generate a MFCEXE applications, the MFC EXE application CAppView, CMainFrame, CAppDocument block of text RES directory and copy resources to the conventional DLL project, add to the project, the compiler generates a DLL, in another WIN32 application, start a thread in the thread function explicitly loading the DLL, check inside the DLL the current thread, CWinThread* pThread = GetCurrentThread () pThread-
Date
: 2025-12-24
Size
: 68kb
User
:
段平平
[
Windows Develop
]
richeditctrlex
DL : 0
多功能编辑控件源代码:件源代码多功能编辑-// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMainFrame) virtual BOOL PreCreateWindow(CREATESTRUCT& cs) //}}AFX_VIRTUAL
Date
: 2025-12-24
Size
: 21kb
User
:
richeditctrlex
[
Windows Develop
]
ex14c
DL : 0
工具栏是Windows应用开发常见的功能,在VC++6.0引入了IE4.0的rebar控件,利用该控件可以开始浏览器功能的工具栏功能。为实现该功能,需要在使用AppWizard时选择IE工具栏一项;然后在资源编辑器的对话框中加入我们需要的控件,最后把这个资源添加到CMainFrame类即可。
Date
: 2025-12-24
Size
: 1.85mb
User
:
Arkliszeng
[
Windows Develop
]
Ch5Demo1
DL : 0
基本输入——键盘和鼠标消息 基本输入——键盘和鼠标消息-For the main frame window: MainFrm.h, MainFrm.cpp These files contain the frame class CMainFrame, which is derived from CFrameWnd and controls all SDI frame features. res\Toolbar.bmp This bitmap file is used to create tiled images for the toolbar. The initial toolbar and status bar are constructed in the CMainFrame class. Edit this toolbar bitmap using the resource editor, and update the IDR_MAINFRAME TOOLBAR array in Ch5Demo1.rc to add toolbar buttons.
Date
: 2025-12-24
Size
: 9kb
User
:
YRG
[
Windows Develop
]
MDIFrameBackground
DL : 0
To get this task done, my first instinct was to catch the WM_ERASEBKGND in CMainFrame and do the FillSolidRect there. But I soon realized that approach didn t do anything other than make the frame flicker and show red only when it s being resized, otherwise the gray background was completely intact. Not exactly what I was looking for. Suddenly it became a little mystery. Why doesn t the background of the frame change when I fill it with a color in the frame s WM_ERASEBKGND handler? So I went on a hunt, I went through a lot of the CMDIFrameWnd and CFrameWnd code looking for methods that would draw on the frame, and there was not much there. I finally ended up at CMainFrame::OnCreate method, I set a breakpoint and stepped through the CMDIFrameWnd::OnCreate method. After what seemed to be hours of searching I came across the following code in CMDIFrameWnd::CreateClient:
Date
: 2025-12-24
Size
: 49kb
User
:
kamalraj.s
[
Windows Develop
]
bcmenu
DL : 0
VC++在菜单前页添加图标,为了方便其间,这里使用了BCMenu,通过该类可以实现图标菜单的效果。首先生成BCMenu类对象,然后用LoadMenu 函数将菜单资源与菜单对象联系起来,接着通过ModifyODMenuA 函数修改某个菜单项的图标,最后将其设置为CMainFrame 的菜单-VC++ to add an icon in the menu First, in order to facilitate the meantime, here used BCMenu, the effect can be achieved by such an icon menu. BCMenu generated first class object, then the function menu LoadMenu resources and link menu object, a menu item and then change the icon by ModifyODMenuA function is set to the last menu CMainFrame
Date
: 2025-12-24
Size
: 49kb
User
:
bpudn79
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.