Geeks With Blogs


Google My Blog

Catch me at: The List!

My InstallScript Utility Belt My Amazon Wishlist
My Standard Disclaimer

Chris G. Williams Beware: I mix tech and personal interests here.

The title of this blog post is a lie. I don't actually love MFC C++, in fact I think it's safe to say I hate it. Hate may actually not be a strong enough word... but it's the best I can do at the moment.

Recently, I had the pleasure of having to come up with a printing solution for Windows Mobile 6.5 devices. For those of you not in the know (which until recently included yours truly) there's no printing capability in Mobile IE 6. As in... NONE. There's no print option hiding on a menu somewhere, and even Window.Print() in JavaScript won't help.

The solution, ultimately, was to create an ActiveX control. This control would accept a string and generate printer commands and write a file to the appropriate com port. The choice was made to use MFC C++ to create this ActiveX control. A very simple prototype was created and handed off to me to enhance and finish.

No problem, right? Well except for one issue... I didn't know C++ and certainly didn't know the hell that was awaiting me in the land of MFC C++. What twisted sadist created this "language"?

I'll admit, I'm not what you would call a "languages geek" though I have friends that are. One of them introduced me to several especially interesting languages. One language in particular is called BrainFuck. It's aptly named, and were it possible to use it to build ActiveX controls, that would still be preferable to working with MFC C++.

Even the simplest concepts are ridiculously complex. String manipulation? Please. I never knew how ridiculously spoiled I had gotten after years of VB.NET and C#... Nobody should ever be forced to jump through the hoops that MFC C++ requires.

In fact, if we still have terrorists and "political prisoners" stashed away in the Guantanamo Bay Detention Camp, I'm going to recommend we skip the waterboarding and go straight to making them debug MFC C++ ActiveX controls for a few hours. That will get the answers you're looking for... with only minimal psychological and emotional damage.

Posted on Wednesday, March 23, 2011 11:10 AM | Back to top

Comments on this post: How I learned to stop worrying and love MFC C++

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Chris G. Williams | Powered by: