[ros-diffs] [dchapyshev] 37588: - Fix formatting. No code change

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Sun Nov 23 14:52:58 CET 2008


Author: dchapyshev
Date: Sun Nov 23 07:52:57 2008
New Revision: 37588

URL: http://svn.reactos.org/svn/reactos?rev=37588&view=rev
Log:
- Fix formatting. No code change

Modified:
    trunk/reactos/base/setup/reactos/reactos.c
    trunk/reactos/base/setup/reactos/resource.h

Modified: trunk/reactos/base/setup/reactos/reactos.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos.c?rev=37588&r1=37587&r2=37588&view=diff
==============================================================================
--- trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] Sun Nov 23 07:52:57 2008
@@ -23,6 +23,7 @@
  * FILE:        subsys/system/reactos/reactos.c
  * PROGRAMMERS: Eric Kohl
  *              Matthias Kupfer
+ *              Dmitry Chapyshev (dmitry at reactos.org)
  */
 
 #include <windows.h>
@@ -62,33 +63,33 @@
 
 struct
 {
-	// Settings
-	LONG DestDiskNumber; // physical disk
-	LONG DestPartNumber; // partition on disk
-	LONG DestPartSize; // if partition doesn't exist, size of partition
-	LONG FSType; // file system type on partition 
-	LONG MBRInstallType; // install bootloader
-	LONG FormatPart; // type of format the partition
-	LONG SelectedLangId; // selected language (table index)
-	LONG SelectedKBLayout; // selected keyboard layout (table index)
-	TCHAR InstallDir[MAX_PATH]; // installation directory on hdd
-	LONG SelectedComputer; // selected computer type (table index)
-	LONG SelectedDisplay; // selected display type (table index)
-	LONG SelectedKeyboard; // selected keyboard type (table index)
-	BOOLEAN RepairUpdateFlag; // flag for update/repair an installed reactos
-	// txtsetup.sif data
-	LONG DefaultLang; // default language (table index)
-	PLANG pLanguages;
-	LONG LangCount;
-	LONG DefaultKBLayout; // default keyboard layout (table index)
-	PKBLAYOUT pKbLayouts;
-	LONG KbLayoutCount;
-	PGENENTRY pComputers;
-	LONG CompCount;
-	PGENENTRY pDisplays;
-	LONG DispCount;
-	PGENENTRY pKeyboards;
-	LONG KeybCount;
+    // Settings
+    LONG DestDiskNumber; // physical disk
+    LONG DestPartNumber; // partition on disk
+    LONG DestPartSize; // if partition doesn't exist, size of partition
+    LONG FSType; // file system type on partition 
+    LONG MBRInstallType; // install bootloader
+    LONG FormatPart; // type of format the partition
+    LONG SelectedLangId; // selected language (table index)
+    LONG SelectedKBLayout; // selected keyboard layout (table index)
+    TCHAR InstallDir[MAX_PATH]; // installation directory on hdd
+    LONG SelectedComputer; // selected computer type (table index)
+    LONG SelectedDisplay; // selected display type (table index)
+    LONG SelectedKeyboard; // selected keyboard type (table index)
+    BOOLEAN RepairUpdateFlag; // flag for update/repair an installed reactos
+    // txtsetup.sif data
+    LONG DefaultLang; // default language (table index)
+    PLANG pLanguages;
+    LONG LangCount;
+    LONG DefaultKBLayout; // default keyboard layout (table index)
+    PKBLAYOUT pKbLayouts;
+    LONG KbLayoutCount;
+    PGENENTRY pComputers;
+    LONG CompCount;
+    PGENENTRY pDisplays;
+    LONG DispCount;
+    PGENENTRY pKeyboards;
+    LONG KeybCount;
 } SetupData;
 
 typedef struct _IMGINFO
@@ -98,7 +99,7 @@
     INT cySource;
 } IMGINFO, *PIMGINFO;
 
-TCHAR abort_msg[512],abort_title[64];
+TCHAR abort_msg[512], abort_title[64];
 HINSTANCE hInstance;
 BOOL isUnattend;
 
@@ -107,49 +108,49 @@
 static VOID
 CenterWindow(HWND hWnd)
 {
-  HWND hWndParent;
-  RECT rcParent;
-  RECT rcWindow;
-
-  hWndParent = GetParent(hWnd);
-  if (hWndParent == NULL)
-    hWndParent = GetDesktopWindow();
-
-  GetWindowRect(hWndParent, &rcParent);
-  GetWindowRect(hWnd, &rcWindow);
-
-  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);
+    HWND hWndParent;
+    RECT rcParent;
+    RECT rcWindow;
+
+    hWndParent = GetParent(hWnd);
+    if (hWndParent == NULL)
+        hWndParent = GetDesktopWindow();
+
+    GetWindowRect(hWndParent, &rcParent);
+    GetWindowRect(hWnd, &rcWindow);
+
+    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 HFONT
 CreateTitleFont(VOID)
 {
-  NONCLIENTMETRICS ncm;
-  LOGFONT LogFont;
-  HDC hdc;
-  INT FontSize;
-  HFONT hFont;
-
-  ncm.cbSize = sizeof(NONCLIENTMETRICS);
-  SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
-
-  LogFont = ncm.lfMessageFont;
-  LogFont.lfWeight = FW_BOLD;
-  _tcscpy(LogFont.lfFaceName, _T("MS Shell Dlg"));
-
-  hdc = GetDC(NULL);
-  FontSize = 12;
-  LogFont.lfHeight = 0 - GetDeviceCaps (hdc, LOGPIXELSY) * FontSize / 72;
-  hFont = CreateFontIndirect(&LogFont);
-  ReleaseDC(NULL, hdc);
-
-  return hFont;
+    NONCLIENTMETRICS ncm;
+    LOGFONT LogFont;
+    HDC hdc;
+    INT FontSize;
+    HFONT hFont;
+
+    ncm.cbSize = sizeof(NONCLIENTMETRICS);
+    SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
+
+    LogFont = ncm.lfMessageFont;
+    LogFont.lfWeight = FW_BOLD;
+    _tcscpy(LogFont.lfFaceName, _T("MS Shell Dlg"));
+
+    hdc = GetDC(NULL);
+    FontSize = 12;
+    LogFont.lfHeight = 0 - GetDeviceCaps (hdc, LOGPIXELSY) * FontSize / 72;
+    hFont = CreateFontIndirect(&LogFont);
+    ReleaseDC(NULL, hdc);
+
+    return hFont;
 }
 
 static VOID
@@ -177,60 +178,63 @@
 
 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,
