DialogLayout is a simple layout manager which works with what the Win32
// API calls "dialog logical units" (DLUs). DLUs are resolution independent
// coordinates which work well for laying out controls on a dialog box. The
// mapping from DLUs to pixels is based on the font in use in the dialog box.
// An x-coordinate DLU is described as 1/4 (.25) of the of the average character
// width of the font used in the dialog. A y-coordinate DLU is described as
// 1/8 (.125) of the character height used in the dialog. One tricky issue to
// note: The average character width is not the average of all characters --
// rather it is the average of all alpha characters both uppercase and
// lowercase. That is, it is the extent of the string "a...zA...Z" divided
// by 52.
/*DialogLayout类是一个简单的布置管理器,用来配合Win32 API中的对话框逻辑单位(DLU)工作。对话框逻辑单位是与分辨率无关的坐标单位,它对于对话框中控制部件的布置很有作用。从DLU到象素有一个映射,此映射是基于对话框所用的字体的。DLU的一个X方向的坐标单位相当于对话框中所用字体的平均宽度的1/4,Y方向的坐标单位相当于对话框对话框所用字体高度的1/8。注意字体平均宽度的计算并非是所有字符的平均,而是字母a…z(包括大写)的宽度的平均,换句话说,它等于字符串”a…zA…Z”的长度除以52。