能否自己顶一下呢?
如果一个一个移动,代码大致如下:
//曲线选择区
pWnd = GetDlgItem(IDC_IconArea);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
WinRight -= rect.Width();
pWnd->MoveWindow(WinRight,rect.top,rect.Width(),WinBottom-WinTop+7);
//参数显示区
pWnd = GetDlgItem(IDC_STATIC_Par);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
// WinRight-=5;
WinBottom-=rect.Height();
TmpWidth =WinRight-10-WinLeft;
TmpHeight =rect.Height();
pWnd->MoveWindow(WinLeft,WinBottom,TmpWidth,TmpHeight);
//Sn
pWnd = GetDlgItem(IDC_STATIC_SN);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10,WinBottom+20,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_Sn);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
//Kn
pWnd = GetDlgItem(IDC_STATIC_KN);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+TmpWidth/7,WinBottom+20,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_Kn);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+TmpWidth/7,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_STATIC_KNu);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+TmpWidth/7+60,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
//Bn
pWnd = GetDlgItem(IDC_STATIC_BN);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+2*TmpWidth/7,WinBottom+20,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_Bn);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+2*TmpWidth/7,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_STATIC_BNu);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+2*TmpWidth/7+60,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
//Wn
pWnd = GetDlgItem(IDC_STATIC_WN);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+3*TmpWidth/7,WinBottom+20,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_Wn);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+3*TmpWidth/7,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_STATIC_WNu);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+3*TmpWidth/7+60,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
//Head
pWnd = GetDlgItem(IDC_STATIC_HEAD);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+4*TmpWidth/7,WinBottom+20,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_Head);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+4*TmpWidth/7,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_STATIC_HEADu);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+4*TmpWidth/7+60,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
//End
pWnd = GetDlgItem(IDC_STATIC_END);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+5*TmpWidth/7,WinBottom+20,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_End);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+5*TmpWidth/7,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_STATIC_ENDu);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+5*TmpWidth/7+60,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
//Unit
pWnd = GetDlgItem(IDC_STATIC_UNIT);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+6*TmpWidth/7,WinBottom+20,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_Unit);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+6*TmpWidth/7,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
pWnd = GetDlgItem(IDC_STATIC_UNITu);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+10+6*TmpWidth/7+60,WinBottom+5+TmpHeight/2,rect.Width(),rect.Height());
//HSet
pWnd = GetDlgItem(IDC_HSet);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
WinBottom -= 10; //改变WinBottom
pWnd->MoveWindow(WinLeft,WinBottom-rect.Height(),rect.Width(),rect.Height());
//HScalEdit
pWnd = GetDlgItem(IDC_HScalEdit);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+20,WinBottom-3*rect.Height()/2,rect.Width(),rect.Height());
//HScalCtrl
pWnd = GetDlgItem(IDC_HScalCtrl);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+40,WinBottom-3*rect.Height()/2,rect.Width(),rect.Height());
//VSet
pWnd = GetDlgItem(IDC_VSet);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
//VScalEdit
pWnd = GetDlgItem(IDC_VScalEdit);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+20+TmpWidth/9,WinBottom-3*rect.Height()/2,rect.Width(),rect.Height());
//VScalCtrl
pWnd = GetDlgItem(IDC_VScalCtrl);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+40+TmpWidth/9,WinBottom-3*rect.Height()/2,rect.Width(),rect.Height());
//Capture
pWnd = GetDlgItem(IDC_Capture);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+2*TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
//CtrlCCD
pWnd = GetDlgItem(IDC_CtrlCCD);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+3*TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
//LoadData
pWnd = GetDlgItem(IDC_LoadData);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+4*TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
//SaveData
pWnd = GetDlgItem(IDC_SaveData);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+5*TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
//PutBitmap
pWnd = GetDlgItem(IDC_PutBitmap);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+6*TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
//SUB_BJ
pWnd = GetDlgItem(IDC_SUB_BJ);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+7*TmpWidth/9,WinBottom-2*rect.Height()-8,rect.Width(),rect.Height());
//Get_BJ
pWnd = GetDlgItem(IDC_GET_BJ);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+7*TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
//IDOK
pWnd = GetDlgItem(IDOK);
pWnd->GetWindowRect(rect);
ScreenToClient(rect);
pWnd->MoveWindow(WinLeft+8*TmpWidth/9,WinBottom-rect.Height(),rect.Width(),rect.Height());
....还没完,正在编写中!
但是如果能找到我说道那个“容器”,那么十多行代码就解决问题了
墨镜墨镜告诉我,高手到底在哪里?