1。在 VC++中可以直接调用WIN32 API 吗?2。在CONSOLE中可以直接调用WIN32 API 吗?
3。VC++中与VB 中用的WIN32 API是一样的吗?
解决方案 »
- ScrollView 滚动条的相关问题
- 谁用过这样的控件,请大家帮帮忙~~
- 问一下,除了使用.net运行库的那几个语言外,还有哪门语言有XmlResolver、XmlReader、XmlWriter这类型的类?
- VC2003或2005编译的代码能否改到VC6.0使用?
- 如何使用VC开发电子邮件接收程序(含附件)?谢谢。
- 一个工程里的Dlg和其上面的已经布置好位置的控件 有什么方法方便的复制到另一个工程里去???
- 用CEdit类,属性为disabled 或readonly的时候,背景色如何变?目前始终为灰色
- 请问如何判断一个指定目录是否存在?
- 公司想要起个名称。但是总也不合适。大家帮个忙起个又酷又衰名字。不过可千万别说灵啊凤阿的。
- Windows程序退出时...Help!
- 在VC++6.0中可以使用正则表达式吗?
- 请各位概括一下*****Template****的意义 和 用法(with little code)
1,3 我也关注!
可以!
to 3
是一样的!
也是可以的!不然还用什么VC就是因为它可直接用,而不用象VB 还要申明!
而第3條問題, 你寫過Visual Basic的applicaton都應知道, VB大量使用ActiveX控件, 基本界的大部分工作都交由ActiveX控件包辦, 但當然可以呼叫Win32API.
declare sub "TextOut" lib "gdi32.dll" alias "TextOutA"(byval hDC as long, byval str as string, byval len as long)
只要開一個Module並加入以上的代碼, 程式中就可以呼叫TextOut, 都應該算是直接吧, VB把他再你用時才載入!!!
但VB中, 你要用那個Function, 就必需先:
declare sub "TextOut" lib "gdi32.dll" alias "TextOutA"(byval hDC as long, byval str as string, byval len as long)
...
之後再用
private sub form_paint()
dim hdc as long
hdc = GetDC(hwnd)
TextOut hdc, "Hello", 5
ReleaseDC hwnd, hdc
end sub
如果要想学WIN32 API 看什么书最好???
如果要想学WIN32 API 看什么书最好???
看什么书都不最好,最好是实践
请各叔叔,阿姨,哥哥,姐姐,弟弟,妹妹们多多帮忙了!!
清华大学出版
microsoft corporation 著
这里有英版的下载: http://bigluo.tz163.net/download/prog-windows.zip
Using C and the native APIs is not the only way to write programs for Windows 98. However, this approach offers you the best performance, the most power, and the greatest versatility in exploiting the features of Windows. Executables are relatively small and don't require external libraries to run (except for the Windows DLLs themselves, of course). Most importantly, becoming familiar with the API provides you with a deeper understanding of Windows internals, regardless of how you eventually write applications for Windows. Although I think that learning classical Windows programming is important for any Windows programmer, I don't necessarily recommend using C and the API for every Windows application. Many programmers—particularly those doing in-house corporate programming or those who do recreational programming at home—enjoy the ease of development environments such as Microsoft Visual Basic or Borland Delphi (which incorporates an object-oriented dialect of Pascal). These environments allow a programmer to focus on the user interface of an application and associate code with user interface objects. To learn Visual Basic, you might want to consult some other Microsoft Press books, such as Learn Visual Basic Now (1996), by Michael Halvorson. Among professional programmers—particularly those who write commercial applications—Microsoft Visual C++ with the Microsoft Foundation Class Library (MFC) has been a popular alternative in recent years. MFC encapsulates many of the messier aspects of Windows programming in a collection of C++ classes. Jeff Prosise's Programming Windows with MFC, Second Edition (Microsoft Press, 1999) provides tutorials on MFC. Most recently, the popularity of the Internet and the World Wide Web has given a big boost to Sun Microsystems' Java, the processor-independent language inspired by C++ and incorporating a toolkit for writing graphical applications that will run on several operating system platforms. A good Microsoft Press book on Microsoft J++, Microsoft's Java development tool, is Programming Visual J++ 6.0 (1998), by Stephen R. Davis. Obviously, there's hardly any one right way to write applications for Windows. More than anything else, the nature of the application itself should probably dictate the tools. But learning the Windows API gives you vital insights into the workings of Windows that are essential regardless of what you end up using to actually do the coding. Windows is a complex system; putting a programming layer on top of the API doesn't eliminate the complexity—it merely hides it. Sooner or later that complexity is going to jump out and bite you in the leg. Knowing the API gives you a better chance at recovery. Any software layer on top of the native Windows API necessarily restricts you to a subset of full functionality. You might find, for example, that Visual Basic is ideal for your application except that it doesn't allow you to do one or two essential chores. In that case, you'll have to use native API calls. The API defines the universe in which we as Windows programmers exist. No approach can be more powerful or versatile than using this API directly. MFC is particularly problematic. While it simplifies some jobs immensely (such as OLE), I often find myself wrestling with other features (such as the Document/View architecture) to get them to work as I want. MFC has not been the Windows programming panacea that many hoped for, and few people would characterize it as a model of good object-oriented design. MFC programmers benefit greatly from understanding what's going on in class definitions they use, and find themselves frequently consulting MFC source code. Understanding that source code is one of the benefits of learning the Windows API.
——《Programming Windows》
WIN32的块小,但效率和灵活性更强.
DX 的接口与 Win32 API 有什么不同??
DX是COM形式的接口,与API(纯C)完全不同。
请大家推一下这个帖子:http://www.csdn.net/expert/topic/385/385474.shtm拜托了》》》》》》》
主要是数据类型的不同,很大的不同。
比如VC 的int对应VB的long,而不是Integer