Entrian Solutions
 

Archive for July, 2008

Entrian Source Search 0.95 Beta

Wednesday, July 23rd, 2008 by Richie Hindle

I’m happy to announce the release of the next Beta version of Entrian Source Search, 0.95.  In this release you’ll find these fixes and enhancements:

  • Fixed a crash when indexing source files under German Windows (thanks, Sebastian).
  • The size and position of tooltips is now correct under Windows Vista.
  • Fixed the appearance of the ‘Dock me’ hint on systems using large fonts (thanks, Andrew).
  • The default key bindings now include AltGr as well as Alt as the modifier, for one-handed operation on keyboards with AltGr keys (thanks, Andrew).
  • Ensured that all MessageBoxes have suitable icons.
  • Fixed a bug where the tooltips could flicker when the mouse cursor was over them.

As always, you can download the addin here.

C++, MFC, sanity, insanity

Wednesday, July 2nd, 2008 by Richie Hindle

One of the really nice things about C++ compared with C is the existence of constructors. In C, if you say:

struct
{
    int count;
}
thing;

then thing.count holds a random value until you set it to something. In C++, that doesn’t happen because any sane class has a constructor that sets the member variables to sensible default values:

class Thing
{
    Thing(void)
    {
        count = 0;
    }
    int count;
};

You can’t create a Thing with a random count because the constructor gets called automatically.

MFC is Microsoft’s C++ framework for Windows development. It’s very widely used, mature and stable. It has a class CRect to represent a rectangle. And does its default constructor set the coordinates to sensible default values? Does it hell. Does it even set them to known insane values, to immediately alert you when you forget to initialise them, or when you naturally assume that the default constructor is sane? Does it hell.

Thank you whoever at Microsoft made that decision. You just cost me about 6 hours of my life.