The actual problem I\'m trying to solve is, I want to automatically find out the size of the margins around windows. If you can find a better way, please by all means answer
first, you call GetClientRect to retrive the client rectangle R1, then call AdjustWindowRectEx to calculate the accurate bounds according to R1.