Disclaimer: I do not specialize in [desktop] GUI design, but have to do it on occasion. I have seen co-worker's dialogs worse than the once I created, and my major problem with them is that they can be unnecessarily big, and things do not line up.
To be more specific, I mostly do it in .Net Winforms, but occasionally with MFC(C++) as well. My simple heuristic so far is: I try to make the sizes and positions divisible by 10 ... or 5 if I have to. Something like a Label would be an exception, for it knows its own size. I find that things mostly look OK after I am done (of course there are other considerations such as grouping things intelligently, etc.), and I am satisfied because I know that every control has non-random position, and my OCD can now go back to sleep.
Somewhere at work I found a guide from MSFT about ideal spacing between things. Sorry, I do not have a source for it available. It has many rules, such as (for instance) 2 pixels between a button and a border, 3 pixels between two buttons horizontally, 4 pixels vertically, unless ... it is pretty complicated and not practical to remember. Additionally, I simply do not trust that MSFT knew much about GUI design, not until they hired an ex-apple person to help them design the ribbons for Office 2007, etc.
What rules/heuristics do you follow? References to short articles and other links are welcome.