分享
 
 
 

WTL for MFC Programmers(1)

王朝vc·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

WTL for MFC Programmers

从MFC到WTL

原著 Michael Dunn

编译 蜗牛手记

译前序

一直以来都是在MFC的平台上开发,忽然有一天开发的东西需要跨入没有MFC的平台上才发现Window编程和MFC编程的区别,如何能够快速的由MFC转入WINDOW平台呢,找来找去发现了WTL这个奇怪的东西。

说它奇怪,一点也不过分,微软开发的开放原码的东西,没有官方的任何资源,版本也怪,第一版是3.1,都说微软的东西要到3.0以后才能用,windows是,IE是,window ce也是,难道为了说明自己第一版就能用,所以直接就着这么定义了?当然是开玩笑,至于为什么,文中自有答案。

本文原文刊登在http://www.codeproject.com,通读以后觉得行文稍显啰嗦,但是一步一步的讲解的非常清楚易懂,很多地方还和MFC相互例证,使读者在学习WTL的同时了解MFC的运行情况。

由于本人水平有限,所以采用英汉对应的方法,便于读者在发现中文行文问题时对照原文理解。

蜗牛手记

http://www.chinaos.com

关于作者Michael Dunn

Michael lives in sunny Los Angeles, California, and is so spoiled by the weather that he will probably never be able to live anywhere else. He started programming with an Apple //e in 4th grade, graduated from UCLA with a math degree in 1995, and immediately landed a job as a QA engineer at Symantec, working on the Norton AntiVirus team. He pretty much taught himself Windows and MFC programming, and in 1999 he designed and coded a new interface for Norton AntiVirus 2000.

Mike now works as a developer at Napster, an online subscription music service. He also developed UltraBar, an IE toolbar plugin that makes web searching easy and trounces the Google toolbar; the CodeProject SearchBar; and has co-founded Zabersoft, a development company with offices in Los Angeles and Odense, Denmark.

He also enjoys his hobbies of playing pinball, bike riding, and the occasional PlayStation, Dreamcast, or MAME game. He is also sad that he's forgotten the languages he's studied: French, Mandarin Chinese, and Japanese.

Part I - ATL GUI Classes

第一章 ATL的GUI类

An introduction to WTL programming for MFC developers

一个适用于MFC程序员的WTL入门

README.TXT

阅读须知

This is the stuff I want you to read first, before proceeding on or posting messages to this article's discussion board.

我希望你在开始阅读或讨论这篇文章之前,能先读以下的信息。

You need the Platform SDK. You can't use WTL without it. You can use the online SDK Update site, or download the CAB files and run the setup locally. Be sure you use the utility to add the SDK include and lib directories to the VC search path. You can find this in the Visual Studio Registration folder in the Platform SDK program group.

你需要Platform SDK,没有它WTL无法运行。你可以在线使用SDK Update网站,或者下载cab文件到本地安装。请确定你在VC的搜索路径中添加了有效的SDK的include和lib路径。你可以在Platform SDK的程序组的Visual Studio Registration中找到这些路径的信息。

You need WTL. Download version 7 from Microsoft. See the articles "Introduction to WTL - Part 1" and "Easy installation of WTL" for some tips on installing the files. Those articles are rather out-of-date now, but still contain some good info. One thing which I don't think is mentioned in those articles is how to tell VC to search the WTL include directory. In VC 6, click Tools|Options and go to the Directories tab. In the Show directories for combo box, select Include files. Then add a new entry that points to the directory where you put the WTL header files.

你需要WTL。从微软的网站下载WTL 7。阅读文章本文后面的部分来安装这些文件。然后你需要在VC的搜索路径中添加WTL的include目录。在VC6中,点击菜单项Tools|Options,然后寻找Directories页。在标签为Show directories for:的组合框中选择Include files。然后添加WTL头文件路径到下面的列表中。

You need to know MFC, and know it well enough that you understand what's behind the message map macros, and can edit the code marked "DO NOT EDIT" with no problems.

你需要了解MFC的消息宏的运作方式,还应该能够编辑被标注了“DO NOT EDIT”的代码。

You need to know Win32 API programming, and know it well. If you learned Windows programming by going straight into MFC, without learning how messages work at the API level, you are unfortunately going to have trouble in WTL. If you don't know what a message's WPARAM and LPARAM mean, you should read other articles (there are lots of them here at CodeProject) so you understand.

你需要了解一些Win32 API编程的知识,如果你只学习MFC来进行Windows编程,而不了解API级别的消息处理机制,很不幸,你在学习WTL的进程中将遇到不少麻烦。如果你不知道消息中WPARM和LPARAM的含义,你需要一起其他的相关的资料作为参考。

You need to know C++ template syntax. See the VC Forum FAQ for links to C++ FAQs and template FAQs.

你需要知道c++模板的语法。访问http://www.codeproject.com/cpp/cppforumfaq.asp#other_cpp 去了解更多的关于这方面的知识。

I will only be covering VC 6 features, but as far as I know everything should work on VC 7. Since I don't use VC 7, I won't be able to help with VC 7 problems. However, feel free to post VC 7 questions, as other readers might be able to help.

我将只讲述VC6相关的特性,虽然我知道在不远的将来所有的工作将在VC7上进行,但是我还没有使用VC7,所以无法提供相关的帮助。然而,你也可以贴出VC7相关的问题,也许其他的读者能够提供帮助。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有