Tuesday, September 27, 2011

Win32

One of my (ex) coworkers had to get up to speed on Windows programming and learned enough of the Win32 API (not MFC, or not much of MFC if I recall) to get the job done.

I spent last night perusing some Win32 tutorials and it doesn't look that hard. It has its own special weird things you have to do "just because", and the event handling is called message handling but other than that it looks rather analogous such that it wouldn't be too tough to get familiar in a hurry if I had a free weekend.

The way it handles messages is (at first glance) organized different than how GTK does it. In GTK you explicitly list all the signals you want to catch and pair it with a callback function. In Win32 you have one callback function paired to a window and in that callback function you use a big switch statement to handle any incoming messages.

The reason I mention this is that I'm still really fuzzy on all these Windows programming options. I know that .net is a framework and MFC is sort of the C++ option for Win32 (right?) but I have no idea what WPF or COM or any of those other TLA mean (beyond a quick Google search anyways).

As an amateur level hobbyist programmer that wants to evolve beyond simple ~100 line console programs to useful GUI-based programs that do interesting things I feel very nervous about hitching my wagon to one particular OS-specific framework. I picked GTK because it has decent cross-platform support (excluding OS X unfortunately) but it concerns me I almost never see programs for Windows written in GTK.

I'm just being paranoid about spending time learning something that isn't useful in a lot of situations. That being said I'm happy that the time spent with GTK at least allowed me to understand the Win32 API on a superficial level.

No comments:

Post a Comment