Monday, February 26, 2007

Cheek to Cheek, Sahara Hotnights


Finally a new song from Sahara Hotnights and it's fracking fabolous as well!

C++ Coding Conventions

Alright! I love coding conventions. Impossible to follow but a must have! Check out these from Ellemtel that are widely referenced on the internet and can be used as an excellent base for your own set of conventions!
  1. Programming in C++, Rules and Recommendations (pdf)
  2. Programming in C++, Rules and Recommendations (text)
I normally follow my own set of conventions for free-standing applications or libraries. But when coding in some existing codebase or using a framework like MFC I of course adapt to the current conventions. Because as you all already know the absolutly worst thing of all is code with different coding styles in it.

Web

Ok, since I don't normally do any web programming I haven't looked for or found that many great tutorials or sites. But I do understand that this topic should have the greatest number of online tutorials and guides! Feel free to recommend your favourite sites!

Anyway, the site I've found most useful so far is this one that covers topics like html, javascript, xml, ajax, asp, you name it...:
  1. W3Schools

Windows Localization

Windows localization is a fun subject. Have you ever tried to get your application working with more languages than hardcoded english you have probably approached the subject.

Here are two articles that covers the basics, well, even a bit more in fact! I've added them as well as a couple of other resources to the link section.

Character sets, written by Ken Fowles, Personal Systems Division, Microsoft
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets, written by Joel Spolsky and hosted at Joel on Software

Windows Hooking

I didn't now anything about hooking until I started working at my previous workplace. They had a product that included a plugin for Outlook Express, and since there is no official API published for OE the only way to implement a plugin is to use hooking!

Here are some interesting links:
  1. Hooks, at MSDN
  2. API hooking revealed, written by Ivo Ivanov and hosted at The Code Project
  3. Automating Windows Applications, by Igor Ladnik hosted at The Code Project
If you too are interested in hooking Outlook Express you should take a look at OEAPI from Nektra, it could save you a lot of time and trouble. I've played with the demo and it seemed to do what was promised!

Windows C Run-Time Libraries

If you are like me you forget this stuff all the time and have to look it up in MSDN.
  1. C Run-Time Libraries
  2. Win32 Equivalents for C Run-Time Functions

Game shops in Stockholm, Sweden

Tvspelsbutiker i Stockholm, här är dom bästa!

WEBHALLEN (tvspel, pcspel, alla sorters hårdvara, games and all kinds of hardware)
TV-SPELSBÖRSEN (tvspel och basenheter, games and consoles)
PSXCARE (modda din xbox!, console modding)
SPELBITEN (tvspel och basenheter, games and consoles)

Jo, alla stavar med stora bokstäver...

The list above is the best game shops in central Stockholm.

Windows Message Reflection

Windows controls frequently send notification messages to their parent windows. Message reflection allows these notification messages to be handled in either the child control window or the parent window, or in both.

Here are some MSDN articles on the subject:
TN062: Message reflection for Windows Controls
MFC ActiveX Controls: Subclassing a Windows Control

The topic is also discussed in the article Using the ATL windowing classes mentioned in the WTL section.

Windows Shell Extensions

Shell extensions are a real interesting subject to learn if you want to write applications that integrate well into windows. And that integration can be essential for good a user experience!


Another excellent series from Michael Dunn hosted at The Code Project:
  1. The Complete Idiot's Guide to Writing Shell Extensions
Here is a link to the MSDN coverage as well:
  1. Shell Programmer´s Guide
Update 20071120:
The above link doesn't seem to work any longer. Try this one instead:
  1. Shell Developers´s Guide

Thursday, February 22, 2007

World of Spectrum


World of Spectrum is an excellent retro game site covering the Sinclair ZX Spectrum. Check out the JZX or the ZZ Spectrum java emulators as an example!

Long Before Rock'n'Roll, Mando Diao


Yesterday me and my wife Johanna was at the Mando Diao concert at Nalen, Stockholm. It was a really great show and Long Before Rock'n'Roll is hereby pronounced title song for this blog!

Windows WTL

Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more.

Here is a link to an excellent CodeProject tutorial. Only the first part is linked to since at CodeProject it is real easy to navigate through a article series. (If it only could be that at MSDN as well...):
  1. WTL for MFC Programmers, Part 1 - ATL GUI classes, written by Michael Dunn at Codeproject
Andrew Whitechapel has some interesting articles hosted at Codeguru (create an account):
  1. Using the ATL windowing classes
  2. To WTL or not to WTL, that is the question

And then an interesting comparison between WTL and MFC:
  1. A Quick MFC and WTL comparison, by Kenn Scribner hosted at EnduraSoft

Wednesday, February 21, 2007

Windows COM and ATL

Alright! Lots of new links to my favourite windows subject! COM!

The Dr. GUI is the best tutorials ever written on the subject available online. There are a couple of books that may cover the subject better (like Inside COM, Essential COM and ATL Internals) but thats up for discussion.
  1. Dr. GUI. on Components, COM and ATL, written by Dr. GUI and hosted at MSDN
  2. Dr. GUI and ATL
  3. Dr. GUI and COM Automation, Part 1
  4. Dr. GUI and COM Automation, Part 2: COM´s fabulous Data Types
  5. Dr. GUI and COM Automation, Part 3: More on COM´s fabulous Data Types
  6. Dr. GUI and COM Events, Part 1
  7. Dr. GUI and COM Events, Part 2

And then som excellent architectural articles.
  1. From CPP to COM, written by Markus Horstmann, OLE Program Manager at Microsoft
  2. DCOM Architecture, by Markus Horstmann and Mary Kirtland, covers topics like mashalling and apartment models
  3. The Component Object Model: A Technical Overview, by Sara Williams and Charlie Kindel, Developer Relations Group Microsoft
  4. Understanding and using COM Threading Models, by Jason SMith, Software Design Engineer at Microsoft

A resonable good introduction to COM and ATL at MSDN
  1. Introduction to COM and ATL

A simple tutorial
  1. COM Clients: Concepts and Programming, By Robert Oberg hosted at Windows IT Library

And at last a bit off topic a link to MSDN´s ActiveX Controls documentation. The most interesting stuff here is maybe the statment that once and for all (?) tells us what an ActiveX control is!

"A Microsoft ActiveX control is essentially a simple OLE object that supports the IUnknown interface"
  1. ActiveX Controls

Update
I found an article series on DevCentral named An introduction to DCOM when looking into what Marshall Brain had written. It is adapted from the book Understanding DCOM by Marshall Brain and William Rubin.

Update 2
Further reading on The Code Project uncovered the article series COM in plain C which is a great article written by Jeff Glatt

Monday, February 19, 2007

Windows MFC

Added some new MFC links, both references and tutorials. The tutorials are:
  1. Introduction to MFC programming written by Marshall Brain and hosted by DevCentral (you need to create an account to read it). Hmm, DevCentral don't seem to be to active nowadays...
  2. Create your own controls - the art of subclassing written by Chris Maunder and hosted at The Code Project.
  3. Demystifying Subclassing, by Fritz Onion at pluralsight.

SC101

The previous posting got me thinking about hardware and especially my Netgear SC101. Why the hell does someone sell a device that supports mirroring of the disks but not the replacement of a mirrored disk when it fails?? Please tell me!!

And why can't Netgear release mac and linux drivers for it?

ZyXEL

I helped my parents install a ZyXEL 660H triple play modem, 320W router and a G202 USB adapter this weekend. They got it all "for free" when signing up for ADSL from Telia (ie Sweden). The modem was just to plugin. Then I connected the router by twisted-pair to my Dell and did the wizard setup. Somehow their "One-Touch Intelligent Security Technology", OTIST, got started as well which led to that neither my brothers iBook or the Dell using the G202 managed to connect (even though the network was visible but the SSID had some OTIST info string automatically appended to it). I tried to reset the security settings to No Security. But still it didn't work (network visible and no string automatically appended this time). So I started over and did a hard reset on the router. This time I choose the advanced setup and made sure to change no settings at all (since by default the radio should be on and NO security chosen). Still not working... Ok I checked the settings from top down and in Network->Wireless LAN there was a tab for MAC filter. And for some reason this was turned on to only allow the MAC addresses shown. But the list was empty. So I turned this feature off. And now everything worked at once! Both the iBook and the Dell connected effortlessly to the only wireless network in range.

So the correct steps to do this setup would be to choose advanced setup for the router, change default password and then just check the MAC settings so nothing strange is going on! Thats it! Leave everything else to default. (Observe that my parents is living on the countryside with no neighbours so thats why I'm running with zero security.)

The G202 USB adapter was a snap to install. Just follow the instructions and don't do anything to the default settings.

If I wanted to use a secure wireless network I would opt for the advanced setup as well and just change the security settings manually to WPA-PSK. I'll maybe get to try that in the future.

Friday, February 16, 2007

Windows DLL

Added a link to an excellent article Calling C++ DLLs from VC++ and VB written by Hans Dietrich and hosted at The Code Project.

Windows Win32

Ok I've added a Win32 links section to the right with references and tutorials. The tutorials are:.
  1. theForger's Win32 API Tutorial written by Brook Miles and hosted at winprog.
  2. Subclassing Win32 Common Controls written by Jurjen van Dijk.

Thursday, February 15, 2007

Game|Life


Chris Kohler runs an excellent gaming blog on Wired thats called Game|Life. Check it out!

When you were young

Alright, lets kickstart this blog with a Killers song that I've been listening to a lot lately!