Hacker News new | ask | show | jobs
by sureshv 3307 days ago
That's because WPF like winforms used native windows controls under the hood. Calls would be marshaled via pinvoke.
2 comments

Simplest way to verify, launch visual studio 2015, press Tools/Spy++, in Spy++ find the visual studio’s main window, you’ll see that Win32 thinks visual studio is a single window with no children, with class starting with “HwndWrapper[DefaultDomain;”

Unlike that, Spy++ itself uses Win32 (wrapped by MFC but it doesn’t matter) for GUI, you’ll see these SysTreeView32, msctls_statusbar32 and other native controls there.

I stand corrected - thank you. I don't have a windows machine anymore but as you said spy++ can tell you all you need to know. Hilarious to still see hungarian (hwnd - handle to a window).
While interop is indeed available if you need to consume a Win32 control (not without limitations but generally works), by default WPF doesn’t use native controls. Instead it paints stuff on GPU with Direct3D 9, and on top of that implements its own markup, styling, layout, animation, behaviors, composition, etc…
Thanks - I haven't touched windows desktop UI since GDI was the mechanism for drawing.