I've been using the Windows API for quite sometime, maybe it's just me that's feeling like someone who has been abused but keeps returning due to a big user base and promises of success due to the user base size. I know it uses Hungarian notation to make our meaningless development worth while but still. Am I the only one that feels as if it's a cluster $#@!. Especially when doing GUI that doesn't involve the standard GDI. :| I surely can't be the only one feeling this.
Small thing but still raises the question, BUT WHYYYY!
I continuously tell people not to use the WinAPI directly if they can help it. There's an abstraction layer for just about everything.
I should mention that the GUI is probably the only exception even though there are libraries to abstract it away. Those libraries tend to be very clunky and most only emulate the feel of a native window.
I should also mention that if this doesn't truly affect the result of your application, you should take those penalties for the sake of portability and flexibility.
I've been meaning to get the heck out of using the WINAPI directly. But I don't like having such abstraction hanging in my code when I'm using an extra layer. T_T I guess I'll never learn. Regardless I've been meaning to jump into rather it's wxWidgets or something of that nature, although I have this thing where if it's in an external library then I don't want to know it. I Guess I'm a bit of purist when it comes to designing software lol.
Multiplatform libs are the way to go, but at what cost you know. I'm sure that the libs have a whole crapton of #ifdef in them to check operating system specifications but there's just something so wrong when it comes to having that whole abstraction layer. Makes me feel dirty in a sense. Maybe it's just me?
I don't think it's that bad once you learn what the various components of the api are capable of and how to read the documentation. There is alot of boilerplate stuff that you probably memorize but for everything else you have to look at the documentation.
By the way, doesn't the gui use direct2d now instead of GDI? Most of the modern api is com-based.
That third-party layer is almost at no cost. Like I said though, GUI libraries tend to not be that efficient. In most cases this doesn't matter... of course for games, a minimal windowing kit is fine like SDL or GLFW.
Abstraction done right has little to no cost, if not more efficiency. Don't be afraid code reuse and abstraction for the love of all that is holy.
Learning to read the documentation is the most difficult part of using WinAPI, after that you may go through a phase of being a Windows elitist but that eventually ends. At first I found the number of data typedef's to be annoying but that's what bookmarks are for. You probably shouldn't rack your brain trying to memorize this stuff when the MSDN is right there. I have learned that trying to mix the WinAPI and the MSCRT does lead to needless amounts of pain, so ask yourself what you mean about non-standard GDI.
There are a bunch of "#ifdef" blocks in most third party libs, header files are plain text so just open them up if you're curious. But you're not taking into account the amount of code optimization that a compiler does. As a general guide line code that isn't used gets thrown out, there is an exception to every rule but it's not something that you should be worried about until it's a problem.