//其他细节你自己搞吧
RECT rt1,rt2;
GetDlgItem(IDC_STATIC1)->GetWindowRect(&rt1);
GetDlgItem(IDC_STATIC)->GetWindowRect(&rt2);
ScreenToClient(&rt1);
ScreenToClient(&rt2);
if ((rt2.left-rt1.left)>0)
{
rt1.left+=5;
rt2.left-=5;
}else {
rt1.left-=5;
rt2.left+=5;
}
GetDlgItem(IDC_STATIC1)->MoveWindow(&rt1,TRUE);
GetDlgItem(IDC_STATIC)->MoveWindow(&rt2,TRUE);
Invalidate(FALSE);
UpdateData();