movewindow 控件消失 10
CRectrect1,rect2;GetDlgItem(IDC_MYSTATIC)->GetWindowRect(&rect1);ScreenToClient(&rect...
CRect rect1,rect2;
GetDlgItem(IDC_MYSTATIC)-> GetWindowRect(&rect1);
ScreenToClient(&rect1);
GetDlgItem(IDC_MYSTATIC+4)-> GetWindowRect(&rect2);
ScreenToClient(&rect2);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MYSTATIC)->MoveWindow(rect2);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MYSTATIC+4)->MoveWindow(rect1);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_SHOW);
Sleep(1000);
为什么运行时控件会消失,要等到sleep完了之后才会显示??? 展开
GetDlgItem(IDC_MYSTATIC)-> GetWindowRect(&rect1);
ScreenToClient(&rect1);
GetDlgItem(IDC_MYSTATIC+4)-> GetWindowRect(&rect2);
ScreenToClient(&rect2);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MYSTATIC)->MoveWindow(rect2);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_MYSTATIC+4)->MoveWindow(rect1);
GetDlgItem(IDC_MYSTATIC)->ShowWindow(SW_SHOW);
Sleep(1000);
为什么运行时控件会消失,要等到sleep完了之后才会显示??? 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询