当前位置: 动力学知识库 > 问答 > 编程问答 >

c++ - Get the "padding" around a control

问题描述:

I use win32 to generate my interface.

I'm looking to get the padding that windows naturally puts around controls. For example, in a tabcontrol the height of the tabcontrol includes the height of the border at the top and the height of the tab headers at the top. Same goes for buttons.

I'd like to know how I can find the exact height of these extra paddings before I create the actual control, as I need to add them to the height and width so that the client area of the control is the right size after creation to host content which has a static exact size.

网友答案:

Refer to AdjustWindowRect for adjusting windows for padding.

分享给朋友:
您可能感兴趣的文章:
随机阅读: