1 Problems of the derivation When you create a DLL that uses MFC, the VS Wizard automatically adds a class that inherits from CWinApp and overloads the InitInstance and ExitInstance two functions. In front of this file there is a note:////todo: If this DLL is dynamically linked relative to the MFC DLL,// any transfer into// from this DLL MFC functions must add a
What is the module status?In each Microsoft Foundation Classes (MFC) module (exe, DLL), there is a "global" data, MFC relies on this global data to perform the correct operation. This type of global data is called the status of the MFC module.For example, MFC applications often use the following code to load strings fr
Wtl guide for MFC programmers: Part I-Atl Interface Class
Original:Michael Dunn[Original ENGLISH]Translation: Orbit (dried orpi) [http://www.winmsg.com/cn/orbit.htm]
Download DEMO code
Content of this Chapter
Readme. txt
General introduction to this series of articles
A brief introduction to Chapter 1
ATL background
Development History of ATL and wtl
ATL-style Template
ATL window class
Define the implementation of a window
Me
, the most important thing is to add a virtual function in CWnd Createcontrolsite so that there is a chance to change the control site to modify the control behavior. At the MFC class level, CHtmlView and CDHtmlDialog provide developers with a range of infrastructure to create WEBGUI, including event mechanisms, window behavior, and interfaces for manipulating HTML documents. It was easy for us to implement WebGui on this basis, but still puzzled me f
Digression: When I first started learning Windows programming, I printed a detailed description of the Windows message, which lists the meanings and functions of various defined messages, a total of more than 10 pages, which are sometimes found to be useful when programming. I find a lot of programming friends, although every day to face the news, but very little attention to it. C + + programmers have a common problem, they want to write "their own" program, that is, every line of code want to
Analyze the six key technologies of MFCDigress:I don't think that MFC reduces the burden on programmers. Although it seems that the goal of MFC is to enable programmers to program windows without having to know too much, however, I have been wandering in MFC for a long time (because there was no detailed description of the principles of
WTL are not what the framework, is the use of generic characteristics of the win API layer encapsulation, design ideas also did not get rid of the impact of MFC, in fact, with the generic UI framework can only be regarded as a behavioral art, the idea of continued development will become useless, such as The code is too complex, the compilation is too slow, error is not good debugging and other problems difficult to solve.And the package is not comple
Originated from http://my.oschina.net/ypimgt/blog/62573First, the preparatory workFirst step : Download and install Adobe Flash Player.Download the latest Flash Player (approximately 2.66M) from the official website (http://get.adobe.com/cn/flashplayer/) and install it. For WINDOWS 32-bit systems, the default installation directory is: C:\WINDOWS\system32\Macromed\Flash\; for 64-bit systems: C:\Windows\SysWOW64\Macromed\Flash.The large version number of the Flash control is represented by a numb
Xtrme Toolkit,Bcgcontrolbar,Skinmagic,Appface,skin++,uskin++,Sygui,libuidk,Guitoolkit,Gardenuiand so on, except the latter two are open source, one is free, the rest are charged. The Ultimate ToolboxHttp://www.codeproject.com/KB/MFC/UltimateToolbox.aspxGuitoolkit (open source,MFC extension Framework, similar to Visual Studio 2003 style)Http://www.beyondata.com/default.htmGardenui (free, very good interface
Summary : This article briefly introduces the VC ++ 6.0 MFC programming method and the MFC application framework.
Keywords: VC ++ 6.0; MFC;ProgramFramework
1. MFC Overview
The MFC application framework is based on the framework. The application established in this fr
MFC Overview
MFC is a programming framework The various types of MFC (Microsoft Foundation Class Library) are combined to form an application.ProgramThe purpose of the framework is to allow programmers to build applications in Windows on this basis. This is a simpler method than the SDK. In general, the MFC
1, the reason is "possible", because there is a point is that the temporary object is the encapsulation of the HWND operation, not the window class encapsulation. Thus all hwnd temporary objects are instances of CWnd, even if the above forcibly converted to cabcdialog* is still cwnd*, so when Cabcdialog::assertvalid is called in Assert_valid, it defines some additional checks, It may be found that this is an instance of CWnd rather than an Cabcdialog instance, resulting in an assertion failure.
MFC encapsulates the win API. Everyone knows. But how many people know about the real process of MFC applications?
Here are some of my analysis of the MFC startup code.
In TCHAR.H, there are 2 small pieces of define. Through my simplification, we can see:
//TCHAR.H #ifdef _UNICODE #define _tWinMain wWinMain #else #define _tWinMain WinMain #endif
Because the W
Why you shoshould learn the API before MFC
Why do I first learn API before learning MFC?
Original article: http://www.winprog.org/tutorial/apivsmfc.htmlLiu Jianwen translated (http://blog.csdn.net/keminlau) the controversy argument
Too users people come on to IRC and ask "What is better, MFC or API? "And too recommend people are willing to say"
1. Project CreationWhen you create a project with Win32. Want to use MFC's way. Just change one place.2. Change the entry function (provided that you handle those functions before the main function yourself)3. Creating MFC is typically based on a dialog box4. The default generated macro description. Here is the generated type corresponding to the Idd_mfcapplication1_dialog resource Idcmfcapplication1dlg::cmfcapplication1dlg (cwnd* pparent/*=NULL*/): C
Guide
WTL has two sides, indeed. It is not as powerful as the MFC interface (GUI) class library, but can generate very small executable files. If you use MFC for interface programming like me, you will feel that the interface control provided by MFC is very comfortable to encapsulate and use, not to mention the built-in Message Processing Mechanism of
By Sun Hui
MFC has been around for more than a decade. However, it is still a key component of Visual C ++. Almost eight years since Visual C ++ 1996 in 4.2, the main characteristics of MFC have not changed significantly and are still "old" faces, therefore, the comments about this class library are naturally reasonable. From my personal point of view, MFC is sti
------ From http://hi.baidu.com/snownight/blog/item/dc4c0a5522bd24cdb645ae48.html MFC multi-thread programming considerations
[Post] considerations for MFC multi-thread programming Favorites 1. Performance-error exampleAbout the window object (pointer? Handle ?) Problems: After selecting the start thread in the menu:Void cmainframe: onmenu_start (){...Afxbeginthread (mythread, this );...} The th
the document object in CView is ( GetDocument )2. CDialog class inherits from (CWnd) class3. In the CListBox class, the member function that gets the index of the user-selected string is (GetCurSel)4. In the CDialog class, the member function that obtains a pointer to a child control with the specified ID is (GetDlgItem)In a 5.CString class, a member function that can find a character or substring in a larger string is (find)6.MFC, the global functio
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.