From 907f06b00946e7e8839fa5a352f3b137e3bc6fde Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 18 Apr 2008 15:36:29 +0000 Subject: [PATCH] - implement system page svn path=/trunk/; revision=33023 --- reactos/base/applications/dxdiag/dxdiag.c | 2 +- .../base/applications/dxdiag/dxdiag.rbuild | 3 +- .../base/applications/dxdiag/lang/de-DE.rc | 56 ++- .../base/applications/dxdiag/lang/en-US.rc | 46 ++- .../base/applications/dxdiag/lang/fr-FR.rc | 44 ++- .../base/applications/dxdiag/lang/pl-PL.rc | 44 ++- .../base/applications/dxdiag/lang/ru-RU.rc | 44 ++- reactos/base/applications/dxdiag/precomp.h | 3 + reactos/base/applications/dxdiag/resource.h | 33 +- reactos/base/applications/dxdiag/system.c | 320 +++++++++++++++++- 10 files changed, 535 insertions(+), 60 deletions(-) diff --git a/reactos/base/applications/dxdiag/dxdiag.c b/reactos/base/applications/dxdiag/dxdiag.c index 527174f63b2..4ab34adcc21 100644 --- a/reactos/base/applications/dxdiag/dxdiag.c +++ b/reactos/base/applications/dxdiag/dxdiag.c @@ -44,7 +44,7 @@ InsertTabCtrlItem(HWND hDlgCtrl, INT Position, UINT uId) item.mask = TCIF_TEXT; item.pszText = szName; - (void)TabCtrl_InsertItemW(hDlgCtrl, Position, &item); + SendMessageW(hDlgCtrl, TCM_INSERTITEM, Position, (LPARAM)&item); } VOID diff --git a/reactos/base/applications/dxdiag/dxdiag.rbuild b/reactos/base/applications/dxdiag/dxdiag.rbuild index 7f481fbf8c0..032caff3136 100644 --- a/reactos/base/applications/dxdiag/dxdiag.rbuild +++ b/reactos/base/applications/dxdiag/dxdiag.rbuild @@ -5,12 +5,13 @@ 0x600 - 0x501 + 0x600 kernel32 user32 advapi32 comctl32 shell32 + version system.c display.c sound.c diff --git a/reactos/base/applications/dxdiag/lang/de-DE.rc b/reactos/base/applications/dxdiag/lang/de-DE.rc index 97580fc90e9..cecf4fea95b 100644 --- a/reactos/base/applications/dxdiag/lang/de-DE.rc +++ b/reactos/base/applications/dxdiag/lang/de-DE.rc @@ -1,58 +1,83 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 260 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "ReactX-Diagnoseprogramm" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,195 - PUSHBUTTON "&Hilfe", IDC_BUTTON_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - DEFPUSHBUTTON "&Nächste Seite", IDC_BUTTON_NEXT, 137, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Alle &Informationen speichern...", IDC_BUTTON_SAVE_INFO, 200, 201, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Beenden", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CONTROL "Tab1",IDC_TAB_CONTROL,"SysTabControl32",WS_TABSTOP,2,2,374,230 + PUSHBUTTON "&Hilfe", IDC_BUTTON_HELP, 2, 241, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + DEFPUSHBUTTON "&Nächste Seite", IDC_BUTTON_NEXT, 137, 241, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Alle &Informationen speichern...", IDC_BUTTON_SAVE_INFO, 200, 241, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Beenden", IDC_BUTTON_EXIT, 323, 241, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + LTEXT "Dieses Hilfsprogramm gibt detailierte Informationen über die ReactX-Komponenten und -Treiber dieses Computers an.", -1, 10, 10, 343, 17 + LTEXT "Wählen Sie die entsprechende Registerkarte oben, wenn Sie den Bereich des Problems bereits kennen. Klicken Sie andernfalls auf ""Nächste Seite"", um alle Seiten nacheinander zu durchsuchen.", -1, 10, 30, 343, 25 + GROUPBOX "Systeminformationen", -1, 10, 55, 343, 130, SS_RIGHT + LTEXT "Aktuelles Datum/Zeit:", -1, 70, 70, 80, 10, SS_RIGHT + LTEXT "Computername:", -1, 70, 80, 80, 10, SS_RIGHT + LTEXT "Betriebssystem:", -1, 70, 90, 80, 10, SS_RIGHT + LTEXT "Sprache:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "Systemhersteller:", -1, 70, 110, 80, 10, SS_RIGHT + LTEXT "Systemmodell:", -1, 70, 120, 80, 10, SS_RIGHT + LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT + LTEXT "Prozessor:", -1, 70, 140, 80, 10, SS_RIGHT + LTEXT "Speicher:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Auslagerungsdatei:", -1, 70, 160, 80, 10, SS_RIGHT + LTEXT "ReactX-Version:", -1, 70, 170, 80, 10, SS_RIGHT + LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_LANG, 155, 100, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MANU, 155, 110, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MODEL, 155, 120, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_BIOS, 155, 130, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_PROC, 155, 140, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MEM, 155, 150, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_SWAP, 155, 160, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -68,4 +93,9 @@ BEGIN IDS_INPUT_DIALOG "Eingabe" IDS_NETWORK_DIALOG "Netzwerk" IDS_HELP_DIALOG "Hilfe" + IDS_FORMAT_MB "%I64uMB RAM" + IDS_FORMAT_SWAP "%I64u MB verwendet, %I64u MB verfügbar" + IDS_FORMAT_UNIPROC "%s (%u CPU)" + IDS_FORMAT_MPPROC "%s (%u CPUs)" + IDS_VERSION_UNKNOWN "Unbekannte Version" END diff --git a/reactos/base/applications/dxdiag/lang/en-US.rc b/reactos/base/applications/dxdiag/lang/en-US.rc index c2e7234ec7d..9d9b18c07c7 100644 --- a/reactos/base/applications/dxdiag/lang/en-US.rc +++ b/reactos/base/applications/dxdiag/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 260 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -14,45 +14,70 @@ BEGIN PUSHBUTTON "&Exit", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + LTEXT "This tool reports detailed information about the ReactX components and drivers installed on your system.", -1, 10, 10, 343, 17 + LTEXT "If you know what area is causing the problem, click the appropiate tab above. Otherwise you can use the ""Next Page"" button below to visit each page in sequence.", -1, 10, 30, 343, 25 + GROUPBOX "System Information", -1, 10, 55, 343, 130, SS_RIGHT + LTEXT "Current Date/Time:", -1, 70, 70, 80, 10, SS_RIGHT + LTEXT "Computer Name:", -1, 70, 80, 80, 10, SS_RIGHT + LTEXT "Operating System:", -1, 70, 90, 80, 10, SS_RIGHT + LTEXT "Language:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "System Manufacturer:", -1, 70, 110, 80, 10, SS_RIGHT + LTEXT "System Modell:", -1, 70, 120, 80, 10, SS_RIGHT + LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT + LTEXT "Processor:", -1, 70, 140, 80, 10, SS_RIGHT + LTEXT "Memory:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Page file:", -1, 70, 160, 80, 10, SS_RIGHT + LTEXT "ReactX-Version:", -1, 70, 170, 80, 10, SS_RIGHT + LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_LANG, 155, 100, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MANU, 155, 110, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MODEL, 155, 120, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_BIOS, 155, 130, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_PROC, 155, 140, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MEM, 155, 150, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_SWAP, 155, 160, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -68,4 +93,9 @@ BEGIN IDS_INPUT_DIALOG "Input" IDS_NETWORK_DIALOG "Network" IDS_HELP_DIALOG "Help" + IDS_FORMAT_MB "%I64uMB RAM" + IDS_FORMAT_SWAP "%I64u MB used, %I64u MB available" + IDS_FORMAT_UNIPROC "%s (%u CPU)" + IDS_FORMAT_MPPROC "%s (%u CPUs)" + IDS_VERSION_UNKNOWN "Unknown Version" END diff --git a/reactos/base/applications/dxdiag/lang/fr-FR.rc b/reactos/base/applications/dxdiag/lang/fr-FR.rc index c2e9c1d4579..00c5e7eed60 100644 --- a/reactos/base/applications/dxdiag/lang/fr-FR.rc +++ b/reactos/base/applications/dxdiag/lang/fr-FR.rc @@ -14,45 +14,70 @@ BEGIN PUSHBUTTON "Quitt&er", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + LTEXT "This tool reports detailed information about the ReactX components and drivers installed on your system.", -1, 10, 10, 343, 17 + LTEXT "If you know what area is causing the problem, click the appropiate tab above. Otherwise you can use the ""Next Page"" button below to visit each page in sequence.", -1, 10, 30, 343, 25 + GROUPBOX "System Information", -1, 10, 55, 343, 130, SS_RIGHT + LTEXT "Current Date/Time:", -1, 70, 70, 80, 10, SS_RIGHT + LTEXT "Computer Name:", -1, 70, 80, 80, 10, SS_RIGHT + LTEXT "Operating System:", -1, 70, 90, 80, 10, SS_RIGHT + LTEXT "Language:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "System Manufacturer:", -1, 70, 110, 80, 10, SS_RIGHT + LTEXT "System Modell:", -1, 70, 120, 80, 10, SS_RIGHT + LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT + LTEXT "Processor:", -1, 70, 140, 80, 10, SS_RIGHT + LTEXT "Memory:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Page file:", -1, 70, 160, 80, 10, SS_RIGHT + LTEXT "ReactX-Version:", -1, 70, 170, 80, 10, SS_RIGHT + LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_LANG, 155, 100, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MANU, 155, 110, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MODEL, 155, 120, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_BIOS, 155, 130, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_PROC, 155, 140, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MEM, 155, 150, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_SWAP, 155, 160, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -68,4 +93,9 @@ BEGIN IDS_INPUT_DIALOG "Entrée" IDS_NETWORK_DIALOG "Réseau" IDS_HELP_DIALOG "Aide" + IDS_FORMAT_MB "%I64uMB RAM" + IDS_FORMAT_SWAP "%I64u MB used, %I64u MB available" + IDS_FORMAT_UNIPROC "%s (%u CPU)" + IDS_FORMAT_MPPROC "%s (%u CPUs)" + IDS_VERSION_UNKNOWN "Unknown Version" END diff --git a/reactos/base/applications/dxdiag/lang/pl-PL.rc b/reactos/base/applications/dxdiag/lang/pl-PL.rc index 535fb7429d3..259a729dd37 100644 --- a/reactos/base/applications/dxdiag/lang/pl-PL.rc +++ b/reactos/base/applications/dxdiag/lang/pl-PL.rc @@ -21,45 +21,70 @@ BEGIN PUSHBUTTON "&Wyjœcie", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + LTEXT "This tool reports detailed information about the ReactX components and drivers installed on your system.", -1, 10, 10, 343, 17 + LTEXT "If you know what area is causing the problem, click the appropiate tab above. Otherwise you can use the ""Next Page"" button below to visit each page in sequence.", -1, 10, 30, 343, 25 + GROUPBOX "System Information", -1, 10, 55, 343, 130, SS_RIGHT + LTEXT "Current Date/Time:", -1, 70, 70, 80, 10, SS_RIGHT + LTEXT "Computer Name:", -1, 70, 80, 80, 10, SS_RIGHT + LTEXT "Operating System:", -1, 70, 90, 80, 10, SS_RIGHT + LTEXT "Language:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "System Manufacturer:", -1, 70, 110, 80, 10, SS_RIGHT + LTEXT "System Modell:", -1, 70, 120, 80, 10, SS_RIGHT + LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT + LTEXT "Processor:", -1, 70, 140, 80, 10, SS_RIGHT + LTEXT "Memory:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Page file:", -1, 70, 160, 80, 10, SS_RIGHT + LTEXT "ReactX-Version:", -1, 70, 170, 80, 10, SS_RIGHT + LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_LANG, 155, 100, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MANU, 155, 110, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MODEL, 155, 120, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_BIOS, 155, 130, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_PROC, 155, 140, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MEM, 155, 150, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_SWAP, 155, 160, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -75,4 +100,9 @@ BEGIN IDS_INPUT_DIALOG "Peryferia" IDS_NETWORK_DIALOG "Sieæ" IDS_HELP_DIALOG "Pomoc" + IDS_FORMAT_MB "%I64uMB RAM" + IDS_FORMAT_SWAP "%I64u MB used, %I64u MB available" + IDS_FORMAT_UNIPROC "%s (%u CPU)" + IDS_FORMAT_MPPROC "%s (%u CPUs)" + IDS_VERSION_UNKNOWN "Unknown Version" END diff --git a/reactos/base/applications/dxdiag/lang/ru-RU.rc b/reactos/base/applications/dxdiag/lang/ru-RU.rc index eedfdc79d7d..103baebc64d 100644 --- a/reactos/base/applications/dxdiag/lang/ru-RU.rc +++ b/reactos/base/applications/dxdiag/lang/ru-RU.rc @@ -14,45 +14,70 @@ BEGIN PUSHBUTTON "&Âûõîä", IDC_BUTTON_EXIT, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + LTEXT "This tool reports detailed information about the ReactX components and drivers installed on your system.", -1, 10, 10, 343, 17 + LTEXT "If you know what area is causing the problem, click the appropiate tab above. Otherwise you can use the ""Next Page"" button below to visit each page in sequence.", -1, 10, 30, 343, 25 + GROUPBOX "System Information", -1, 10, 55, 343, 130, SS_RIGHT + LTEXT "Current Date/Time:", -1, 70, 70, 80, 10, SS_RIGHT + LTEXT "Computer Name:", -1, 70, 80, 80, 10, SS_RIGHT + LTEXT "Operating System:", -1, 70, 90, 80, 10, SS_RIGHT + LTEXT "Language:", -1, 70, 100, 80, 10, SS_RIGHT + LTEXT "System Manufacturer:", -1, 70, 110, 80, 10, SS_RIGHT + LTEXT "System Modell:", -1, 70, 120, 80, 10, SS_RIGHT + LTEXT "BIOS:", -1, 70, 130, 80, 10, SS_RIGHT + LTEXT "Processor:", -1, 70, 140, 80, 10, SS_RIGHT + LTEXT "Memory:", -1, 70, 150, 80, 10, SS_RIGHT + LTEXT "Page file:", -1, 70, 160, 80, 10, SS_RIGHT + LTEXT "ReactX-Version:", -1, 70, 170, 80, 10, SS_RIGHT + LTEXT "", IDC_STATIC_TIME, 155, 70, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_COMPUTER, 155, 80, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_OS, 155, 90, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_LANG, 155, 100, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MANU, 155, 110, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MODEL, 155, 120, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_BIOS, 155, 130, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_PROC, 155, 140, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_MEM, 155, 150, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_SWAP, 155, 160, 195, 10, SS_LEFT + LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -68,4 +93,9 @@ BEGIN IDS_INPUT_DIALOG "Ââîä" IDS_NETWORK_DIALOG "Ñåòü" IDS_HELP_DIALOG "Ñïðàâêà" + IDS_FORMAT_MB "%I64uMB RAM" + IDS_FORMAT_SWAP "%I64u MB used, %I64u MB available" + IDS_FORMAT_UNIPROC "%s (%u CPU)" + IDS_FORMAT_MPPROC "%s (%u CPUs)" + IDS_VERSION_UNKNOWN "Unknown Version" END diff --git a/reactos/base/applications/dxdiag/precomp.h b/reactos/base/applications/dxdiag/precomp.h index b71f1abbe4b..082a9c07df0 100644 --- a/reactos/base/applications/dxdiag/precomp.h +++ b/reactos/base/applications/dxdiag/precomp.h @@ -1,6 +1,7 @@ #ifndef PRECOMP_H__ #define PRECOMP_H__ +#include #include #include @@ -13,6 +14,8 @@ typedef struct }DXDIAG_CONTEXT, *PDXDIAG_CONTEXT; + + /* globals */ extern HINSTANCE hInst; diff --git a/reactos/base/applications/dxdiag/resource.h b/reactos/base/applications/dxdiag/resource.h index fdd1af3a7d4..302d61f970f 100644 --- a/reactos/base/applications/dxdiag/resource.h +++ b/reactos/base/applications/dxdiag/resource.h @@ -19,18 +19,33 @@ #define IDC_BUTTON_SAVE_INFO 1003 #define IDC_BUTTON_EXIT 1004 - +#define IDC_STATIC_TIME 2000 +#define IDC_STATIC_COMPUTER 2001 +#define IDC_STATIC_OS 2002 +#define IDC_STATIC_LANG 2003 +#define IDC_STATIC_MANU 2004 +#define IDC_STATIC_MODEL 2005 +#define IDC_STATIC_BIOS 2006 +#define IDC_STATIC_PROC 2007 +#define IDC_STATIC_MEM 2008 +#define IDC_STATIC_SWAP 2009 +#define IDC_STATIC_VERSION 2010 /* string resource constants */ -#define IDS_MAIN_DIALOG 10000 -#define IDS_SYSTEM_DIALOG 10001 -#define IDS_DISPLAY_DIALOG 10002 -#define IDS_SOUND_DIALOG 10003 -#define IDS_MUSIC_DIALOG 10004 -#define IDS_INPUT_DIALOG 10005 -#define IDS_NETWORK_DIALOG 10006 -#define IDS_HELP_DIALOG 10007 +#define IDS_MAIN_DIALOG 10000 +#define IDS_SYSTEM_DIALOG 10001 +#define IDS_DISPLAY_DIALOG 10002 +#define IDS_SOUND_DIALOG 10003 +#define IDS_MUSIC_DIALOG 10004 +#define IDS_INPUT_DIALOG 10005 +#define IDS_NETWORK_DIALOG 10006 +#define IDS_HELP_DIALOG 10007 +#define IDS_FORMAT_MB 10008 +#define IDS_FORMAT_SWAP 10009 +#define IDS_FORMAT_UNIPROC 10010 +#define IDS_FORMAT_MPPROC 10011 +#define IDS_VERSION_UNKNOWN 10012 /* icon resource constants */ #define IDI_APPICON 20000 diff --git a/reactos/base/applications/dxdiag/system.c b/reactos/base/applications/dxdiag/system.c index 5c2bbc0d974..7920c7fc3ca 100644 --- a/reactos/base/applications/dxdiag/system.c +++ b/reactos/base/applications/dxdiag/system.c @@ -9,15 +9,321 @@ #include "precomp.h" -INT_PTR CALLBACK -SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +static +BOOL +GetDirectXVersion(WCHAR * szBuffer) { - UNREFERENCED_PARAMETER(lParam); - UNREFERENCED_PARAMETER(wParam); - switch (message) { - case WM_INITDIALOG: + WCHAR szVer[20]; + DWORD dwVer = sizeof(szVer); + + if (RegGetValueW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectX", L"Version", RRF_RT_REG_SZ, NULL, szVer, &dwVer) != ERROR_SUCCESS) + return FALSE; + + if(!wcscmp(szVer, L"4.02.0095")) + wcscpy(szBuffer, L"1.0"); + else if (!wcscmp(szVer, L"4.03.00.1096")) + wcscpy(szBuffer, L"2.0"); + else if (!wcscmp(szVer, L"4.04.0068")) + wcscpy(szBuffer, L"3.0"); + else if (!wcscmp(szVer, L"4.04.0069")) + wcscpy(szBuffer, L"3.0"); + else if (!wcscmp(szVer, L"4.05.00.0155")) + wcscpy(szBuffer, L"5.0"); + else if (!wcscmp(szVer, L"4.05.01.1721")) + wcscpy(szBuffer, L"5.0"); + else if (!wcscmp(szVer, L"4.05.01.1998")) + wcscpy(szBuffer, L"5.0"); + else if (!wcscmp(szVer, L"4.06.02.0436")) + wcscpy(szBuffer, L"6.0"); + else if (!wcscmp(szVer, L"4.07.00.0700")) + wcscpy(szBuffer, L"7.0"); + else if (!wcscmp(szVer, L"4.07.00.0716")) + wcscpy(szBuffer, L"7.0a"); + else if (!wcscmp(szVer, L"4.08.00.0400")) + wcscpy(szBuffer, L"8.0"); + else if (!wcscmp(szVer, L"4.08.01.0881")) + wcscpy(szBuffer, L"8.1"); + else if (!wcscmp(szVer, L"4.08.01.0810")) + wcscpy(szBuffer, L"8.1"); + else if (!wcscmp(szVer, L"4.09.0000.0900")) + wcscpy(szBuffer, L"9.0"); + else if (!wcscmp(szVer, L"4.09.00.0900")) + wcscpy(szBuffer, L"9.0"); + else if (!wcscmp(szVer, L"4.09.0000.0901")) + wcscpy(szBuffer, L"9.0a"); + else if (!wcscmp(szVer, L"4.09.00.0901")) + wcscpy(szBuffer, L"9.0a"); + else if (!wcscmp(szVer, L"4.09.0000.0902")) + wcscpy(szBuffer, L"9.0b"); + else if (!wcscmp(szVer, L"4.09.00.0902")) + wcscpy(szBuffer, L"9.0b"); + else if (!wcscmp(szVer, L"4.09.00.0904")) + wcscpy(szBuffer, L"9.0c"); + else if (!wcscmp(szVer, L"4.09.0000.0904")) + wcscpy(szBuffer, L"9.0c"); + else + return FALSE; + + return TRUE; +} + +#if 0 +static +BOOL +GetVistaVersion(WCHAR * szBuffer) +{ + DWORD Length; + + if (GetProductInfo(6, 0, 0, 0, &Length)) + { + switch(Length) + { + case PRODUCT_ULTIMATE: + swprintf(szBuffer, L"Windows Vista Ultimate (6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + case PRODUCT_HOME_BASIC: + swprintf(szBuffer, L"Windows Vista Home Basic (6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + case PRODUCT_HOME_PREMIUM: + swprintf(szBuffer, L"Windows Vista Home Premimum (6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + case PRODUCT_ENTERPRISE: + swprintf(szBuffer, L"Windows Vista Enterprise (6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + case PRODUCT_HOME_BASIC_N: + swprintf(szBuffer, L"Windows Vista Home Basic N(6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + case PRODUCT_BUSINESS: + swprintf(szBuffer, L"Windows Vista Business(6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + case PRODUCT_STARTER: + swprintf(szBuffer, L"Windows Vista Starter(6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + case PRODUCT_BUSINESS_N: + swprintf(szBuffer, L"Windows Vista Business N(6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + default: + return FALSE; + } + } +} + +#endif + + +static +BOOL +GetOSVersion(WCHAR * szBuffer) +{ + OSVERSIONINFOEXW info; + + ZeroMemory(&info, sizeof(info)); + info.dwOSVersionInfoSize = sizeof(info); + if (GetVersionExW((LPOSVERSIONINFO)&info)) + { + /* FIXME retrieve ReactOS version*/ + if (info.dwMajorVersion == 4) { - SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); + wcscpy(szBuffer, L"Windows NT 4.0"); + if (info.szCSDVersion[0]) + { + wcscat(szBuffer, L" "); + wcscat(szBuffer, info.szCSDVersion); + } + return TRUE; + } + + if (info.dwMajorVersion == 5 && info.dwMinorVersion == 0) + { + wcscpy(szBuffer, L"Windows 2000"); + if (info.szCSDVersion[0]) + { + wcscat(szBuffer, L" "); + wcscat(szBuffer, info.szCSDVersion); + } + return TRUE; + } + + if (info.dwMajorVersion == 5 && info.dwMinorVersion == 1) + { + wcscpy(szBuffer, L"Windows XP"); + if (info.szCSDVersion[0]) + { + wcscat(szBuffer, L" "); + wcscat(szBuffer, info.szCSDVersion); + } + return TRUE; + } + + if (info.dwMajorVersion == 6 && info.dwMinorVersion == 0) + { +// if (GetVistaVersion(szBuffer)) +// return TRUE; + + swprintf(szBuffer, L"Windows Vista (6.0, Build %04u)", info.dwBuildNumber); + return TRUE; + } + } + + return FALSE; +} + +static +VOID +InitializeSystemPage(HWND hwndDlg) +{ + WCHAR szTime[200]; + DWORD Length; + DWORDLONG AvailableBytes, UsedBytes; + MEMORYSTATUSEX mem; + WCHAR szFormat[40]; + WCHAR szDesc[50]; + SYSTEM_INFO SysInfo; + + /* set date/time */ + szTime[0] = L'\0'; + Length = GetDateFormat(LOCALE_SYSTEM_DEFAULT, DATE_LONGDATE, NULL, NULL, szTime, sizeof(szTime) / sizeof(WCHAR)); + if (Length) + { + szTime[Length-1] = L','; + szTime[Length++] = L' '; + } + Length = GetTimeFormatW(LOCALE_SYSTEM_DEFAULT, TIME_FORCE24HOURFORMAT|LOCALE_NOUSEROVERRIDE, NULL, NULL, &szTime[Length], (sizeof(szTime) / sizeof(WCHAR))); + szTime[199] = L'\0'; + SendDlgItemMessageW(hwndDlg, IDC_STATIC_TIME, WM_SETTEXT, 0, (LPARAM)szTime); + + /* set computer name */ + szTime[0] = L'\0'; + Length = sizeof(szTime) / sizeof(WCHAR); + if (GetComputerNameW(szTime, &Length)) + SendDlgItemMessageW(hwndDlg, IDC_STATIC_COMPUTER, WM_SETTEXT, 0, (LPARAM)szTime); + + /* set product name */ + if (GetOSVersion(szTime)) + { + SendDlgItemMessage(hwndDlg, IDC_STATIC_OS, WM_SETTEXT, 0, (LPARAM)szTime); + } + else + { + if (LoadStringW(hInst, IDS_VERSION_UNKNOWN, szTime, sizeof(szTime) / sizeof(WCHAR))) + { + szTime[(sizeof(szTime) / sizeof(WCHAR))-1] = L'\0'; + SendDlgItemMessage(hwndDlg, IDC_STATIC_VERSION, WM_SETTEXT, 0, (LPARAM)szTime); + } + } + + /* FIXME set product language/local language */ + if (GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SLANGUAGE , szTime, sizeof(szTime) / sizeof(WCHAR))) + SendDlgItemMessageW(hwndDlg, IDC_STATIC_LANG, WM_SETTEXT, 0, (LPARAM)szTime); + + /* set system manufacturer */ + szTime[0] = L'\0'; + Length = sizeof(szTime) / sizeof(WCHAR); + if (RegGetValueW(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\BIOS", L"SystemManufacturer", RRF_RT_REG_SZ, NULL, szTime, &Length) == ERROR_SUCCESS) + { + szTime[199] = L'\0'; + SendDlgItemMessageW(hwndDlg, IDC_STATIC_MANU, WM_SETTEXT, 0, (LPARAM)szTime); + } + + /* set motherboard model */ + szTime[0] = L'\0'; + Length = sizeof(szTime) / sizeof(WCHAR); + if (RegGetValueW(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\BIOS", L"SystemProductName", RRF_RT_REG_SZ, NULL, szTime, &Length) == ERROR_SUCCESS) + { + szTime[199] = L'\0'; + SendDlgItemMessageW(hwndDlg, IDC_STATIC_MODEL, WM_SETTEXT, 0, (LPARAM)szTime); + } + + /* set bios model */ + szTime[0] = L'\0'; + Length = sizeof(szTime) / sizeof(WCHAR); + if (RegGetValueW(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\BIOS", L"BIOSVendor", RRF_RT_REG_SZ, NULL, szTime, &Length) == ERROR_SUCCESS) + { + DWORD Index; + DWORD StrLength = (sizeof(szTime) / sizeof(WCHAR)) - (Length/sizeof(WCHAR)); + + Index = (Length/sizeof(WCHAR)); + szTime[Index-1] = L' '; + + if (RegGetValueW(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\BIOS", L"BIOSReleaseDate", RRF_RT_REG_SZ, NULL, &szTime[Index], &StrLength) == ERROR_SUCCESS) + { + StrLength = (StrLength/sizeof(WCHAR)); + } + szTime[Index+StrLength] = L' '; + wcscpy(&szTime[Index+StrLength], L"Ver: "); //FIXME NON-NLS + szTime[199] = L'\0'; + SendDlgItemMessageW(hwndDlg, IDC_STATIC_BIOS, WM_SETTEXT, 0, (LPARAM)szTime); + //FIXME retrieve BiosMajorRelease, BiosMinorRelease + } + /* set processor string */ + Length = sizeof(szDesc); + if (RegGetValueW(HKEY_LOCAL_MACHINE, L"Hardware\\Description\\System\\CentralProcessor\\0", L"ProcessorNameString", RRF_RT_REG_SZ, NULL, szDesc, &Length) == ERROR_SUCCESS) + { + /* FIXME retrieve current speed */ + szFormat[0] = L'\0'; + GetSystemInfo(&SysInfo); + if (SysInfo.dwNumberOfProcessors > 1) + LoadStringW(hInst, IDS_FORMAT_MPPROC, szFormat, sizeof(szFormat) / sizeof(WCHAR)); + else + LoadStringW(hInst, IDS_FORMAT_UNIPROC, szFormat, sizeof(szFormat) / sizeof(WCHAR)); + + szFormat[(sizeof(szFormat)/sizeof(WCHAR))-1] = L'\0'; + swprintf(szTime, szFormat, szDesc, SysInfo.dwNumberOfProcessors); + SendDlgItemMessageW(hwndDlg, IDC_STATIC_PROC, WM_SETTEXT, 0, (LPARAM)szTime); + } + + /* retrieve available memory */ + ZeroMemory(&mem, sizeof(mem)); + mem.dwLength = sizeof(mem); + if (GlobalMemoryStatusEx(&mem)) + { + if (LoadStringW(hInst, IDS_FORMAT_MB, szFormat, sizeof(szFormat) / sizeof(WCHAR))) + { + /* set total mem string */ + szFormat[(sizeof(szFormat) / sizeof(WCHAR))-1] = L'\0'; + swprintf(szTime, szFormat, (mem.ullTotalPhys/1048576)); + SendDlgItemMessageW(hwndDlg, IDC_STATIC_MEM, WM_SETTEXT, 0, (LPARAM)szTime); + } + + if (LoadStringW(hInst, IDS_FORMAT_SWAP, szFormat, sizeof(szFormat) / sizeof(WCHAR))) + { + /* set swap string */ + AvailableBytes = (mem.ullTotalPageFile-mem.ullTotalPhys)/1048576; + UsedBytes = (mem.ullTotalPageFile-mem.ullAvailPageFile)/1048576; + + szFormat[(sizeof(szFormat) / sizeof(WCHAR))-1] = L'\0'; + swprintf(szTime, szFormat, (UsedBytes), (AvailableBytes)); + SendDlgItemMessageW(hwndDlg, IDC_STATIC_SWAP, WM_SETTEXT, 0, (LPARAM)szTime); + } + } + /* set directx version string */ + wcscpy(szTime, L"ReactX "); + if (GetDirectXVersion(&szTime[7])) + { + SendDlgItemMessage(hwndDlg, IDC_STATIC_VERSION, WM_SETTEXT, 0, (LPARAM)szTime); + } + else + { + if (LoadStringW(hInst, IDS_VERSION_UNKNOWN, szTime, sizeof(szTime) / sizeof(WCHAR))) + { + szTime[(sizeof(szTime) / sizeof(WCHAR))-1] = L'\0'; + SendDlgItemMessage(hwndDlg, IDC_STATIC_VERSION, WM_SETTEXT, 0, (LPARAM)szTime); + } + } +} + + +INT_PTR CALLBACK +SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + UNREFERENCED_PARAMETER(lParam); + UNREFERENCED_PARAMETER(wParam); + switch (message) + { + case WM_INITDIALOG: + { + SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); + InitializeSystemPage(hDlg); return TRUE; } }