I've tested the code in the first post of this page, and I do get the correct refresh rate of my monitor. Hope this helps.
http://stackoverflow.com/question...get-the-refresh-rate-of-a-monitor
I'd prefer to use the function "GetTickCount()" to limit the framerate with the info of the monitor refresh rate (if you don't want to use a fixed value)