On 10/30/2011 4:03 AM, Jacob Carlborg wrote:
On 2011-10-29 22:11, Adam Wilson wrote:
WPF isn't the native GUI, it just comes with skins that emulate the look of the native GUI. The native GUI in Windows is called Win32 GDI (Graphices Device Interface). WPF is built on top of DirectX which is analagous to OpenGL and is primarily used for games. DirectX completely bypasses the GDI and communicates directly with the hardware. It's primary claim to fame is that it is fast, but it's not as compatible, whereas GDI is compatible with everything that implements VESA (which is everything since the early 90's), but it's slow.

We don't have to argue about this but it sounds like WPF is a new native GUI, especially if it bypasses GDI.
That's not the issue. The "nativeness" isn't regarding GDI vs. DirectX, but it's regarding the _windowing_ framework itself (which is separate from, although related to, the graphics framework).

_Native_ windows use the _system_ window classes (e.g. SysListView32) to display themselves to the user. WPF (which uses DirectX) and GTK (which uses GDI) and most frameworks, on the other hand, don't -- rather, they try to /look/ like native windows by creating custom windows and intercepting all of the drawing operations.

And, of course, they fail. This is indeed hard to notice on XP, but it's blindingly obvious on Windows Vista and later, because, for example, the buttons no longer "feel" native, even though they might "look" native -- e.g. the way they fade or get depressed (the timeout, the fade colors, etc.), the way they get focused, etc. is completely out of sync with the rest of the system's looks.

Since native controls use GDI internally, they obviously can't be drawn with DirectX. But the key point is that the inverse is not true -- if something uses GDI (e.g. GTK), that doesn't mean it's native. So no, WPF is not "native" in any way, and neither is GTK -- the only "native" frameworks are those that use the built-in windowing classes, which include MFC, ATL, SWT, and (I /think/) Qt. Most other frameworks don't do this.

Reply via email to