- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
void RedoLayout(HWND dialogWindow)
{
RECT rectangle;
GetClientRect(dialogWindow, &rectangle);
/* Status */
SetWindowPos(GetDlgItem(dialogWindow, IDC_STATUS), dialogWindow,
0,
rectangle.bottom - (layout[2].bottom - layout[2].top),
rectangle.right - rectangle.left,
(layout[2].bottom - layout[2].top),
SWP_NOZORDER);
/* Panel */
SetWindowPos(
GetDlgItem(dialogWindow,IDC_PANEL), dialogWindow,
(layout[1].left - layout[0].left),
(layout[1].top - layout[0].top),
rectangle.right - (layout[1].left-layout[0].left) - (layout[0].right - layout[1].right),
rectangle.bottom - (layout[1].top - layout[0].top) - (layout[0].bottom - layout[1].bottom),
SWP_NOZORDER);
/* Buttons & CheckBoxes */
for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); ++i)
{
SetWindowPos(
GetDlgItem(dialogWindow,controls[i]), dialogWindow,
rectangle.right - (layout[0].right - layout[3 + i].left),
(layout[3 + i].top - layout[0].top),
(layout[3 + i].right - layout[3 + i].left),
(layout[3 + i].bottom - layout[3 + i].top),
SWP_NOZORDER);
}
}