Analysis of the six key technologies of MFC (Part 1) -- the initialization process of the MFC Program
Http://blog.csdn.net/liyi268/archive/2005/02/22/297875.aspx
Analysis of the six key technologies of MFC (Part 2) -- runtime type recognition (rtti)
Http://blog.csdn.net/liyi268/archive/2005/02/27/304175.aspx
Six key technologies of
The lifecycle of an MFC Application(1) The entry point of a program. As an encapsulation of Win32 API, the entry point of the program is winmain. However, this winmain is encapsulated and invisible to users, but will be automatically connected when the compiler connects. Next we will look for the hidden winmain of the MFC program. Search for the source file of MFC
As a rookie who has not yet entered the gaming industry, it has always been my dream to enter the gaming industry,
One day, I was deeply attracted by the beautiful scenes of tianlong Babu, and decided to implement it myself,
But it seems very difficult. The road ahead is long, and I will go up and down to seek...
Step by step...
After suffering for two days, we finally succeeded in embedding ogre into MFC, and implemented OIS buffer input and mouse
Visual c ++ 2008 getting started classic (Chinese version) download
Windows core programming version 5th (Windows via C/C ++, 5th edition)
In-depth analysis of Windows operating system version 4th
In-depth analysis of Windows operating system (English Version 5th)
Windows Programming (fifth edition) English version | Windows Programming (fifth edition) Chinese Version
In-depth introduction to MFC (2nd edition) Simplified + traditional Chinese Text Ve
Let's take a look at the OnIdle () Introduction to MSDN:
CWinApp: OnIdle
OnIdleIs called in the default message loop when the application's message queue is
Empty. Use your override to call your own background idle-handler tasks.
Generally, this function is rarely reloaded in desktop applications. It is useful for video games. In the development environment of Win32 SDK, you can add your own render () and other interfaces to the message loop to run your program core. This is also a common method
VC + + Control Toolbox:
2 button: A command used to receive a user, which usually requires some background work after receiving a user command. button to respond to the click or double-click Action , after the button receives the mouse action, send the corresponding control notification to its parent window, the user can the control notification for the message mapping, so that the corresponding processing. In a dialog box, you can define a default button, which simply selects the "Default" opti
Introduction to the MFC framework
I. MFC framework
The MFC library is the C + + interface for developing Windows applications. MFC provides an object-oriented framework that uses object-oriented technology to encapsulate most of the Windows APIs into C + + classes and to be invoked in the form of class member functions
Original article: http://hi.baidu.com/rickiedu/blog/item/37c9fe24adada61d8a82a1db.htmlMFC generate local machineCode, Naturally, it is very fast. However, the message loop slows down the display speed on the interface.
Winform encapsulates Win32 APIs for multiple p/invoke operations (most of which are encapsulated using P/invoke operations), which is slow.
WPF is a new model. It no longer uses Win32 models. It creates models by itself. dx is used as a new display technology to directly acces
Use vs2012 as the standard. From: http://technet.microsoft.com/zh-cn/library/w4zd66ye, there are changes.
1. MFC static library (. Lib)
The MFC static library uses the following naming conventions:
UafxCWD. Lib.
The library naming conventions are described as follows:
Description
Value and meaning
U
(N) ANSI or (u) Unicode
C
Plan type created: c = all
D
D = d
In general, the developed MFC program generally uses the Library about MFC in VC, in the form. lib and corresponding. DLL, in the project settings, in project-> setting-> General, there is "usingMFC in a static library "or" Using MFC in a sharedDLL ", in general development, if the project is just a separate program, we generally use" Using
I often download programs from the Internet, but I can't see a few lines of VC. I move the mouse to the top right corner, aiming at the "X", click it... (The heart is still thinking: killing you !), Let alone look for the existence of QQ in the "program" menu and start leisure time !! This is something I often do, alas! Because of its poor foundation, it is often kicked out of the door by good code. Fortunately, I still have a feeling for her. Recently, I was lucky enough to buy Mr. Hou's "Let's
Wtl for MFC programmersI have been looking for such a class library: it provides object-oriented encapsulation for Windows, flexible message response mechanisms, and relatively complete interface framework solutions, provides concise and practical encapsulation of standard controls, supports new features of the operating system, supports function expansion and secondary development, and provides an Automatic Code Generation wizard mechanism to generat
The app is the app domain, and everything in the domain can be accessed through a global function.Mainframe is the main frame and can be accessed basically with global functions.Mainframe is a number of view and document (possibly unpaired) in several childframe,childframe, Childframe manages the interoperation of View,view and document.Therefore, the overall framework is out, generally in addition to direct application of the relationship can be accessed through the mainframe-->active childfram
Afx_manage_state (afxgetstaticmodulestate (); // this parameter is used for status protection during module switching,
1. afxgetstaticmodulestate () points to the current module status;
2. The status of the original module is automatically restored after the current function call ends;
3. It is used to switch the module status when the MFC functions, classes, and resources are called in the DLL.
I encountered a problem when calling domodal In the DLL
Win32 is the most basic programming method in windows.CodeThe cleaner, the most efficient, and the lowest layer is the basis for all other methods. Generally, only APIs and sdks are used. MFC is an encapsulation of Win32. It uses the Win32 programming method and writes one class after another, so that we do not need to repeat a lot of work. But it is encapsulation, so it is impossible to fully implement all Win32 functions. Although it is convenient t
There are two kinds of exception handling mechanisms in MFC:
C + + exceptions, available in MFC3.0 or later versions
MFC exception macros, available in MFC1.0 or later versions
If you are using MFC to write a new application, you should use the C + + exception mechanism, and if your existing application is near using
One, Microsoft MFC-based programming methodMFC is the abbreviation for Microsoft Foundation Class Library . Unlike APIs, MFC is not part of the Windows operating system, but is a companion package developed by Microsoft for VC + +. Matching with VC6 is the MFC6.0. MFC uses inheritance and polymorphism techniques in object-oriented methods to encapsulate almost al
The Code is as follows:
# Include
Class sample: Public cframewnd{Public:Sample (){Create (null, "MFC window ");MessageBox ("My MFC window", "cframe constructor", mb_ OK );}};
Class app: Public cwinapp{Public:Bool initinstance ();Bool exitinstance ();};
Bool app: initinstance (){MessageBox (0, "My MFC window", "initinstance", mb_ OK | mb_iconasterisk );Sample *
Splashing splashing liukun321From: http://blog.csdn.net/liukun321Samsung series processors, from s3c6410 onwards, integrate an MFC (Multi format CODEC) multi-format Media codec hardware module on the SOC. And Samsung's Linux BSP is open source for its drive. Having seen the MFC-driven friends, I must have found that during the driver initialization process, the kernel needs to load a Samsung
when I was learning detour, I built a DLL file and an MFC project for testing purposes. But my MFC program loaded DLL file when running to Loadlibray ("XXX.dll") this statement can not continue, no error, VS2010 also did not stop, or in a compiled run state.But I loaded before the other DLL files can be run, this should be a very simple process of loading DLL files, just want to be DLL file code error? or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.