Totally agree. I worked for a while with pure Win32. Once you get the hang of it it’s quite consistent and pretty well thought out. Also agree about the documentation. Seems MS is determined to make it worse every year, break more links and provide less useful information. The old MSDN CDs were a piece of beauty.
Re:Fibers: An Elegant Windows API
by scarface74 on Friday March 29, 2019 @11:31AM
(#19522520)
Consistency?
Let’s start with strings...
- the standard null terminated single byte char C string
- the double wide null terminated C string required for dome frameworks - especially Windows CE
- the COM BSTR where the first two bytes are the length
- the ATL bstr_t
- CString that isn’t a null terminated C string
- of course the C++ string class. I’m not sure if this is ever used by the Win32 APIs
I’m sure I’m missing one.
TCHAR probably counts because, even though it's just a typedef for char or wchar_t, it has its own t-prefixed APIs and mental overhead of having to write code that can work with either character size.
Re:Fibers: An Elegant Windows API
by Impossible on Friday March 29, 2019 @12:31PM
(#19523124)
If you count various flavors of UWP (C++/CX, C++/WinRT, WRL) you can add std::wstring and Platform::String^
Don't forget HSTRING, which Platform::String^ is built on. They added those two in Windows 8 because there was no one standard string type. (Not joking.)
Re:Fibers: An Elegant Windows API
by xpaulbettsx on Friday March 29, 2019 @08:16PM
(#19526703)
UNICODE_STRING too - https://msdn.microsoft.com/en-us/windows/desktop/ff564879
Re:Fibers: An Elegant Windows API
by scarface74 on Friday March 29, 2019 @08:38PM
(#19526797)
So there is also the OEM_STRING and the ANSI_STRING
Re:Fibers: An Elegant Windows API
by TravHatesMe on Friday March 29, 2019 @11:10AM
(#19522340)
.NET and WPF are an abstraction of win32, I view it as a step in the right direction. How did .NET people cause everything to go downhill?
Especially WPF is not an abstraction of Win32. Maybe Winforms could be called that but certainly not any of the XAML dialects.
Re:Fibers: An Elegant Windows API
by TravHatesMe on Friday March 29, 2019 @11:55AM
(#19522737)
WPF is deeply integrated with Win32. For example it abstracts away the win32 message pump design. I'd call that an abstraction.
Yes, it abstracts it to the extent that it doesn't resemble Win32 anymore. It's something else.
Re:Fibers: An Elegant Windows API
by jjaredsimpson on Friday March 29, 2019 @02:31PM
(#19524277)
I would have to agree. Win32 is immediate mode, while WPF is retained scene graph.
It's not an abstraction its a complete overhaul.
MFC is an abstraction to me.
As far as I know WPF is built on Direct whereas MFC and Winforms are based on Win32.
Re:Fibers: An Elegant Windows API
by jjaredsimpson on Saturday March 30, 2019 @08:38AM
(#19529103)
That's my understanding as well. Point spy at a WPF app and you see one top level HWND which is just hosting a DX context
WPF is a lot closer to an abstraction over Direct2D than Win32. If you use both of those APIs a lot, you start to realize they have a lot of classes with the same name that do the same thing.
Re:Fibers: An Elegant Windows API
by contextfree on Friday March 29, 2019 @05:06PM
(#19525684)
The difference is that WinForms uses some of the actual higher-level UI widgets and layout system from Win32/USER, WPF just uses its message pump and other low-level windowing/IO routing mechanisms, and builds all its own bespoke composition, layout and controls on top of that.
A biggest issue with working on older Windows APIs is that modern web-based MSDN documentation is simply awful and the best you can do is to find old MSDN CDs/DVDs that often contained more information than the site (especially articles), better organization and -especially- much faster interface (being local and all, but also the cdroms around late 90s / early 2000s were in CHM format are lightweight). And 99.999% of the documentation you'll find on these CDs will have the same text as the documentation (if it still there) on MSDN (and very often the same text that is on the much older WinHelp WIN32SDK.HLP files too).
Like most things Microsoft on desktop, everything went downhill since .NET people took over and decided to redo things their way (yes, .NET brought some nice things too, but it created an internal schism - before .NET became a thing, desktop tech in Windows was mostly coherent) and now history is repeated with UWP.