I have never been sure using system metrics how to align objects on a form correctly. I always seem to find myself adding a fudge here and there to get things just perfect.
To align things horizontally I use the following:
To align things vertically I use the following:
Is this the correct way to center objects on a form?
Thanks.
To align things horizontally I use the following:
Code:
(SM_CXEDGE + SM_CXFRAME) object (SM_CXFRAME + SM_CXEDGE)
To align things vertically I use the following:
Code:
SM_CYEDGE
+
SM_CYFRAME
+
SM_CYCAPTION
object
SM_CYFRAME
+
SM_CYEDGE
Is this the correct way to center objects on a form?
Thanks.