+2  A: 

Call SystemParametersInfo() with SPI_GETSNAPTODEFBUTTON

Anders
Although I guess both solutions would work on all modern versions of Windows, I think this one is the better. Even if it is not faster (well, it might be, but anyhow performance it not an issue here), compatibility between OS versions is probably superior with this solution.
Andreas Rejbrand