LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
-/* String Tables */
-
-STRINGTABLE DISCARDABLE
+IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ReactOS Setup"
+FONT 8, "MS Shell Dlg"
BEGIN
- IDS_CAPTION "ReactOS Setup"
- IDS_TEXT "ReactOS kann nicht direkt von dieser CD installiert werden!\n\nBitte starten Sie Ihren Computer mit dieser CD um ReactOS zu installieren."
+ LTEXT "Willkommen beim ReactOS Setup Assistenten.", IDC_STARTTITLE, 115, 8, 195, 24
+ LTEXT "ReactOS kann noch nicht direkt von dieser CD installiert werden! "\
+ "Bitte starten Sie Ihren Computer mit dieser CD um ReactOS zu "\
+ "installieren.", IDC_STATIC, 115, 40, 195, 100
+ LTEXT "Klicken Sie auf Beenden um das Setup zu verlassen.", IDC_STATIC, 115, 169, 195, 17
END
/* EOF */
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-/* String Tables */
-STRINGTABLE DISCARDABLE
+IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ReactOS Setup"
+FONT 8, "MS Shell Dlg"
BEGIN
- IDS_CAPTION "ReactOS Setup"
- IDS_TEXT "You cannot install ReactOS directly from this CD!\n\nPlease restart your computer from this CD in order to install ReactOS."
+ LTEXT "Welcome to the ReactOS Setup Wizard.", IDC_STARTTITLE, 115, 8, 195, 24
+ LTEXT "You cannot install ReactOS directly from this CD yet! "\
+ "Please restart your computer from this CD in order to "\
+ "install ReactOS.", IDC_STATIC, 115, 40, 195, 100
+ LTEXT "Click Finish to exit the Setup.", IDC_STATIC, 115, 169, 195, 17
END
/* EOF */
/*
* ReactOS applications
- * Copyright (C) 2004 ReactOS Team
+ * Copyright (C) 2004-2008 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS GUI first stage setup application
* FILE: subsys/system/reactos/reactos.c
- * PROGRAMMERS: Eric Kohl
+ * PROGRAMMERS: Eric Kohl, Matthias Kupfer
*/
#include <windows.h>
-#include <tchar.h>
+#include <commctrl.h>
#include "resource.h"
-/* GLOBALS ******************************************************************/
+/* FUNCTIONS ****************************************************************/
-TCHAR szCaption[256];
-TCHAR szText[256];
+static VOID
+CenterWindow(HWND hWnd)
+{
+ HWND hWndParent;
+ RECT rcParent;
+ RECT rcWindow;
-HINSTANCE hInstance;
+ hWndParent = GetParent(hWnd);
+ if (hWndParent == NULL)
+ hWndParent = GetDesktopWindow();
+ GetWindowRect(hWndParent, &rcParent);
+ GetWindowRect(hWnd, &rcWindow);
-/* FUNCTIONS ****************************************************************/
+ SetWindowPos(hWnd,
+ HWND_TOP,
+ ((rcParent.right - rcParent.left) - (rcWindow.right - rcWindow.left)) / 2,
+ ((rcParent.bottom - rcParent.top) - (rcWindow.bottom - rcWindow.top)) / 2,
+ 0,
+ 0,
+ SWP_NOSIZE);
+}
+
+static INT_PTR CALLBACK
+StartDlgProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow (hwndControl);
+
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+
+ /* Hide and disable the 'Cancel' button at the moment,
+ * later we use this button to cancel the setup process
+ * like F3 in usetup
+ */
+ hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+ ShowWindow (hwndControl, SW_HIDE);
+ EnableWindow (hwndControl, FALSE);
+ }
+ break;
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE: // Only "Finish" for closing the App
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH);
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+ return FALSE;
+}
int WINAPI
WinMain(HINSTANCE hInst,
LPSTR lpszCmdLine,
int nCmdShow)
{
- hInstance = hInst;
+ PROPSHEETHEADER psh;
+ HPROPSHEETPAGE ahpsp[1];
+ PROPSHEETPAGE psp = {0};
+ UINT nPages = 0;
+
+ /* Create the Start page */
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = StartDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_STARTPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
- if (!LoadString(hInstance,
- IDS_CAPTION,
- szCaption,
- (sizeof szCaption / sizeof szCaption[0])))
- return 0;
+ // Here we can add the next pages and switch on later
- if (!LoadString(hInstance,
- IDS_TEXT,
- szText,
- (sizeof szText / sizeof szText[0])))
- return 0;
+ /* Create the property sheet */
+ psh.dwSize = sizeof(PROPSHEETHEADER);
+ psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
+ psh.hInstance = hInst;
+ psh.hwndParent = NULL;
+ psh.nPages = nPages;
+ psh.nStartPage = 0;
+ psh.phpage = ahpsp;
+ psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
+ psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER);
- MessageBox(NULL,
- szText,
- szCaption,
- MB_OK | MB_ICONINFORMATION);
+ /* Display the wizard */
+ PropertySheet(&psh);
return 0;
+
}
/* EOF */