- RECT rectCtl, rectDlg, rectCtl2;
- LONG movetop = 0;
- LONG moveright = 0;
-
- if (GetWindowRect(hPos,&rectDlg))
- {
- if (GetWindowRect(GetDlgItem(hPos, IDC_SAT),&rectCtl2))
- {
- if (GetWindowRect(GetDlgItem(hPos, IDC_MONITOR),&rectCtl))
- {
- movetop=rectCtl.top - rectCtl2.top;
- MoveWindow(GetDlgItem(hPos, IDC_MONITOR),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
- if (GetWindowRect(GetDlgItem(hPos, IDC_DISK),&rectCtl))
- {
- MoveWindow(GetDlgItem(hPos, IDC_DISK),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
- }
- if (GetWindowRect(GetDlgItem(hPos, IDC_STANDBY),&rectCtl))
- {
- MoveWindow(GetDlgItem(hPos, IDC_STANDBY),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
- }
- if (GetWindowRect(GetDlgItem(hPos, IDC_HYBERNATE),&rectCtl))
- {
- MoveWindow(GetDlgItem(hPos, IDC_HYBERNATE),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
- }
- if (GetWindowRect(GetDlgItem(hPos, IDC_MONITORDCLIST),&rectCtl2))
- {
- movetop=movetop-8;
- if (GetWindowRect(GetDlgItem(hPos, IDC_MONITORACLIST),&rectCtl))
- {
- moveright=rectCtl.right - rectCtl2.right;
- MoveWindow(GetDlgItem(hPos, IDC_MONITORACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
- if (GetWindowRect(GetDlgItem(hPos, IDC_DISKACLIST),&rectCtl))
- {
- MoveWindow(GetDlgItem(hPos, IDC_DISKACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
- }
- if (GetWindowRect(GetDlgItem(hPos, IDC_STANDBYACLIST),&rectCtl))
- {
- MoveWindow(GetDlgItem(hPos, IDC_STANDBYACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
- }
- if (GetWindowRect(GetDlgItem(hPos, IDC_HYBERNATEACLIST),&rectCtl))
- {
- MoveWindow(GetDlgItem(hPos, IDC_HYBERNATEACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
- }
- }
- if (GetWindowRect(GetDlgItem(hPos, IDC_GRPDETAIL),&rectCtl))
- {
- MoveWindow(GetDlgItem(hPos, IDC_GRPDETAIL),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
- }
- }
- }
- }
- }
- }
+ RECT rectCtl, rectDlg, rectCtl2;
+ LONG movetop = 0;
+ LONG moveright = 0;
+
+ if (GetWindowRect(hPos,&rectDlg))
+ {
+ if (GetWindowRect(GetDlgItem(hPos, IDC_SAT),&rectCtl2))
+ {
+ if (GetWindowRect(GetDlgItem(hPos, IDC_MONITOR),&rectCtl))
+ {
+ movetop=rectCtl.top - rectCtl2.top;
+ MoveWindow(GetDlgItem(hPos, IDC_MONITOR),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
+ if (GetWindowRect(GetDlgItem(hPos, IDC_DISK),&rectCtl))
+ {
+ MoveWindow(GetDlgItem(hPos, IDC_DISK),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
+ }
+ if (GetWindowRect(GetDlgItem(hPos, IDC_STANDBY),&rectCtl))
+ {
+ MoveWindow(GetDlgItem(hPos, IDC_STANDBY),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
+ }
+ if (GetWindowRect(GetDlgItem(hPos, IDC_HYBERNATE),&rectCtl))
+ {
+ MoveWindow(GetDlgItem(hPos, IDC_HYBERNATE),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
+ }
+ if (GetWindowRect(GetDlgItem(hPos, IDC_MONITORDCLIST),&rectCtl2))
+ {
+ movetop=movetop-8;
+ if (GetWindowRect(GetDlgItem(hPos, IDC_MONITORACLIST),&rectCtl))
+ {
+ moveright=rectCtl.right - rectCtl2.right;
+ MoveWindow(GetDlgItem(hPos, IDC_MONITORACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
+ if (GetWindowRect(GetDlgItem(hPos, IDC_DISKACLIST),&rectCtl))
+ {
+ MoveWindow(GetDlgItem(hPos, IDC_DISKACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
+ }
+ if (GetWindowRect(GetDlgItem(hPos, IDC_STANDBYACLIST),&rectCtl))
+ {
+ MoveWindow(GetDlgItem(hPos, IDC_STANDBYACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
+ }
+ if (GetWindowRect(GetDlgItem(hPos, IDC_HYBERNATEACLIST),&rectCtl))
+ {
+ MoveWindow(GetDlgItem(hPos, IDC_HYBERNATEACLIST),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top-movetop,rectCtl.right-rectCtl.left-moveright,rectCtl.bottom-rectCtl.top,FALSE);
+ }
+ }
+ if (GetWindowRect(GetDlgItem(hPos, IDC_GRPDETAIL),&rectCtl))
+ {
+ MoveWindow(GetDlgItem(hPos, IDC_GRPDETAIL),rectCtl.left-rectDlg.left,rectCtl.top-rectDlg.top,rectCtl.right-rectCtl.left,rectCtl.bottom-rectCtl.top,FALSE);
+ }
+ }
+ }
+ }
+ }
+ }