《深入浅出MFC第2版(PDF格式)》第302章


MDIBIND Demonstrates data binding in CWnd…derived windows; but only at run time。 
MDIDOCVW New version of the MDI sample that uses the document/view architecture。 
MFCCALC An Automation server that implements a simple calculator。 
MFCUCASE Demonstrates MFC support for Internet Server filter DLLs。 
MODELESS Demonstrates the use of an MFC CDialog object as a modeless dialog。 
MTGDI Multithread illustration; where GDI resources are converted to MFC objects 
and back。 
MTMDI Multithread illustration; where user…interface events are processed in a 
separate user…interface thread。 
918 
…………………………………………………………Page 981……………………………………………………………
附錄C Visual C++ 5。0 範例程式樱А?br />
程式名稱 說明 
MTRECALC Multithread illustration; where recalculations are done in a worker thread。 
MULTIPAD Simple MDI text editor using the CEditView class。 
MUTEXES Demonstrates the use of the Cmutex class for multithreading。 
NPP Editor demonstrating toolbars; status bars; and other controls。 
OCLIENT ActiveX Visual Editing container application; with drag and drop。 
ODBCINFO Shows how to determine various ODBC driver capabilities at run time。 
OLEVIEW Implementing an OLE object browser through custom OLE interfaces。 
PROPDLG Property sheets (dialogs)。 
ROWLIST Illustrates full row selection in a list…view mon control。 
SAVER Screen saver written with MFC。 
SCRIBBLE Main tutorial example in Visual C++ Tutorials。 
SMILEY Modifying properties; calling methods; and handling events from the SMILE 
control in the SMILEY container。 
SNAPVW Shows how to use property pages in a MDI child frame window。 
SPEAKN Multimedia sound using user…defined resources。 
STDREG Tool for populating the Student Registration database (used by the Enroll 
database tutorial) in any format supported by an ODBC driver。 Illustrates 
SQL table creation。 
SUPERPAD ActiveX Visual Editing server that edits text using CEditView。 
TEAR MFC console application that uses the WININET。DLL。 
TEMPLDEF mand line tool that expands source files similar to C++ templates。 
TESTHELP An ActiveX control that has its own help file and tooltips。 
TRACER Tool that sets the Foundation class application trace flags kept in AFX。INI。 
TRACKER Illustration of the various CRectTracker styles and options。 
919 
…………………………………………………………Page 982……………………………………………………………
第五篇 附錄
程式名稱 說明 
VCTERM Simple terminal emulation program illustrating the use of the 
MSM32。OCX ActiveX control。 
VIEWEX Multiple views; scroll view; splitter windows。 
WORDPAD Uses MFC"s support for rich edit controls to create a basic word processor。 
WWWQUOTE Retrieves information from a database and provides it to the user via an HTTP 
connection to the server。 
920 
…………………………………………………………Page 983……………………………………………………………
附錄D 以MFC 重建DBWIN
附錄D 
以MFC 重建 DBWIN 
洠в小 BWIN ,TRACE 唱什麼獨角戲?Visual C++ 的 TRACE 字串輸出必須在整合環境的除錯視 
窗看到。這太過份了。我們只不過想在射擊撸穲鐾嫱妫④泤s要我們扛尊 155 加農砲。 
侯俊傑 
/ 1997。01 發表於Run!PC 雜誌 
我自己常喜歡在程式加個 printf ,觀察程式的流程或變數的內容。簡簡單單,不必驚動除 
錯器之類的大傢伙。 
printf AfxMessageBox TRACE 
、 與 
printf C text mode Windows
是 語言的標準函式,但只能在文字模式( )執行。 圖形介 
面差可比擬的是 AfxMessageBox ,可以輕輕鬆鬆在對話盒列印出你的字串。然而 
AfxMessageBox OK 
有個缺點:它會打斷程式的行進,非得使用者按【 】按鈕不可。再 
者,如果 AfxMessageBox 對話盒畫面侵佔了原程式的視窗畫面,旦對話盒結束,系統 
WM PAINT OnDraw 
_ View
會對程式視窗發出原本不必要的 ,於是 類別的 會被呼叫。如 
果你的 AfxMessageBox 正是放在 OnDraw 函式,這惡性循環可有得瞧了。 
TRACE 洠в羞@種缺點,它的輸出集到個特定視窗,它不會打斷你測試程式的雅 
921 
…………………………………………………………Page 984……………………………………………………………
第五篇 附錄
OK 
興,不會在你全神貫注思考程式邏輯時還要你分神來按【 】鈕。更重要的是,它不會 
干擾到程式的視窗畫面。 
Visual C++ 1。5 時代,TRACE 的字串輸出是送到個名為 DBWIN 的視窗。你可以 
TRACE Visual C++ 
邊執
小说推荐
返回首页返回目录