-		 * 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);
-	        
-		/* Set title font */
-		SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);
-}
-	  break;
-	  case WM_NOTIFY:
-	  {
-          LPNMHDR lpnm = (LPNMHDR)lParam;
-
-		  switch (lpnm->code)
-		  {		
-		      case PSN_SETACTIVE:
-			PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
-			break;
-		      default:
-			break;
-		  }
-	  break;
-	  }
-	  default:
-	  	break;
-
-  }
-  return FALSE;
+             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,
+             * 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);
+            
+            /* Set title font */
+            SendDlgItemMessage(hwndDlg,
+                               IDC_STARTTITLE,
+                               WM_SETFONT,
+                               (WPARAM)hTitleFont,
+                               (LPARAM)TRUE);
+        }
+        break;
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {        
+                case PSN_SETACTIVE:
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
+                break;
+                default:
+                break;
+            }
+        }
+        break;
+
+        default:
+            break;
+
+    }
+
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
@@ -239,67 +243,74 @@
                WPARAM wParam,
                LPARAM lParam)
 {
-  PIMGINFO pImgInfo;
-  LONG i;
-  LRESULT tindex;
-  HWND hList;
-  pImgInfo = (PIMGINFO)GetWindowLongPtr(hwndDlg, DWLP_USER);
-  switch (uMsg)
-  {
-	  case WM_INITDIALOG:
-	  {
-		HWND hwndControl;
-		DWORD dwStyle;
-
-          	hwndControl = GetParent(hwndDlg);
-
-          	dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-	        SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
-	        
-		hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
-		ShowWindow (hwndControl, SW_SHOW);
-		EnableWindow (hwndControl, TRUE);
-
-                pImgInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMGINFO));
-                if (pImgInfo == NULL)
-                {
-                   EndDialog(hwndDlg, 0);
-                   return FALSE;
-                }
-
-                SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pImgInfo);
-
-                InitImageInfo(pImgInfo);
-
-		/* Set title font */
-		/*SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);*/
-		hList = GetDlgItem(hwndDlg, IDC_LANGUAGES);
-		for (i=0; i< SetupData.LangCount;i++)
-		{
-			tindex = SendMessage(hList,CB_ADDSTRING,(WPARAM)0,(LPARAM)SetupData.pLanguages[i].LangName);
-			SendMessage(hList,CB_SETITEMDATA,tindex,i);
-			if (SetupData.DefaultLang == i)
-				SendMessage(hList,CB_SETCURSEL,(WPARAM)tindex,(LPARAM)0);
-
-		}
-		hList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT);
-		for (i=0; i< SetupData.KbLayoutCount;i++)
-		{
-			tindex = SendMessage(hList,CB_ADDSTRING,(WPARAM)0,(LPARAM)SetupData.pKbLayouts[i].LayoutName);
-			SendMessage(hList,CB_SETITEMDATA,tindex,i);
-			if (SetupData.DefaultKBLayout == i)
-				SendMessage(hList,CB_SETCURSEL,(WPARAM)tindex,(LPARAM)0);
-		}
-          }
-	  break;
-          case WM_DRAWITEM:
-          {
+    PIMGINFO pImgInfo;
+    LONG i;
+    LRESULT tindex;
+    HWND hList;
+
+    pImgInfo = (PIMGINFO)GetWindowLongPtr(hwndDlg, DWLP_USER);
+
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            HWND hwndControl;
+            DWORD dwStyle;
+
+            hwndControl = GetParent(hwndDlg);
+
+            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+            
+            hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+            ShowWindow (hwndControl, SW_SHOW);
+            EnableWindow (hwndControl, TRUE);
+
+            pImgInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMGINFO));
+            if (pImgInfo == NULL)
+            {
+                EndDialog(hwndDlg, 0);
+                return FALSE;
+            }
+
+            SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pImgInfo);
+
+            InitImageInfo(pImgInfo);
+
+            /* Set title font */
+            /*SendDlgItemMessage(hwndDlg,
+                                 IDC_STARTTITLE,
+                                 WM_SETFONT,
+                                 (WPARAM)hTitleFont,
+                                 (LPARAM)TRUE);*/
+
+            hList = GetDlgItem(hwndDlg, IDC_LANGUAGES);
+
+            for (i=0; i < SetupData.LangCount; i++)
+            {
+                tindex = SendMessage(hList, CB_ADDSTRING, (WPARAM) 0, (LPARAM) SetupData.pLanguages[i].LangName);
+                SendMessage(hList, CB_SETITEMDATA, tindex, i);
+                if (SetupData.DefaultLang == i)
+                SendMessage(hList, CB_SETCURSEL, (WPARAM) tindex,(LPARAM) 0);
+            }
+
+            hList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT);
+
+            for (i=0; i < SetupData.KbLayoutCount; i++)
+            {
+                tindex = SendMessage(hList, CB_ADDSTRING, (WPARAM) 0, (LPARAM)SetupData.pKbLayouts[i].LayoutName);
+                SendMessage(hList, CB_SETITEMDATA, tindex, i);
+                if (SetupData.DefaultKBLayout == i)
+                SendMessage(hList,CB_SETCURSEL,(WPARAM)tindex,(LPARAM)0);
+            }
+        }
+        break;
+
+        case WM_DRAWITEM:
+        {
             LPDRAWITEMSTRUCT lpDrawItem;
             lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
+
             if (lpDrawItem->CtlID == IDB_ROSLOGO)
             {
                 HDC hdcMem;
@@ -325,197 +336,256 @@
                 }
             }
             return TRUE;
