- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
开发的环境介绍
业精于勤荒于嬉 行成于思毁于随 →豆丁网分享 Windows Programming and MFC Application Framework Speaker: Shih Liang Chen Contents 開發環境介紹 MFC 簡介 Introduction Document/View Architecture Debug messages IDE 環境簡介 Text editor Instant comment Folding/unfolding block of codes Book marks Class wizard is canceled Properties window/dialog Others How to read information in class view? How to customize directories? How to link static library? How to customize toolbar? Naming convention Prefix: Scope: Global variables: g_ Class members: m_ Auto variables: (NO) Data Type Points (p), int (n), float (f), string (str), boolean (b) Name: Capital letters for beginning letter of each word Put an underscore (_) between each word 新資料型態 Handle 實際上是整數形態 用來標示視窗環境中一個物件 HWND 標示視窗物件的handle HINSTANCE 標示instance (一個應用程式執行時的實體)的handle MFC 簡介 Application Framework 提供完整的程式模型,具備標準App的功能。並由程式設計師修改部份物件的行為以符合需求 MFC將大部份 Win32API 封裝至各個層次的物件中 將WndProc中各種訊息對映至類別的成員函式,方便程式開發管理 Hierarchy chart CObject CObject是MFC類別函式庫的基底類別 衍生類別功能 Serialize RTTI Object Dump Collection class compatibility 規定:CObject或其衍生類別必須在繼承列中的最左方,而且不可以繼承自一個以上的CObject類別 MFC類別主要分類 Application architecture classes Window, dialog and control classes Drawing and printing classes Simple data type Container classes File and database classes Internet and networking classes OLE classes Debugging and exception classes Document/View Architecture This architecture is to separate data and user interaction with the data Advantages: Application can display data in different form All the Views associated with the same Document can be updated simultaneously Storing Data All data is stored in the CDocument object When user need to Open/Save a file, data is transferred from/to a file via CArchive object Example MDI vs. SDI 物件層級行為、邏輯、business rules 實作在資料類別(如CMyCircle…) 物件互動、物件管理、應用程式資料結構 實作在CDocument類別 使用者輸入、顯示功能、UI 實作在CView, CMainFrame類別 How to display debug message? GUI applications don’t have a text console to display text message In development phase TRACE: function works
原创力文档


文档评论(0)