1.1 --- a/tools/installer/InstallerMain.cpp Sun Nov 25 02:45:12 2007 +0000
1.2 +++ b/tools/installer/InstallerMain.cpp Sun Nov 25 04:46:18 2007 +0000
1.3 @@ -5,6 +5,35 @@
1.4
1.5 HINSTANCE g_hInstance;
1.6 NEXT_DIALOG next_dialog = DisplayWelcome;
1.7 +POINT g_GlobalPosition;
1.8 +
1.9 +void UpdateGlobalPosition(HWND hWnd)
1.10 +{
1.11 + WINDOWINFO wi;
1.12 +
1.13 + wi.cbSize = sizeof(WINDOWINFO);
1.14 + if (GetWindowInfo(hWnd, &wi))
1.15 + {
1.16 + g_GlobalPosition.x = wi.rcWindow.left;
1.17 + g_GlobalPosition.y = wi.rcWindow.top;
1.18 + }
1.19 +}
1.20 +
1.21 +void SetToGlobalPosition(HWND hWnd)
1.22 +{
1.23 + WINDOWINFO wi;
1.24 +
1.25 + wi.cbSize = sizeof(WINDOWINFO);
1.26 + if (GetWindowInfo(hWnd, &wi))
1.27 + {
1.28 + MoveWindow(hWnd,
1.29 + g_GlobalPosition.x,
1.30 + g_GlobalPosition.y,
1.31 + wi.rcWindow.right - wi.rcWindow.left,
1.32 + wi.rcWindow.bottom - wi.rcWindow.top,
1.33 + TRUE);
1.34 + }
1.35 +}
1.36
1.37 LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
1.38 {
1.39 @@ -12,6 +41,7 @@
1.40 {
1.41 case WMU_INIT_INSTALLER:
1.42 {
1.43 + UpdateGlobalPosition(hWnd);
1.44 while (next_dialog != NULL)
1.45 {
1.46 next_dialog = (NEXT_DIALOG)next_dialog(hWnd);