C++ preprocessor and template identifiers

A couple of hours of tracking down a compiler error a couple of days ago taught me something about the preprocessor I’d like to pass on so others can avoid the … learning :).  I kept getting confronted by “constant expression must be followed by a ,”. Not the exact error but in the right…

0

Dispose vs Delete

Programs allocate resources for use during execution.  The problem with resources is that they are limited and often times need to be recycled.  Languages devise constructs and patterns for developers to periodically free up resources so that their programs can continue running.  In Native C++ you typically dealt with two kinds of resources that needed…

1

LUA + MSI + Luanch program now on Vista

I’m a huge fan of the LUA support in Vista.  It has it’s quirks but it’s a major step forward for Windows programming.  As a former *nix guy I’ve had to run LUA the hard way before Vista.  The support in Vista is tons better than it used to be.   There are a few areas…

0

Using PowerShell to update ACLS

I’ve been an avid fan of running as a limited user account (LUA) for almost all of my computing career.  It’s in large part a holdover from my *NIX days but it’s an important practice for Windows as well. I’m very excited about this being the default for Windows going forward starting with Vista.  The bad…

2

ComboBox SelectedItem, SelectedValue, SelectedWhat???

ComboBox has a lot of helpful properties that allow you to get access to items selected by the Control.  The problem is knowing which one is best in which scenario.  The documentation is not 100% clear on what the values will be in various situtations.  The most important factor to know is whether or not…

0

Using PowerShell to automate redundant tasks

It’s nice to have powershell when you need to do a lot of redundant file work.  I’m use Subversion as the source code control backing for a lot of my hobby projects.  I have pretty much all the code I’ve ever written as a hobby or for school stored in SVN.  The biggest downside to…

0

Responding to Windows Shutdown

.Net 2.0 Added a lot in the way of allowing programmers to easily interact with Windows.  One of the best additions is the Microsoft.Win32.SystemEvents class.  It holds events for a lot of system relatied events (hence the name).  A common scenario I see on the forums is users wanting to respond to a system shutown…

0

Custom ComboBox

This is another forum request.  I’ve seen multiple requests from users who are looking to customize the drop down window for the ComboBox control.  There is no builtin way to do this with the existing control.  Instead you must create a custom solution. Start by adding a new UserControl to your windows application or library…

2

PowerShell Tutorial

PowerShell is an exciting product coming out of Microsoft.  It’s a shell technology many old *nix junkies will find refreshing and very intuitive.  It’s based on .Net and has a syntax feels like a mix between Pearl, C# and VB.  I’ve blogged about it before but due to several extraneous factors I stopped using it…

0

LinkButton

A highly rated post on the VB MSDN Forum recently asked “How can I open up a web browser when a user clicks on a button?”  The first problem is “How can you start a web browser to a specified URL”.  This is actually very easy to do in windows.  You only need to create a…

1