-          }
-	  case WM_NOTIFY:
-	  {
-          LPNMHDR lpnm = (LPNMHDR)lParam;
-
-		  switch (lpnm->code)
-		  {		
-		      case PSN_SETACTIVE:
-			PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
-			break;
-		      case PSN_QUERYCANCEL:
-	       		SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg, abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
-			return TRUE;
-		      case PSN_WIZNEXT: // set the selected data
-			hList =GetDlgItem(hwndDlg, IDC_LANGUAGES); 
-			tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
-			if (tindex != CB_ERR)
-			{
-				SetupData.SelectedLangId = SendMessage(hList,CB_GETITEMDATA, (WPARAM)tindex, (LPARAM)0);
-				WORD LangID=strtol(SetupData.pLanguages[SetupData.SelectedLangId].LangId,NULL,16);
-				SetThreadLocale(MAKELCID(LangID,SORT_DEFAULT));
-				// FIXME: need to reload all resource to force
-				// the new language setting
-			}
-			hList =GetDlgItem(hwndDlg, IDC_KEYLAYOUT); 
-			tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
-			if (tindex != CB_ERR)
-			{
-				SetupData.SelectedKBLayout = SendMessage(hList,CB_GETITEMDATA, (WPARAM)tindex, (LPARAM)0);
-			}
-			return TRUE;
-		      default:
-			break;
-		  }
-	  }
-	  break;
-	  default:
-	  	break;
-
-  }
-  return FALSE;
+        }
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {        
+                case PSN_SETACTIVE:
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+                    break;
+
+                case PSN_QUERYCANCEL:
+                    SetWindowLong(hwndDlg,
+                                  DWL_MSGRESULT,
+                                  MessageBox(GetParent(hwndDlg),
+                                             abort_msg,
+                                             abort_title,
+                                             MB_YESNO | MB_ICONQUESTION) != IDYES);
+                    return TRUE;
+
+                case PSN_WIZNEXT: // set the selected data
+                {
+                    hList =GetDlgItem(hwndDlg, IDC_LANGUAGES); 
+                    tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
+
+                    if (tindex != CB_ERR)
+                    {
+                        SetupData.SelectedLangId = SendMessage(hList, CB_GETITEMDATA, (WPARAM) tindex, (LPARAM) 0);
+                        WORD LangID = strtol(SetupData.pLanguages[SetupData.SelectedLangId].LangId, NULL, 16);
+                        SetThreadLocale(MAKELCID(LangID, SORT_DEFAULT));
+                        // FIXME: need to reload all resource to force
+                        // the new language setting
+                    }
+
+                    hList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT); 
+                    tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
+                    if (tindex != CB_ERR)
+                    {
+                        SetupData.SelectedKBLayout = SendMessage(hList, CB_GETITEMDATA, (WPARAM) tindex, (LPARAM) 0);
+                    }
+                    return TRUE;
+                }
+
+                default:
+                    break;
+            }
+        }
+        break;
+
+        default:
+            break;
+
+    }
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
 TypeDlgProc(HWND hwndDlg,
-               UINT uMsg,
-               WPARAM wParam,
-               LPARAM lParam)
-{
-  switch (uMsg)
-  {
-	  case WM_INITDIALOG:
-	  {
-		HWND hwndControl;
-		DWORD dwStyle;
-
-          	hwndControl = GetParent(hwndDlg);
-
-          	dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-	        SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
-		
-		CheckDlgButton(hwndDlg, IDC_INSTALL, BST_CHECKED);
-	        
-		/* Set title font */
-		/*SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);*/
-}
-	  break;
-	  case WM_NOTIFY:
-	  {
-          LPNMHDR lpnm = (LPNMHDR)lParam;
-
-		  switch (lpnm->code)
-		  {		
-		      case PSN_SETACTIVE:
-			PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
-			break;
-		      case PSN_QUERYCANCEL:
-	       		SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg, abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
-			return TRUE;
-		      case PSN_WIZNEXT: // set the selected data
-
-			SetupData.RepairUpdateFlag = !(SendMessage(GetDlgItem(hwndDlg, IDC_INSTALL),BM_GETCHECK,(WPARAM)0,(LPARAM)0) == BST_CHECKED);
-			return TRUE;
-		      default:
-			break;
-		  }
-	  }
-	  break;
-	  default:
-	  	break;
-
-  }
-  return FALSE;
+            UINT uMsg,
+            WPARAM wParam,
+            LPARAM lParam)
+{
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            HWND hwndControl;
+            DWORD dwStyle;
+
+            hwndControl = GetParent(hwndDlg);
+
+            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+        
+            CheckDlgButton(hwndDlg, IDC_INSTALL, BST_CHECKED);
+            
+            /* Set title font */
+            /*SendDlgItemMessage(hwndDlg,
+                                 IDC_STARTTITLE,
+                                 WM_SETFONT,
+                                 (WPARAM)hTitleFont,
+                                 (LPARAM)TRUE);*/
+        }
+        break;
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {        
+                case PSN_SETACTIVE:
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+                break;
+
+                case PSN_QUERYCANCEL:
+                    SetWindowLong(hwndDlg,
+                                  DWL_MSGRESULT,
+                                  MessageBox(GetParent(hwndDlg),
+                                             abort_msg,
+                                             abort_title,
+                                             MB_YESNO | MB_ICONQUESTION) != IDYES);
+                    return TRUE;
+
+                case PSN_WIZNEXT: // set the selected data
+                    SetupData.RepairUpdateFlag = !(SendMessage(GetDlgItem(hwndDlg, IDC_INSTALL),
+                                                               BM_GETCHECK,
+                                                               (WPARAM) 0,
+                                                               (LPARAM) 0) == BST_CHECKED);
+                    return TRUE;
+
+                default:
+                    break;
+            }
+        }
+        break;
+
+        default:
+            break;
+
+    }
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
 DeviceDlgProc(HWND hwndDlg,
-               UINT uMsg,
-               WPARAM wParam,
-               LPARAM lParam)
-{
-  LONG i;
-  LRESULT tindex;
-  HWND hList;
-  switch (uMsg)
-  {
-	  case WM_INITDIALOG:
-	  {
-		HWND hwndControl;
-		DWORD dwStyle;
-
-          	hwndControl = GetParent(hwndDlg);
-
-          	dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-	        SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
-		
-		/* Set title font */
-		/*SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);*/
-}
-		hList = GetDlgItem(hwndDlg, IDC_COMPUTER);
-		for (i=0; i< SetupData.CompCount;i++)
-		{
-			tindex = SendMessage(hList,CB_ADDSTRING,(WPARAM)0,(LPARAM)SetupData.pComputers[i].Value);
-			SendMessage(hList,CB_SETITEMDATA,tindex,i);
-		}
-		SendMessage(hList,CB_SETCURSEL,0,0); // set first as default
-		hList = GetDlgItem(hwndDlg, IDC_DISPLAY);
-		for (i=0; i< SetupData.DispCount;i++)
-		{
-			tindex = SendMessage(hList,CB_ADDSTRING,(WPARAM)0,(LPARAM)SetupData.pDisplays[i].Value);
-			SendMessage(hList,CB_SETITEMDATA,tindex,i);
-		}
-		SendMessage(hList,CB_SETCURSEL,0,0); // set first as default
-		hList = GetDlgItem(hwndDlg, IDC_KEYBOARD);
-		for (i=0; i< SetupData.KeybCount;i++)
-		{
-			tindex = SendMessage(hList,CB_ADDSTRING,(WPARAM)0,(LPARAM)SetupData.pKeyboards[i].Value);
-			SendMessage(hList,CB_SETITEMDATA,tindex,i);
-		}
-		SendMessage(hList,CB_SETCURSEL,0,0); // set first as default
-	  break;
-	  case WM_NOTIFY:
-	  {
-          LPNMHDR lpnm = (LPNMHDR)lParam;
-
-		  switch (lpnm->code)
-		  {		
-		      case PSN_SETACTIVE:
-			PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
-			break;
-		      case PSN_QUERYCANCEL:
-	       		SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg, abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
-			return TRUE;
-		      case PSN_WIZNEXT: // set the selected data
-			hList =GetDlgItem(hwndDlg, IDC_COMPUTER); 
-			tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
-			if (tindex != CB_ERR)
-			{
-				SetupData.SelectedComputer = SendMessage(hList,CB_GETITEMDATA, (WPARAM)tindex, (LPARAM)0);
-			}
-			hList =GetDlgItem(hwndDlg, IDC_DISPLAY); 
-			tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
-			if (tindex != CB_ERR)
-			{
-				SetupData.SelectedDisplay = SendMessage(hList,CB_GETITEMDATA, (WPARAM)tindex, (LPARAM)0);
-			}
-			hList =GetDlgItem(hwndDlg, IDC_KEYBOARD); 
-			tindex = SendMessage(hList,CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
-			if (tindex != CB_ERR)
-			{
-				SetupData.SelectedKeyboard = SendMessage(hList,CB_GETITEMDATA, (WPARAM)tindex, (LPARAM)0);
-			}
-			return TRUE;
-	      default:
-			break;
-		  }
-	  }
-	  break;
-	  default:
-	  	break;
-
-  }
-  return FALSE;
+              UINT uMsg,
+              WPARAM wParam,
+              LPARAM lParam)
+{
+    LONG i;
+    LRESULT tindex;
+    HWND hList;
+
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            HWND hwndControl;
+            DWORD dwStyle;
+
+            hwndControl = GetParent(hwndDlg);
+
+            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+        
+            /* Set title font */
+            /*SendDlgItemMessage(hwndDlg,
+                                 IDC_STARTTITLE,
+                                 WM_SETFONT,
+                                 (WPARAM)hTitleFont,
+                                 (LPARAM)TRUE);*/
+
+            hList = GetDlgItem(hwndDlg, IDC_COMPUTER);
+
+            for (i=0; i < SetupData.CompCount; i++)
+            {
+                tindex = SendMessage(hList, CB_ADDSTRING, (WPARAM) 0, (LPARAM) SetupData.pComputers[i].Value);
+                SendMessage(hList, CB_SETITEMDATA, tindex, i);
+            }
+            SendMessage(hList, CB_SETCURSEL, 0, 0); // set first as default
+
+            hList = GetDlgItem(hwndDlg, IDC_DISPLAY);
+
+            for (i=0; i < SetupData.DispCount; i++)
+            {
+                tindex = SendMessage(hList, CB_ADDSTRING, (WPARAM) 0, (LPARAM) SetupData.pDisplays[i].Value);
+                SendMessage(hList, CB_SETITEMDATA, tindex, i);
+            }
+            SendMessage(hList, CB_SETCURSEL, 0, 0); // set first as default
+
+            hList = GetDlgItem(hwndDlg, IDC_KEYBOARD);
+
+            for (i=0; i < SetupData.KeybCount; i++)
+            {
+                tindex = SendMessage(hList,CB_ADDSTRING,(WPARAM)0,(LPARAM)SetupData.pKeyboards[i].Value);
+                SendMessage(hList,CB_SETITEMDATA,tindex,i);
+            }
+            SendMessage(hList,CB_SETCURSEL,0,0); // set first as default
+        }
+        break;
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {        
+                case PSN_SETACTIVE:
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+                    break;
+
+                case PSN_QUERYCANCEL:
+                    SetWindowLong(hwndDlg,
+                                  DWL_MSGRESULT,
+                                  MessageBox(GetParent(hwndDlg),
+                                             abort_msg,
+                                             abort_title,
+                                             MB_YESNO | MB_ICONQUESTION) != IDYES);
+                    return TRUE;
+
+                case PSN_WIZNEXT: // set the selected data
+                {
+                    hList = GetDlgItem(hwndDlg, IDC_COMPUTER); 
+
+                    tindex = SendMessage(hList, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+                    if (tindex != CB_ERR)
+                    {
+                        SetupData.SelectedComputer = SendMessage(hList,
+                                                                 CB_GETITEMDATA,
+                                                                 (WPARAM) tindex,
+                                                                 (LPARAM) 0);
+                    }
+
+                    hList = GetDlgItem(hwndDlg, IDC_DISPLAY);
+
+                    tindex = SendMessage(hList, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+                    if (tindex != CB_ERR)
+                    {
+                        SetupData.SelectedDisplay = SendMessage(hList,
+                                                                CB_GETITEMDATA,
+                                                                (WPARAM) tindex,
+                                                                (LPARAM) 0);
+                    }
+
+                    hList =GetDlgItem(hwndDlg, IDC_KEYBOARD);
+
+                    tindex = SendMessage(hList, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+                    if (tindex != CB_ERR)
+                    {
+                        SetupData.SelectedKeyboard = SendMessage(hList,
+                                                                 CB_GETITEMDATA,
+                                                                 (WPARAM) tindex,
+                                                                 (LPARAM) 0);
+                    }
+                    return TRUE;
+                }
+
+                default:
+                    break;
+            }
+        }
+        break;
+
+        default:
+            break;
+
+    }
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
@@ -524,157 +594,194 @@
                WPARAM wParam,
                LPARAM lParam)
 {
-	switch (uMsg)
-	{
-		case WM_INITDIALOG:
-			CheckDlgButton(hwndDlg, IDC_INSTFREELDR, BST_CHECKED);
-			SendMessage(GetDlgItem(hwndDlg, IDC_PATH),WM_SETTEXT,
-					(WPARAM)0,(LPARAM)SetupData.InstallDir);
-			break;
-		case WM_COMMAND:
-			switch(LOWORD(wParam))
-			{
-				case IDOK:
-					SendMessage(GetDlgItem(hwndDlg, IDC_PATH),WM_GETTEXT,
-					(WPARAM)sizeof(SetupData.InstallDir)/sizeof(TCHAR),(LPARAM)SetupData.InstallDir);
-					
-					EndDialog(hwndDlg, IDOK);
-					return TRUE;
-				case IDCANCEL:
-					EndDialog(hwndDlg, IDCANCEL);
-					return TRUE;
-			}
-	}
-	return FALSE;
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            CheckDlgButton(hwndDlg, IDC_INSTFREELDR, BST_CHECKED);
+            SendMessage(GetDlgItem(hwndDlg, IDC_PATH),
+                        WM_SETTEXT,
+                        (WPARAM) 0,
+                        (LPARAM) SetupData.InstallDir);
+        }
+        break;
+
+        case WM_COMMAND:
+        {
+            switch(LOWORD(wParam))
+            {
+                case IDOK:
+                {
+                    SendMessage(GetDlgItem(hwndDlg, IDC_PATH),
+                                WM_GETTEXT,
+                                (WPARAM) sizeof(SetupData.InstallDir) / sizeof(TCHAR),
+                                (LPARAM) SetupData.InstallDir);
+                    
+                    EndDialog(hwndDlg, IDOK);
+                    return TRUE;
+                }
+
+                case IDCANCEL:
+                {
+                    EndDialog(hwndDlg, IDCANCEL);
+                    return TRUE;
+                }
+            }
+        }
+    }
+
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
 PartitionDlgProc(HWND hwndDlg,
-               UINT uMsg,
-               WPARAM wParam,
-               LPARAM lParam)
-{
-	switch (uMsg)
-	{
-		case WM_INITDIALOG:
-			break;
-		case WM_COMMAND:
-			switch(LOWORD(wParam))
-			{
-				case IDOK:
-					EndDialog(hwndDlg, IDOK);
-					return TRUE;
-				case IDCANCEL:
-					EndDialog(hwndDlg, IDCANCEL);
-					return TRUE;
-			}
-	}
-	return FALSE;
+                 UINT uMsg,
+                 WPARAM wParam,
+                 LPARAM lParam)
+{
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+            break;
+        case WM_COMMAND:
+        {
+            switch(LOWORD(wParam))
+            {
+                case IDOK:
+                    EndDialog(hwndDlg, IDOK);
+                    return TRUE;
+                case IDCANCEL:
+                    EndDialog(hwndDlg, IDCANCEL);
+                    return TRUE;
+            }
+        }
+    }
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
 DriveDlgProc(HWND hwndDlg,
-               UINT uMsg,
-               WPARAM wParam,
-               LPARAM lParam)
+             UINT uMsg,
+             WPARAM wParam,
+             LPARAM lParam)
 {
 #if 0
-  HDEVINFO h;
-  HWND hList;
-  SP_DEVINFO_DATA DevInfoData;
-  DWORD i;
+    HDEVINFO h;
+    HWND hList;
+    SP_DEVINFO_DATA DevInfoData;
+    DWORD i;
 #endif
-  switch (uMsg)
-  {
-	  case WM_INITDIALOG:
-	  {
-		HWND hwndControl;
-		DWORD dwStyle;
-
-          	hwndControl = GetParent(hwndDlg);
-
-          	dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-	        SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
-		
-		/* Set title font */
-		/*SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);*/
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            HWND hwndControl;
+            DWORD dwStyle;
+
+            hwndControl = GetParent(hwndDlg);
+
+            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+        
+            /* Set title font */
+            /*SendDlgItemMessage(hwndDlg,
+                                 IDC_STARTTITLE,
+                                 WM_SETFONT,
+                                 (WPARAM)hTitleFont,
+                                 (LPARAM)TRUE);*/
 #if 0
-		h = SetupDiGetClassDevs(&GUID_DEVCLASS_DISKDRIVE, NULL, NULL,
-				DIGCF_PRESENT);
-		if (h != INVALID_HANDLE_VALUE)
-		{
-			hList =GetDlgItem(hwndDlg, IDC_PARTITION); 
-			DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
-			for (i=0;SetupDiEnumDeviceInfo(h,i,&DevInfoData);i++)
-			{
-				DWORD DataT;
-	        		LPTSTR buffer = NULL;
-				DWORD buffersize = 0;
-				while (!SetupDiGetDeviceRegistryProperty(
-					h,&DevInfoData,
-					SPDRP_DEVICEDESC,&DataT,(PBYTE)buffer,
-					buffersize,&buffersize))
-				{
-					if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
-					{
-						if (buffer) LocalFree(buffer);
-						buffer = LocalAlloc(LPTR,buffersize * 2);
-					} else
-						break;
-				}
-				if (buffer)
-				{
-					SendMessage(hList,LB_ADDSTRING,(WPARAM)0,(LPARAM)buffer);
-					LocalFree(buffer);
-				}
-			}
-			SetupDiDestroyDeviceInfoList(h);
-		}
+            h = SetupDiGetClassDevs(&GUID_DEVCLASS_DISKDRIVE, NULL, NULL, DIGCF_PRESENT);
+            if (h != INVALID_HANDLE_VALUE)
+            {
+                hList =GetDlgItem(hwndDlg, IDC_PARTITION); 
+                DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
+                for (i=0; SetupDiEnumDeviceInfo(h, i, &DevInfoData); i++)
+                {
+                    DWORD DataT;
+                    LPTSTR buffer = NULL;
+                    DWORD buffersize = 0;
+
+                    while (!SetupDiGetDeviceRegistryProperty(h,
+                                                             &DevInfoData,
+                                                             SPDRP_DEVICEDESC,
+                                                             &DataT,
+                                                             (PBYTE)buffer,
+                                                             buffersize,
+                                                             &buffersize))
+                    {
+                        if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+                        {
+                            if (buffer) LocalFree(buffer);
+                            buffer = LocalAlloc(LPTR, buffersize * 2);
+                        }
+                        else
+                            break;
+                    }
+                    if (buffer)
+                    {
+                        SendMessage(hList, LB_ADDSTRING, (WPARAM) 0, (LPARAM) buffer);
+                        LocalFree(buffer);
+                    }
+                }
+                SetupDiDestroyDeviceInfoList(h);
+            }
 #endif
-	  }
-	  break;
-	  case WM_COMMAND:
-	  {
-		switch(LOWORD(wParam))
-		{
-			case IDC_PARTMOREOPTS:
-				DialogBox(hInstance,MAKEINTRESOURCE(IDD_BOOTOPTIONS),hwndDlg,(DLGPROC)MoreOptDlgProc);
-			break;
-			case IDC_PARTCREATE:
-				DialogBox(hInstance,MAKEINTRESOURCE(IDD_PARTITION),hwndDlg,(DLGPROC)PartitionDlgProc);
-			break;
-			case IDC_PARTDELETE:
-			break;
-		}
-		break;
-
-	  }
-	  case WM_NOTIFY:
-	  {
-          LPNMHDR lpnm = (LPNMHDR)lParam;
-
-		  switch (lpnm->code)
-		  {		
-		      case PSN_SETACTIVE:
-			PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
-			break;
-		      case PSN_QUERYCANCEL:
-	       		SetWindowLong(hwndDlg, DWL_MSGRESULT,MessageBox(GetParent(hwndDlg), abort_msg, abort_title, MB_YESNO | MB_ICONQUESTION) != IDYES);
-			return TRUE;
-		      default:
-			break;
-		  }
-	  break;
-	  }
-	  default:
-	  	break;
-
-  }
-  return FALSE;
+        }
+        break;
+
+        case WM_COMMAND:
+        {
+            switch(LOWORD(wParam))
+            {
+                case IDC_PARTMOREOPTS:
+                    DialogBox(hInstance,
+                              MAKEINTRESOURCE(IDD_BOOTOPTIONS),
+                              hwndDlg,
+                              (DLGPROC) MoreOptDlgProc);
+                    break;
+                case IDC_PARTCREATE:
+                    DialogBox(hInstance,
+                              MAKEINTRESOURCE(IDD_PARTITION),
+                              hwndDlg,
+                              (DLGPROC) PartitionDlgProc);
+                    break;
+                case IDC_PARTDELETE:
+                    break;
+            }
+            break;
+        }
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {        
+                case PSN_SETACTIVE:
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+                    break;
+
+                case PSN_QUERYCANCEL:
+                    SetWindowLong(hwndDlg,
+                                  DWL_MSGRESULT,
+                                  MessageBox(GetParent(hwndDlg),
+                                             abort_msg,
+                                             abort_title,
+                                             MB_YESNO | MB_ICONQUESTION) != IDYES);
+                    return TRUE;
+
+                default:
+                    break;
+            }
+        }
+        break;
+
+        default:
+            break;
+
+    }
+
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
@@ -683,48 +790,52 @@
                WPARAM wParam,
                LPARAM lParam)
 {
-  switch (uMsg)
-  {
-	  case WM_INITDIALOG:
-	  {
-		HWND hwndControl;
-		DWORD dwStyle;
-
-          	hwndControl = GetParent(hwndDlg);
-
-          	dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-	        SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
-		
-		hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
-		ShowWindow (hwndControl, SW_HIDE);
-		EnableWindow (hwndControl, FALSE);
-
-		/* Set title font */
-		/*SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);*/
-          }
-	  break;
-	  case WM_NOTIFY:
-	  {
-          LPNMHDR lpnm = (LPNMHDR)lParam;
-
-		  switch (lpnm->code)
-		  {		
-		      case PSN_SETACTIVE: 
-			PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT  | PSWIZB_BACK);
-			break;
-		      default:
-			break;
-		  }
-	  break;
-	  }
-	  default:
-	  	break;
-  }
-  return FALSE;
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            HWND hwndControl;
+            DWORD dwStyle;
+
+            hwndControl = GetParent(hwndDlg);
+
+            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+        
+            hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+            ShowWindow(hwndControl, SW_HIDE);
+            EnableWindow(hwndControl, FALSE);
+
+            /* Set title font */
+            /*SendDlgItemMessage(hwndDlg,
+                                 IDC_STARTTITLE,
+                                 WM_SETFONT,
+                                 (WPARAM)hTitleFont,
+                                 (LPARAM)TRUE);*/
+        }
+        break;
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {        
+                case PSN_SETACTIVE: 
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK);
+                    break;
+
+                default:
+                    break;
+            }
+        }
+        break;
+
+        default:
+            break;
+    }
+
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
@@ -733,51 +844,55 @@
                WPARAM wParam,
                LPARAM lParam)
 {
-  switch (uMsg)
-  {
-	  case WM_INITDIALOG:
-	  {
-		HWND hwndControl;
-		DWORD dwStyle;
-
-          	hwndControl = GetParent(hwndDlg);
-
-          	dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-	        SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
-		
-		hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
-		ShowWindow (hwndControl, SW_HIDE);
-		EnableWindow (hwndControl, FALSE);
-
-		/* Set title font */
-		/*SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);*/
-}
-	  break;
-	  case WM_NOTIFY:
-	  {
-          LPNMHDR lpnm = (LPNMHDR)lParam;
-
-		  switch (lpnm->code)
-		  {		
-		      case PSN_SETACTIVE: 
-			PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT );
-			// disable all buttons during installation process
-			// PropSheet_SetWizButtons(GetParent(hwndDlg), 0 );
-			break;
-		      default:
-			break;
-		  }
-	  }
-	  break;
-	  default:
-	  	break;
-
-  }
-  return FALSE;
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            HWND hwndControl;
+            DWORD dwStyle;
+
+            hwndControl = GetParent(hwndDlg);
+
+            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+        
+            hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+            ShowWindow(hwndControl, SW_HIDE);
+            EnableWindow(hwndControl, FALSE);
+
+            /* Set title font */
+            /*SendDlgItemMessage(hwndDlg,
+                                 IDC_STARTTITLE,
+                                 WM_SETFONT,
+                                 (WPARAM)hTitleFont,
+                                 (LPARAM)TRUE);*/
+        }
+        break;
+
+        case WM_NOTIFY:
+        {
+            LPNMHDR lpnm = (LPNMHDR)lParam;
+
+            switch (lpnm->code)
+            {        
+                case PSN_SETACTIVE: 
+                    PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
+                   // disable all buttons during installation process
+                   // PropSheet_SetWizButtons(GetParent(hwndDlg), 0 );
+                   break;
+
+                default:
+                   break;
+            }
+        }
+        break;
+
+        default:
+            break;
+
+    }
+
+    return FALSE;
 }
 
 static INT_PTR CALLBACK
@@ -786,396 +901,464 @@
                WPARAM wParam,
                LPARAM lParam)
 {
-  switch (uMsg)
-  {
-	  case WM_INITDIALOG:
-	  {
-		HWND hwndControl;
-		DWORD dwStyle;
-
-          	hwndControl = GetParent(hwndDlg);
-
-          	dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
-	        SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
-		
-		/* Set title font */
-		/*SendDlgItemMessage(hwndDlg,
-                             IDC_STARTTITLE,
-                             WM_SETFONT,
-                             (WPARAM)hTitleFont,
-                             (LPARAM)TRUE);*/
-	  }
-	  break;
-	  case WM_TIMER:
-	  {
-           INT Position;
-           HWND hWndProgress;
-
-           hWndProgress = GetDlgItem(hwndDlg, IDC_RESTART_PROGRESS);
-           Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
-           if (Position == 300)
-           {
-             KillTimer(hwndDlg, 1);
-             PropSheet_PressButton(GetParent(hwndDlg), PSBTN_FINISH);
-           }
-           else
-           {
-             SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
-           }
-          return TRUE;
-	  }
-	  case WM_DESTROY:
-	  	return TRUE;
-	  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);
-	                SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 300));
-        	        SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETPOS, 0, 0);
-	                SetTimer(hwndDlg, 1, 50, NULL);
-			break;
-		      default:
-			break;
-		  }
-	  break;
-	  }
-	  default:
-	  	break;
-
-  }
-  return FALSE;
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+        {
+            HWND hwndControl;
+            DWORD dwStyle;
+
+            hwndControl = GetParent(hwndDlg);
+
+            dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+            SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+        
+            /* Set title font */
+            /*SendDlgItemMessage(hwndDlg,
+                                 IDC_STARTTITLE,
+                                 WM_SETFONT,
+                                 (WPARAM)hTitleFont,
+                                 (LPARAM)TRUE);*/
+        }
+        break;
+
+        case WM_TIMER:
+        {
+            INT Position;
+            HWND hWndProgress;
+
+            hWndProgress = GetDlgItem(hwndDlg, IDC_RESTART_PROGRESS);
+            Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
+            if (Position == 300)
+            {
+                KillTimer(hwndDlg, 1);
+                PropSheet_PressButton(GetParent(hwndDlg), PSBTN_FINISH);
+            }
+            else
+            {
+                SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
+            }
+            return TRUE;
+        }
+
+        case WM_DESTROY:
+            return TRUE;
+
+        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);
+                    SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 300));
+                    SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETPOS, 0, 0);
+                    SetTimer(hwndDlg, 1, 50, NULL);
+                }
+                break;
+
+                default:
+                    break;
+            }
+        }
+        break;
+
+        default:
+            break;
+
+    }
+
+    return FALSE;
 }
 
 void LoadSetupData()
 {
-	WCHAR szPath[MAX_PATH];
-	TCHAR tmp[10];
-	WCHAR *ch;
-	HINF hTxtsetupSif;
-	INFCONTEXT InfContext;
-	//TCHAR szValue[MAX_PATH];
-	DWORD LineLength;
-	LONG Count;
-
-	GetModuleFileNameW(NULL,szPath,MAX_PATH);
-	ch = strrchrW(szPath,L'\\');
-	if (ch != NULL)
-		*ch = L'\0';
-
-	wcscat(szPath, L"\\txtsetup.sif");
-	hTxtsetupSif = SetupOpenInfFileW(szPath, NULL, INF_STYLE_OLDNT, NULL);
-	if (hTxtsetupSif != INVALID_HANDLE_VALUE)
-	{
-		// get language list
-		Count = SetupGetLineCount(hTxtsetupSif, _T("Language"));
-		if (Count > 0)
-		{
-                	SetupData.pLanguages = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LANG) * Count);
-			if (SetupData.pLanguages != NULL)
-			{
-				SetupData.LangCount = Count;
-				Count = 0;
-				if (SetupFindFirstLine(hTxtsetupSif, _T("Language"),
-				NULL,&InfContext))
-					do
-					{
-						SetupGetStringField(&InfContext, 0, SetupData.pLanguages[Count].LangId, sizeof(SetupData.pLanguages[Count].LangId) / sizeof(TCHAR), &LineLength);
-						SetupGetStringField(&InfContext, 1, SetupData.pLanguages[Count].LangName, sizeof(SetupData.pLanguages[Count].LangName) / sizeof(TCHAR), &LineLength);
-						++Count;
-					}
-					while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.LangCount);
-			}
-		}
-    		// get keyboard layout list
-		Count = SetupGetLineCount(hTxtsetupSif, _T("KeyboardLayout"));
-		if (Count > 0)
-		{
-                	SetupData.pKbLayouts = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(KBLAYOUT) * Count);
-			if (SetupData.pKbLayouts != NULL)
-			{
-				SetupData.KbLayoutCount = Count;
-				Count = 0;
-				if (SetupFindFirstLine(hTxtsetupSif, _T("KeyboardLayout"),
-				NULL,&InfContext))
-					do
-					{
-						SetupGetStringField(&InfContext, 0, SetupData.pKbLayouts[Count].LayoutId, sizeof(SetupData.pKbLayouts[Count].LayoutId) / sizeof(TCHAR), &LineLength);
-						SetupGetStringField(&InfContext, 1, SetupData.pKbLayouts[Count].LayoutName, sizeof(SetupData.pKbLayouts[Count].LayoutName) / sizeof(TCHAR), &LineLength);
-						++Count;
-					}
-					while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.LangCount);
-			}
-		}
-    		// get default for keyboard and language
-		SetupData.DefaultKBLayout = -1;
-		SetupData.DefaultLang = -1;
-		// TODO: get defaults from underlaying running system
-		if (SetupFindFirstLine(hTxtsetupSif, _T("NLS"),_T("DefaultLayout"),&InfContext))
-		{
-			SetupGetStringField(&InfContext, 1, tmp, sizeof(tmp) / sizeof(TCHAR), &LineLength);
-			for (Count=0;Count<SetupData.KbLayoutCount;Count++)
-				if (_tcscmp(tmp,SetupData.pKbLayouts[Count].LayoutId)==0)
-				{
-					SetupData.DefaultKBLayout = Count;
-					break;
-				}
-		}
-		if (SetupFindFirstLine(hTxtsetupSif, _T("NLS"),_T("DefaultLanguage"),&InfContext))
-		{
-			SetupGetStringField(&InfContext, 1, tmp, sizeof(tmp) / sizeof(TCHAR), &LineLength);
-			for (Count=0;Count<SetupData.LangCount;Count++)
-				if (_tcscmp(tmp,SetupData.pLanguages[Count].LangId)==0)
-				{
-					SetupData.DefaultLang = Count;
-					break;
-				}
-		}
-		// get computers list
-		Count = SetupGetLineCount(hTxtsetupSif, _T("Computer"));
-		if (Count > 0)
-		{
-                	SetupData.pComputers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GENENTRY) * Count);
-			if (SetupData.pComputers != NULL)
-			{
-				SetupData.CompCount = Count;
-				Count = 0;
-				if (SetupFindFirstLine(hTxtsetupSif, _T("Computer"),
-				NULL,&InfContext))
-					do
-					{
-						SetupGetStringField(&InfContext, 0, SetupData.pComputers[Count].Id, sizeof(SetupData.pComputers[Count].Id) / sizeof(TCHAR), &LineLength);
-						SetupGetStringField(&InfContext, 1, SetupData.pComputers[Count].Value, sizeof(SetupData.pComputers[Count].Value) / sizeof(TCHAR), &LineLength);
-						++Count;
-					}
-					while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.CompCount);
-			}
-		}
-		// get display list
-		Count = SetupGetLineCount(hTxtsetupSif, _T("Display"));
-		if (Count > 0)
-		{
-                	SetupData.pDisplays = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GENENTRY) * Count);
-			if (SetupData.pDisplays != NULL)
-			{
-				SetupData.DispCount = Count;
-				Count = 0;
-				if (SetupFindFirstLine(hTxtsetupSif, _T("Display"),
-				NULL,&InfContext))
-					do
-					{
-						SetupGetStringField(&InfContext, 0, SetupData.pDisplays[Count].Id, sizeof(SetupData.pDisplays[Count].Id) / sizeof(TCHAR), &LineLength);
-						SetupGetStringField(&InfContext, 1, SetupData.pDisplays[Count].Value, sizeof(SetupData.pDisplays[Count].Value) / sizeof(TCHAR), &LineLength);
-						++Count;
-					}
-					while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.DispCount);
-			}
-		}
-		// get keyboard list
-		Count = SetupGetLineCount(hTxtsetupSif, _T("Keyboard"));
-		if (Count > 0)
-		{
-                	SetupData.pKeyboards = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GENENTRY) * Count);
-			if (SetupData.pKeyboards != NULL)
-			{
-				SetupData.KeybCount = Count;
-				Count = 0;
-				if (SetupFindFirstLine(hTxtsetupSif, _T("Keyboard"),
-				NULL,&InfContext))
-					do
-					{
-						SetupGetStringField(&InfContext, 0, SetupData.pKeyboards[Count].Id, sizeof(SetupData.pKeyboards[Count].Id) / sizeof(TCHAR), &LineLength);
-						SetupGetStringField(&InfContext, 1, SetupData.pKeyboards[Count].Value, sizeof(SetupData.pKeyboards[Count].Value) / sizeof(TCHAR), &LineLength);
-						++Count;
-					}
-					while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.KeybCount);
-			}
-		}
-		// get install directory
-		if (SetupFindFirstLine(hTxtsetupSif, _T("SetupData"),
-			_T("DefaultPath"),&InfContext))
-		{
-			SetupGetStringField(&InfContext, 1,
-				SetupData.InstallDir,
-				sizeof(SetupData.InstallDir) / sizeof(TCHAR), &LineLength);
-		}
-		SetupCloseInfFile(hTxtsetupSif);
-  	}
+    WCHAR szPath[MAX_PATH];
+    TCHAR tmp[10];
+    WCHAR *ch;
+    HINF hTxtsetupSif;
+    INFCONTEXT InfContext;
+    //TCHAR szValue[MAX_PATH];
+    DWORD LineLength;
+    LONG Count;
+
+    GetModuleFileNameW(NULL,szPath,MAX_PATH);
+    ch = strrchrW(szPath,L'\\');
+    if (ch != NULL)
+        *ch = L'\0';
+
+    wcscat(szPath, L"\\txtsetup.sif");
+    hTxtsetupSif = SetupOpenInfFileW(szPath, NULL, INF_STYLE_OLDNT, NULL);
+    if (hTxtsetupSif != INVALID_HANDLE_VALUE)
+    {
+        // get language list
+        Count = SetupGetLineCount(hTxtsetupSif, _T("Language"));
+        if (Count > 0)
+        {
+            SetupData.pLanguages = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LANG) * Count);
+            if (SetupData.pLanguages != NULL)
+            {
+                SetupData.LangCount = Count;
+                Count = 0;
+                if (SetupFindFirstLine(hTxtsetupSif, _T("Language"), NULL, &InfContext))
+                {
+                    do
+                    {
+                        SetupGetStringField(&InfContext,
+                                            0,
+                                            SetupData.pLanguages[Count].LangId,
+                                            sizeof(SetupData.pLanguages[Count].LangId) / sizeof(TCHAR),
+                                            &LineLength);
+
+                        SetupGetStringField(&InfContext,
+                                            1,
+                                            SetupData.pLanguages[Count].LangName,
+                                            sizeof(SetupData.pLanguages[Count].LangName) / sizeof(TCHAR),
+                                            &LineLength);
+                        ++Count;
+                    }
+                while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.LangCount);
+                }
+            }
+        }
+
+        // get keyboard layout list
+        Count = SetupGetLineCount(hTxtsetupSif, _T("KeyboardLayout"));
+        if (Count > 0)
+        {
+            SetupData.pKbLayouts = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(KBLAYOUT) * Count);
+            if (SetupData.pKbLayouts != NULL)
+            {
+                SetupData.KbLayoutCount = Count;
+                Count = 0;
+                if (SetupFindFirstLine(hTxtsetupSif, _T("KeyboardLayout"), NULL, &InfContext))
+                {
+                    do
+                    {
+                        SetupGetStringField(&InfContext,
+                                            0,
+                                            SetupData.pKbLayouts[Count].LayoutId,
+                                            sizeof(SetupData.pKbLayouts[Count].LayoutId) / sizeof(TCHAR),
+                                            &LineLength);
+
+                        SetupGetStringField(&InfContext,
+                                            1,
+                                            SetupData.pKbLayouts[Count].LayoutName,
+                                            sizeof(SetupData.pKbLayouts[Count].LayoutName) / sizeof(TCHAR),
+                                            &LineLength);
+                        ++Count;
+                    }
+                    while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.LangCount);
+                }
+            }
+        }
+
+        // get default for keyboard and language
+        SetupData.DefaultKBLayout = -1;
+        SetupData.DefaultLang = -1;
+
+        // TODO: get defaults from underlaying running system
+        if (SetupFindFirstLine(hTxtsetupSif, _T("NLS"), _T("DefaultLayout"), &InfContext))
+        {
+            SetupGetStringField(&InfContext, 1, tmp, sizeof(tmp) / sizeof(TCHAR), &LineLength);
+            for (Count = 0; Count < SetupData.KbLayoutCount; Count++)
+                if (_tcscmp(tmp, SetupData.pKbLayouts[Count].LayoutId) == 0)
+                {
+                    SetupData.DefaultKBLayout = Count;
+                    break;
+                }
+        }
+
+        if (SetupFindFirstLine(hTxtsetupSif, _T("NLS"), _T("DefaultLanguage"), &InfContext))
+        {
+            SetupGetStringField(&InfContext, 1, tmp, sizeof(tmp) / sizeof(TCHAR), &LineLength);
+            for (Count = 0; Count < SetupData.LangCount; Count++)
+                if (_tcscmp(tmp, SetupData.pLanguages[Count].LangId) == 0)
+                {
+                    SetupData.DefaultLang = Count;
+                    break;
+                }
+        }
+
+        // get computers list
+        Count = SetupGetLineCount(hTxtsetupSif, _T("Computer"));
+        if (Count > 0)
+        {
+            SetupData.pComputers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GENENTRY) * Count);
+            if (SetupData.pComputers != NULL)
+            {
+                SetupData.CompCount = Count;
+                Count = 0;
+                if (SetupFindFirstLine(hTxtsetupSif, _T("Computer"), NULL, &InfContext))
+                {
+                    do
+                    {
+                        SetupGetStringField(&InfContext,
+                                            0,
+                                            SetupData.pComputers[Count].Id,
+                                            sizeof(SetupData.pComputers[Count].Id) / sizeof(TCHAR),
+                                            &LineLength);
+
+                        SetupGetStringField(&InfContext,
+                                            1,
+                                            SetupData.pComputers[Count].Value,
+                                            sizeof(SetupData.pComputers[Count].Value) / sizeof(TCHAR),
+                                            &LineLength);
+                        ++Count;
+                    }
+                    while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.CompCount);
+                }
+            }
+        }
+
+        // get display list
+        Count = SetupGetLineCount(hTxtsetupSif, _T("Display"));
+        if (Count > 0)
+        {
+            SetupData.pDisplays = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GENENTRY) * Count);
+            if (SetupData.pDisplays != NULL)
+            {
+                SetupData.DispCount = Count;
+                Count = 0;
+
+                if (SetupFindFirstLine(hTxtsetupSif, _T("Display"), NULL, &InfContext))
+                {
+                    do
+                    {
+                        SetupGetStringField(&InfContext,
+                                            0,
+                                            SetupData.pDisplays[Count].Id,
+                                            sizeof(SetupData.pDisplays[Count].Id) / sizeof(TCHAR),
+                                            &LineLength);
+
+                        SetupGetStringField(&InfContext,
+                                            1,
+                                            SetupData.pDisplays[Count].Value,
+                                            sizeof(SetupData.pDisplays[Count].Value) / sizeof(TCHAR),
+                                            &LineLength);
+                        ++Count;
+                    }
+                    while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.DispCount);
+                }
+            }
+        }
+
+        // get keyboard list
+        Count = SetupGetLineCount(hTxtsetupSif, _T("Keyboard"));
+        if (Count > 0)
+        {
+            SetupData.pKeyboards = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GENENTRY) * Count);
+            if (SetupData.pKeyboards != NULL)
+            {
+                SetupData.KeybCount = Count;
+                Count = 0;
+
+                if (SetupFindFirstLine(hTxtsetupSif, _T("Keyboard"), NULL, &InfContext))
+                {
+                    do
+                    {
+                        SetupGetStringField(&InfContext,
+                                            0,
+                                            SetupData.pKeyboards[Count].Id,
+                                            sizeof(SetupData.pKeyboards[Count].Id) / sizeof(TCHAR),
+                                            &LineLength);
+
+                        SetupGetStringField(&InfContext,
+                                            1,
+                                            SetupData.pKeyboards[Count].Value,
+                                            sizeof(SetupData.pKeyboards[Count].Value) / sizeof(TCHAR),
+                                            &LineLength);
+                        ++Count;
+                    }
+                    while (SetupFindNextLine(&InfContext, &InfContext) && Count < SetupData.KeybCount);
+                }
+            }
+        }
+
+        // get install directory
+        if (SetupFindFirstLine(hTxtsetupSif, _T("SetupData"), _T("DefaultPath"), &InfContext))
+        {
+            SetupGetStringField(&InfContext,
+                                1,
+                                SetupData.InstallDir,
+                                sizeof(SetupData.InstallDir) / sizeof(TCHAR),
+                                &LineLength);
+        }
+        SetupCloseInfFile(hTxtsetupSif);
+    }
 }
 
 BOOL isUnattendSetup()
 {
-	WCHAR szPath[MAX_PATH];
-	WCHAR *ch;
-	HINF hUnattendedInf;
-	INFCONTEXT InfContext;
-	TCHAR szValue[MAX_PATH];
-	DWORD LineLength;
-	//HKEY hKey;
-	BOOL result = 0;
-
-	GetModuleFileNameW(NULL,szPath,MAX_PATH);
-	ch = strrchrW(szPath,L'\\');
-	if (ch != NULL)
-		*ch = L'\0';
-
-	wcscat(szPath, L"\\unattend.inf");
-	hUnattendedInf = SetupOpenInfFileW(szPath, NULL, INF_STYLE_OLDNT, NULL);
-	if (hUnattendedInf != INVALID_HANDLE_VALUE)
-	{
-		if (SetupFindFirstLine(hUnattendedInf, _T("Unattend"),
-			_T("UnattendSetupEnabled"),&InfContext))
-		{
-			if (SetupGetStringField(&InfContext, 1, szValue,
-			sizeof(szValue) / sizeof(TCHAR), &LineLength) &&
-			(_tcsicmp(szValue, _T("yes"))==0))
-			{
-				result = 1; // unattendSetup enabled
-
-				// read values and store in SetupData
-			}
-		}
-    		SetupCloseInfFile(hUnattendedInf);
-  	}
-	return result;
+    WCHAR szPath[MAX_PATH];
+    WCHAR *ch;
+    HINF hUnattendedInf;
+    INFCONTEXT InfContext;
+    TCHAR szValue[MAX_PATH];
+    DWORD LineLength;
+    //HKEY hKey;
+    BOOL result = 0;
+
+    GetModuleFileNameW(NULL, szPath, MAX_PATH);
+    ch = strrchrW(szPath, L'\\');
+    if (ch != NULL)
+        *ch = L'\0';
+
+    wcscat(szPath, L"\\unattend.inf");
+    hUnattendedInf = SetupOpenInfFileW(szPath, NULL, INF_STYLE_OLDNT, NULL);
+
+    if (hUnattendedInf != INVALID_HANDLE_VALUE)
+    {
+        if (SetupFindFirstLine(hUnattendedInf, _T("Unattend"), _T("UnattendSetupEnabled"),&InfContext))
+        {
+            if (SetupGetStringField(&InfContext,
+                                    1,
+                                    szValue,
+                                    sizeof(szValue) / sizeof(TCHAR),
+                                    &LineLength) && (_tcsicmp(szValue, _T("yes")) == 0))
+            {
+                result = 1; // unattendSetup enabled
+                // read values and store in SetupData
+            }
+        }
+            SetupCloseInfFile(hUnattendedInf);
+    }
+
+    return result;
 }
 
 int WINAPI
 WinMain(HINSTANCE hInst,
-	HINSTANCE hPrevInstance,
-	LPSTR lpszCmdLine,
-	int nCmdShow)
-{
-  PROPSHEETHEADER psh;
-  HPROPSHEETPAGE ahpsp[8];
-  PROPSHEETPAGE psp = {0};
-  UINT nPages = 0;
-  hInstance = hInst;
-  isUnattend = isUnattendSetup();
-
-  if (!isUnattend)
-  {
-
-  LoadString(hInst,IDS_ABORTSETUP, abort_msg, sizeof(abort_msg)/sizeof(TCHAR));
-  LoadString(hInst,IDS_ABORTSETUP2, abort_title,sizeof(abort_title)/sizeof(TCHAR));
-
-  LoadSetupData();
-
-  /* Create the Start page, until setup is working */
-  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);
-
-  /* Create language selection page */
-  psp.dwSize = sizeof(PROPSHEETPAGE);
-  psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
-  psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_LANGTITLE);
-  psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_LANGSUBTITLE);
-  psp.hInstance = hInst;
-  psp.lParam = 0;
-  psp.pfnDlgProc = LangSelDlgProc;
-  psp.pszTemplate = MAKEINTRESOURCE(IDD_LANGSELPAGE);
-  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
-
-  /* Create install type selection page */
-  psp.dwSize = sizeof(PROPSHEETPAGE);
-  psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
-  psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TYPETITLE);
-  psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_TYPESUBTITLE);
-  psp.hInstance = hInst;
-  psp.lParam = 0;
-  psp.pfnDlgProc = TypeDlgProc;
-  psp.pszTemplate = MAKEINTRESOURCE(IDD_TYPEPAGE);
-  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
-
-  /* Create device settings page */
-  psp.dwSize = sizeof(PROPSHEETPAGE);
-  psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
-  psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_DEVICETITLE);
-  psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DEVICESUBTITLE);
-  psp.hInstance = hInst;
-  psp.lParam = 0;
-  psp.pfnDlgProc = DeviceDlgProc;
-  psp.pszTemplate = MAKEINTRESOURCE(IDD_DEVICEPAGE);
-  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
-
-  /* Create install device settings page / boot method / install directory */
-  psp.dwSize = sizeof(PROPSHEETPAGE);
-  psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
-  psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_DRIVETITLE);
-  psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DRIVESUBTITLE);
-  psp.hInstance = hInst;
-  psp.lParam = 0;
-  psp.pfnDlgProc = DriveDlgProc;
-  psp.pszTemplate = MAKEINTRESOURCE(IDD_DRIVEPAGE);
-  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
-
-  /* Create summary page */
-  psp.dwSize = sizeof(PROPSHEETPAGE);
-  psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
-  psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_SUMMARYTITLE);
-  psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_SUMMARYSUBTITLE);
-  psp.hInstance = hInst;
-  psp.lParam = 0;
-  psp.pfnDlgProc = SummaryDlgProc;
-  psp.pszTemplate = MAKEINTRESOURCE(IDD_SUMMARYPAGE);
-  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
-  
-  }
-
-  /* Create installation progress page */
-  psp.dwSize = sizeof(PROPSHEETPAGE);
-  psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
-  psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_PROCESSTITLE);
-  psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_PROCESSSUBTITLE);
-  psp.hInstance = hInst;
-  psp.lParam = 0;
-  psp.pfnDlgProc = ProcessDlgProc;
-  psp.pszTemplate = MAKEINTRESOURCE(IDD_PROCESSPAGE);
-  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
-
-  if (!isUnattend)
-  {
-  /* Create finish to reboot page */
-  psp.dwSize = sizeof(PROPSHEETPAGE);
-  psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
-  psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_RESTARTTITLE);
-  psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_RESTARTSUBTITLE);
-  psp.hInstance = hInst;
-  psp.lParam = 0;
-  psp.pfnDlgProc = RestartDlgProc;
-  psp.pszTemplate = MAKEINTRESOURCE(IDD_RESTARTPAGE);
-  ahpsp[nPages++] = CreatePropertySheetPage(&psp);
-  }
-
-  /* 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);
-
-  /* Create title font */
-  hTitleFont = CreateTitleFont();
-
-  /* Display the wizard */
-  PropertySheet(&psh);
-
-  DeleteObject(hTitleFont);
-
-  return 0;
-
+        HINSTANCE hPrevInstance,
+        LPSTR lpszCmdLine,
+        int nCmdShow)
+{
+    PROPSHEETHEADER psh;
+    HPROPSHEETPAGE ahpsp[8];
+    PROPSHEETPAGE psp = {0};
+    UINT nPages = 0;
+    hInstance = hInst;
+    isUnattend = isUnattendSetup();
+
+    if (!isUnattend)
+    {
+        LoadString(hInst,IDS_ABORTSETUP, abort_msg, sizeof(abort_msg)/sizeof(TCHAR));
+        LoadString(hInst,IDS_ABORTSETUP2, abort_title,sizeof(abort_title)/sizeof(TCHAR));
+
+        LoadSetupData();
+
+        /* Create the Start page, until setup is working */
+        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);
+
+        /* Create language selection page */
+        psp.dwSize = sizeof(PROPSHEETPAGE);
+        psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+        psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_LANGTITLE);
+        psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_LANGSUBTITLE);
+        psp.hInstance = hInst;
+        psp.lParam = 0;
+        psp.pfnDlgProc = LangSelDlgProc;
+        psp.pszTemplate = MAKEINTRESOURCE(IDD_LANGSELPAGE);
+        ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+        /* Create install type selection page */
+        psp.dwSize = sizeof(PROPSHEETPAGE);
+        psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+        psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_TYPETITLE);
+        psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_TYPESUBTITLE);
+        psp.hInstance = hInst;
+        psp.lParam = 0;
+        psp.pfnDlgProc = TypeDlgProc;
+        psp.pszTemplate = MAKEINTRESOURCE(IDD_TYPEPAGE);
+        ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+        /* Create device settings page */
+        psp.dwSize = sizeof(PROPSHEETPAGE);
+        psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+        psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_DEVICETITLE);
+        psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DEVICESUBTITLE);
+        psp.hInstance = hInst;
+        psp.lParam = 0;
+        psp.pfnDlgProc = DeviceDlgProc;
+        psp.pszTemplate = MAKEINTRESOURCE(IDD_DEVICEPAGE);
+        ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+        /* Create install device settings page / boot method / install directory */
+        psp.dwSize = sizeof(PROPSHEETPAGE);
+        psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+        psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_DRIVETITLE);
+        psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DRIVESUBTITLE);
+        psp.hInstance = hInst;
+        psp.lParam = 0;
+        psp.pfnDlgProc = DriveDlgProc;
+        psp.pszTemplate = MAKEINTRESOURCE(IDD_DRIVEPAGE);
+        ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+        /* Create summary page */
+        psp.dwSize = sizeof(PROPSHEETPAGE);
+        psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+        psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_SUMMARYTITLE);
+        psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_SUMMARYSUBTITLE);
+        psp.hInstance = hInst;
+        psp.lParam = 0;
+        psp.pfnDlgProc = SummaryDlgProc;
+        psp.pszTemplate = MAKEINTRESOURCE(IDD_SUMMARYPAGE);
+        ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+    }
+
+    /* Create installation progress page */
+    psp.dwSize = sizeof(PROPSHEETPAGE);
+    psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+    psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_PROCESSTITLE);
+    psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_PROCESSSUBTITLE);
+    psp.hInstance = hInst;
+    psp.lParam = 0;
+    psp.pfnDlgProc = ProcessDlgProc;
+    psp.pszTemplate = MAKEINTRESOURCE(IDD_PROCESSPAGE);
+    ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+
+    if (!isUnattend)
+    {
+        /* Create finish to reboot page */
+        psp.dwSize = sizeof(PROPSHEETPAGE);
+        psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+        psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_RESTARTTITLE);
+        psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_RESTARTSUBTITLE);
+        psp.hInstance = hInst;
+        psp.lParam = 0;
+        psp.pfnDlgProc = RestartDlgProc;
+        psp.pszTemplate = MAKEINTRESOURCE(IDD_RESTARTPAGE);
+        ahpsp[nPages++] = CreatePropertySheetPage(&psp);
+    }
+
+    /* 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);
+
+    /* Create title font */
+    hTitleFont = CreateTitleFont();
+
+    /* Display the wizard */
+    PropertySheet(&psh);
+
+    DeleteObject(hTitleFont);
+
+    return 0;
 }
 
 /* EOF */

Modified: trunk/reactos/base/setup/reactos/resource.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/resource.h?rev=37588&r1=37587&r2=37588&view=diff
==============================================================================
--- trunk/reactos/base/setup/reactos/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/resource.h [iso-8859-1] Sun Nov 23 07:52:57 2008
@@ -1,66 +1,65 @@
-
 #ifndef RESOURCE_H
 #define RESOURCE_H
 
-#define IDB_WATERMARK			100
-#define IDB_HEADER			101
-#define IDB_ROSLOGO			102
+#define IDB_WATERMARK          100
+#define IDB_HEADER             101
+#define IDB_ROSLOGO            102
 
-#define IDC_STATIC -1
+#define IDC_STATIC             -1
 
-#define IDD_STARTPAGE		2000
-#define IDC_STARTTITLE		2001
-#define IDD_LANGSELPAGE		2002
-#define IDS_LANGTITLE		2003
-#define IDS_LANGSUBTITLE	2004
-#define IDC_LANGUAGES		2005
-#define IDD_TYPEPAGE		2006
-#define IDS_TYPETITLE		2007
-#define IDS_TYPESUBTITLE	2008
-#define IDC_INSTALL		2009
-#define IDC_SETUP		2010
-#define IDD_DEVICEPAGE		2011
-#define IDS_DEVICETITLE		2012
-#define IDS_DEVICESUBTITLE	2013
-#define IDC_COMPUTER		2014
-#define IDC_DISPLAY		2015
-#define IDC_KEYBOARD		2016
-#define IDC_KEYLAYOUT		2017
-#define IDD_DRIVEPAGE		2018
-#define IDS_DRIVETITLE		2019
-#define IDS_DRIVESUBTITLE	2020
-#define IDC_PARTITION		2021
-#define IDC_PARTCREATE		2022
-#define IDC_PARTDELETE		2023
-#define IDC_INSTFREELDR		2024
-#define IDC_NOINSTFREELDR	2025
-#define IDC_PATH		2026
-#define IDD_PROCESSPAGE		2027
-#define IDS_PROCESSTITLE	2028
-#define IDS_PROCESSSUBTITLE	2029
-#define IDC_ACTIVITY		2030
-#define IDC_ITEM		2031
-#define IDC_PROCESSPROGRESS	2032
-#define	IDD_RESTARTPAGE		2033
-#define IDS_RESTARTTITLE	2034
-#define IDS_RESTARTSUBTITLE	2035
-#define IDC_FINISHTITLE		2036
-#define IDC_RESTART_PROGRESS	2037
-#define IDS_ABORTSETUP		2038
-#define IDS_ABORTSETUP2		2039
-#define IDC_ACTION		2040
-#define IDC_PARTMOREOPTS	2041
-#define IDD_BOOTOPTIONS		2042
-#define IDD_PARTITION		2043
-#define IDC_UPDOWN1		2044
-#define IDC_PARTSIZE		2045
-#define IDC_UNIT		2046
-#define IDC_FSTYPE		2047
-#define IDD_SUMMARYPAGE		2048
-#define IDS_SUMMARYTITLE	2049
-#define IDS_SUMMARYSUBTITLE	2050
-#define IDC_DEVICEDRIVER	2051
+#define IDD_STARTPAGE          2000
+#define IDC_STARTTITLE         2001
+#define IDD_LANGSELPAGE        2002
+#define IDS_LANGTITLE          2003
+#define IDS_LANGSUBTITLE       2004
+#define IDC_LANGUAGES          2005
+#define IDD_TYPEPAGE           2006
+#define IDS_TYPETITLE          2007
+#define IDS_TYPESUBTITLE       2008
+#define IDC_INSTALL            2009
+#define IDC_SETUP              2010
+#define IDD_DEVICEPAGE         2011
+#define IDS_DEVICETITLE        2012
+#define IDS_DEVICESUBTITLE     2013
+#define IDC_COMPUTER           2014
+#define IDC_DISPLAY            2015
+#define IDC_KEYBOARD           2016
+#define IDC_KEYLAYOUT          2017
+#define IDD_DRIVEPAGE          2018
+#define IDS_DRIVETITLE         2019
+#define IDS_DRIVESUBTITLE      2020
+#define IDC_PARTITION          2021
+#define IDC_PARTCREATE         2022
+#define IDC_PARTDELETE         2023
+#define IDC_INSTFREELDR        2024
+#define IDC_NOINSTFREELDR      2025
+#define IDC_PATH               2026
+#define IDD_PROCESSPAGE        2027
+#define IDS_PROCESSTITLE       2028
+#define IDS_PROCESSSUBTITLE    2029
+#define IDC_ACTIVITY           2030
+#define IDC_ITEM               2031
+#define IDC_PROCESSPROGRESS    2032
+#define IDD_RESTARTPAGE        2033
+#define IDS_RESTARTTITLE       2034
+#define IDS_RESTARTSUBTITLE    2035
+#define IDC_FINISHTITLE        2036
+#define IDC_RESTART_PROGRESS   2037
+#define IDS_ABORTSETUP         2038
+#define IDS_ABORTSETUP2        2039
+#define IDC_ACTION             2040
+#define IDC_PARTMOREOPTS       2041
+#define IDD_BOOTOPTIONS        2042
+#define IDD_PARTITION          2043
+#define IDC_UPDOWN1            2044
+#define IDC_PARTSIZE           2045
+#define IDC_UNIT               2046
+#define IDC_FSTYPE             2047
+#define IDD_SUMMARYPAGE        2048
+#define IDS_SUMMARYTITLE       2049
+#define IDS_SUMMARYSUBTITLE    2050
+#define IDC_DEVICEDRIVER       2051
 
-#define IDI_MAIN      3000
+#define IDI_MAIN               3000
 
 #endif



More information about the Ros-diffs mailing list