开发者

Differences between visual component library(vcl) and WinApi

Is there any difference between 开发者_运维知识库using vcl components in Delphi and WinApi functions to create gui application.


@Azad I think there are 2 big differences: the first is the ease of use of the VCL that enables you to drag and drop controls on a form (window), change its properties and assign events, giving you high productivity in the development of the GUI.

The other big difference is the size of the final application, if you create an application using only WINAPI calls, your final application will be smaller than using the VCL.

I recommend you see the project KOL (KOL - Key Objects Library is a set of objects to develop power (but small) 32 bit Windows GUI applications using Delphi but without VCL (or Free Pascal). It is distributed free of charge, with source code.).

Differences between visual component library(vcl) and WinApi


(source: kolmck.net)


Almost all real-world Delphi applications use the VCL, and also make OCCASIONAL direct calls to the Win32 API. The VCL framework calls Win32 calls, in the end, anyways. So, you will almost always be using both.

The guy who mentioned KOL is suggesting yet another "middle" layer, because going direct is sublimely painful.

Microsoft has (in historical order), MFC, and ATL for C++, and .NET for the C#/VB.net language, as "framework" layers that live between your application and the raw Win32 API, for their MS Visual Studio products.

People who write anything more complicated than Notepad.exe going straight to the "metal" (Win32 API raw) are rare. So, it's harder, it takes longer to learn, and do everything. And in the end, it's not significantly faster or better. If you really need to be small (like you are writing a virus) maybe you might want to go Win32 native.


The VCL is a complete framework wrapping the Windows API and insulating the developer from the gory details, making it so much easier to develop Delphi applications.
You gain big in productivity and compatibility over Windows version changes...


Well, sure, VCL requires a Borland compiler. The Win32 API works for any language. The point of using a GUI class library, like VCL, is to make the effort of creating a GUI enabled program easier. Doing so using only Win32 is quite punishing.


time, time and then even more time.


You use WinAPI to do things that VCL is not "able" to do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