窗口变化,部分控件随着与右边框和上边框保持固定距离的方法

来源:互联网 发布:unity3d 遮挡透明 编辑:程序博客网 时间:2024/06/07 23:39
在OnSize()函数中添加
CRect rc1;
GetClientRect(&rc1);//获取窗口客户区的坐标
int WindowWidth=rc1.Width();
int WindwoHeight=rc1.Height();
GetDlgItem(IDC_BUTTON1)->MoveWindow(WindowWidth-200,100,60,30,1);
原创粉丝点击