mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- Get rid of an unneeded variable in GetSystemInformation
- Minor changes to the GetProcNameString function - Fix unselecting the license text. EM_SETSEL only works after the edit control has been drawn, so we cannot send this message in the WM_INITDIALOG message handler. Instead we use PostMessage now. See KB96674 for more details. - Downloaded the latest GPL 2.0 text from the GNU website and use that as the "gpl.txt" now. Now we don't have these annoying "box" characters in the license dialog box anymore. svn path=/trunk/; revision=27786
This commit is contained in:
parent
e2cb9802d4
commit
5252fd9823
3 changed files with 22 additions and 30 deletions
|
@ -193,11 +193,9 @@ SetProcNameString(HWND hwnd,
|
|||
HeapFree(GetProcessHeap(),
|
||||
0,
|
||||
lpBuf);
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static VOID
|
||||
|
@ -251,7 +249,6 @@ GetSystemInformation(HWND hwnd)
|
|||
TCHAR ProcKey[] = _T("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
|
||||
MEMORYSTATUSEX MemStat;
|
||||
TCHAR Buf[32];
|
||||
INT Ret = 0;
|
||||
INT CurMachineLine = IDC_MACHINELINE1;
|
||||
|
||||
|
||||
|
@ -266,22 +263,21 @@ GetSystemInformation(HWND hwnd)
|
|||
KEY_READ,
|
||||
&hKey) == ERROR_SUCCESS)
|
||||
{
|
||||
SetRegTextData(hwnd,
|
||||
hKey,
|
||||
_T("VendorIdentifier"),
|
||||
SetRegTextData(hwnd,
|
||||
hKey,
|
||||
_T("VendorIdentifier"),
|
||||
CurMachineLine);
|
||||
CurMachineLine++;
|
||||
|
||||
Ret = SetProcNameString(hwnd,
|
||||
hKey,
|
||||
_T("ProcessorNameString"),
|
||||
CurMachineLine,
|
||||
CurMachineLine+1);
|
||||
CurMachineLine += Ret;
|
||||
CurMachineLine += SetProcNameString(hwnd,
|
||||
hKey,
|
||||
_T("ProcessorNameString"),
|
||||
CurMachineLine,
|
||||
CurMachineLine + 1);
|
||||
|
||||
SetProcSpeed(hwnd,
|
||||
hKey,
|
||||
_T("~MHz"),
|
||||
SetProcSpeed(hwnd,
|
||||
hKey,
|
||||
_T("~MHz"),
|
||||
CurMachineLine);
|
||||
CurMachineLine++;
|
||||
}
|
||||
|
@ -316,7 +312,6 @@ GetSystemInformation(HWND hwnd)
|
|||
if (MemStat.ullTotalPhys > 1024 * 1024)
|
||||
{
|
||||
/* We're dealing with PBs or more */
|
||||
|
||||
MemStat.ullTotalPhys /= 1024;
|
||||
i++;
|
||||
|
||||
|
@ -336,16 +331,14 @@ GetSystemInformation(HWND hwnd)
|
|||
|
||||
if (LoadString(hApplet, uStrId[i], szStr, sizeof(szStr) / sizeof(szStr[0])))
|
||||
{
|
||||
Ret = _stprintf(Buf, _T("%.2f %s"), dTotalPhys, szStr);
|
||||
if( _stprintf(Buf, _T("%.2f %s"), dTotalPhys, szStr) )
|
||||
{
|
||||
SetDlgItemText(hwnd,
|
||||
CurMachineLine,
|
||||
Buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Ret)
|
||||
{
|
||||
SetDlgItemText(hwnd,
|
||||
CurMachineLine,
|
||||
Buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -55,11 +55,10 @@ LicenceDlgProc(HWND hDlg,
|
|||
IDC_LICENCEEDIT,
|
||||
LicenseText);
|
||||
|
||||
SendDlgItemMessage(hDlg,
|
||||
IDC_LICENCEEDIT,
|
||||
EM_SETSEL,
|
||||
-1,
|
||||
0);
|
||||
PostMessage(GetDlgItem(hDlg, IDC_LICENCEEDIT),
|
||||
EM_SETSEL,
|
||||
-1,
|
||||
0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue