mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[EVENTVWR] Code style only.
This commit is contained in:
parent
fd3a6c1089
commit
0c32666852
|
@ -37,8 +37,8 @@
|
|||
|
||||
#define LVM_PROGRESS (WM_APP + 1) // Used by the subclassed ListView
|
||||
|
||||
static const LPCWSTR szWindowClass = L"EVENTVWR"; /* The main window class name */
|
||||
static const WCHAR EVENTLOG_BASE_KEY[] = L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\";
|
||||
static const LPCWSTR EVENTVWR_WNDCLASS = L"EVENTVWR"; /* The main window class name */
|
||||
static const LPCWSTR EVENTLOG_BASE_KEY = L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\";
|
||||
|
||||
/* The 3 system logs that should always exist in the user's system */
|
||||
static const LPCWSTR SystemLogs[] =
|
||||
|
@ -442,6 +442,7 @@ wWinMain(HINSTANCE hInstance,
|
|||
}
|
||||
}
|
||||
|
||||
/* Stop the enumerator thread */
|
||||
SetEvent(hStartStopEnumEvent);
|
||||
WaitForSingleObject(hThread, INFINITE);
|
||||
CloseHandle(hThread);
|
||||
|
@ -1217,7 +1218,7 @@ GetEventMessageFileDLL(IN LPCWSTR lpLogName,
|
|||
{
|
||||
BOOL Success = FALSE;
|
||||
LONG Result;
|
||||
DWORD Type, dwSize;
|
||||
DWORD dwType, dwSize;
|
||||
WCHAR szModuleName[MAX_PATH];
|
||||
WCHAR szKeyName[MAX_PATH];
|
||||
HKEY hLogKey = NULL;
|
||||
|
@ -1249,10 +1250,10 @@ GetEventMessageFileDLL(IN LPCWSTR lpLogName,
|
|||
Result = RegQueryValueExW(hSourceKey,
|
||||
EntryName,
|
||||
NULL,
|
||||
&Type,
|
||||
&dwType,
|
||||
(LPBYTE)szModuleName,
|
||||
&dwSize);
|
||||
if ((Result != ERROR_SUCCESS) || (Type != REG_EXPAND_SZ && Type != REG_SZ))
|
||||
if ((Result != ERROR_SUCCESS) || (dwType != REG_EXPAND_SZ && dwType != REG_SZ))
|
||||
{
|
||||
szModuleName[0] = UNICODE_NULL;
|
||||
}
|
||||
|
@ -1829,7 +1830,7 @@ EnumEventsThread(IN LPVOID lpParameter)
|
|||
}
|
||||
else if (!bResult)
|
||||
{
|
||||
/* exit on other errors (ERROR_HANDLE_EOF) */
|
||||
/* Exit on other errors (ERROR_HANDLE_EOF) */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2378,7 +2379,7 @@ MyRegisterClass(HINSTANCE hInstance)
|
|||
wcex.hCursor = LoadCursorW(NULL, MAKEINTRESOURCEW(IDC_ARROW));
|
||||
wcex.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); // COLOR_WINDOW + 1
|
||||
wcex.lpszMenuName = MAKEINTRESOURCEW(IDM_EVENTVWR);
|
||||
wcex.lpszClassName = szWindowClass;
|
||||
wcex.lpszClassName = EVENTVWR_WNDCLASS;
|
||||
wcex.hIconSm = (HICON)LoadImageW(hInstance,
|
||||
MAKEINTRESOURCEW(IDI_EVENTVWR),
|
||||
IMAGE_ICON,
|
||||
|
@ -2400,7 +2401,7 @@ GetDisplayNameFileAndID(IN LPCWSTR lpLogName,
|
|||
HKEY hLogKey;
|
||||
WCHAR *KeyPath;
|
||||
SIZE_T cbKeyPath;
|
||||
DWORD Type, cbData;
|
||||
DWORD dwType, cbData;
|
||||
DWORD dwMessageID = 0;
|
||||
WCHAR szModuleName[MAX_PATH];
|
||||
|
||||
|
@ -2424,10 +2425,10 @@ GetDisplayNameFileAndID(IN LPCWSTR lpLogName,
|
|||
Result = RegQueryValueExW(hLogKey,
|
||||
L"DisplayNameFile",
|
||||
NULL,
|
||||
&Type,
|
||||
&dwType,
|
||||
(LPBYTE)szModuleName,
|
||||
&cbData);
|
||||
if ((Result != ERROR_SUCCESS) || (Type != REG_EXPAND_SZ && Type != REG_SZ))
|
||||
if ((Result != ERROR_SUCCESS) || (dwType != REG_EXPAND_SZ && dwType != REG_SZ))
|
||||
{
|
||||
szModuleName[0] = UNICODE_NULL;
|
||||
}
|
||||
|
@ -2449,10 +2450,10 @@ GetDisplayNameFileAndID(IN LPCWSTR lpLogName,
|
|||
Result = RegQueryValueExW(hLogKey,
|
||||
L"DisplayNameID",
|
||||
NULL,
|
||||
&Type,
|
||||
&dwType,
|
||||
(LPBYTE)&dwMessageID,
|
||||
&cbData);
|
||||
if ((Result != ERROR_SUCCESS) || (Type != REG_DWORD))
|
||||
if ((Result != ERROR_SUCCESS) || (dwType != REG_DWORD))
|
||||
dwMessageID = 0;
|
||||
|
||||
*pdwMessageID = dwMessageID;
|
||||
|
@ -2471,7 +2472,7 @@ BuildLogListAndFilterList(IN LPCWSTR lpComputerName)
|
|||
HKEY hEventLogKey, hLogKey;
|
||||
DWORD dwNumLogs = 0;
|
||||
DWORD dwIndex, dwMaxKeyLength;
|
||||
DWORD Type;
|
||||
DWORD dwType;
|
||||
PEVENTLOG EventLog;
|
||||
PEVENTLOGFILTER EventLogFilter;
|
||||
LPWSTR LogName = NULL;
|
||||
|
@ -2554,10 +2555,10 @@ BuildLogListAndFilterList(IN LPCWSTR lpComputerName)
|
|||
Result = RegQueryValueExW(hLogKey,
|
||||
L"File",
|
||||
NULL,
|
||||
&Type,
|
||||
&dwType,
|
||||
NULL,
|
||||
&lpcName);
|
||||
if ((Result != ERROR_SUCCESS) || (Type != REG_EXPAND_SZ && Type != REG_SZ))
|
||||
if ((Result != ERROR_SUCCESS) || (dwType != REG_EXPAND_SZ && dwType != REG_SZ))
|
||||
{
|
||||
// Windows' EventLog uses some kind of default value, we do not.
|
||||
EventLog->FileName = NULL;
|
||||
|
@ -2571,7 +2572,7 @@ BuildLogListAndFilterList(IN LPCWSTR lpComputerName)
|
|||
Result = RegQueryValueExW(hLogKey,
|
||||
L"File",
|
||||
NULL,
|
||||
&Type,
|
||||
&dwType,
|
||||
(LPBYTE)EventLog->FileName,
|
||||
&lpcName);
|
||||
if (Result != ERROR_SUCCESS)
|
||||
|
@ -2698,7 +2699,7 @@ InitInstance(HINSTANCE hInstance,
|
|||
WCHAR szTemp[256];
|
||||
|
||||
/* Create the main window */
|
||||
hwndMainWindow = CreateWindowW(szWindowClass,
|
||||
hwndMainWindow = CreateWindowW(EVENTVWR_WNDCLASS,
|
||||
szTitle,
|
||||
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
|
||||
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
|
||||
|
@ -3053,7 +3054,7 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
LPWSTR pszText = item.pszText;
|
||||
|
||||
/* Trim all whitespace */
|
||||
/* Trim leading whitespace */
|
||||
while (*pszText && iswspace(*pszText))
|
||||
++pszText;
|
||||
|
||||
|
@ -3234,9 +3235,12 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
|
||||
case WM_SETCURSOR:
|
||||
if (LOWORD(lParam) == HTCLIENT)
|
||||
{
|
||||
POINT pt;
|
||||
|
||||
if (LOWORD(lParam) != HTCLIENT)
|
||||
goto Default;
|
||||
|
||||
GetCursorPos(&pt);
|
||||
ScreenToClient(hWnd, &pt);
|
||||
|
||||
|
@ -3267,8 +3271,8 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
goto Default;
|
||||
}
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
{
|
||||
|
@ -3297,8 +3301,10 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_LBUTTONUP:
|
||||
case WM_RBUTTONDOWN:
|
||||
if (GetCapture() == hWnd)
|
||||
{
|
||||
if (GetCapture() != hWnd)
|
||||
break;
|
||||
|
||||
/* Adjust the correct splitter position */
|
||||
if (bSplit == 1)
|
||||
nVSplitPos = GET_X_LPARAM(lParam);
|
||||
|
@ -3316,12 +3322,14 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
bSplit = 0;
|
||||
|
||||
ReleaseCapture();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
if (GetCapture() == hWnd)
|
||||
{
|
||||
if (GetCapture() != hWnd)
|
||||
break;
|
||||
|
||||
/* Move the correct splitter */
|
||||
if (bSplit == 1)
|
||||
{
|
||||
|
@ -3351,8 +3359,8 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
ResizeWnd(rect.right - rect.left, rect.bottom - rect.top);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_SIZE:
|
||||
{
|
||||
|
@ -3379,7 +3387,7 @@ InitPropertiesDlg(HWND hDlg, PEVENTLOG EventLog)
|
|||
{
|
||||
LPWSTR lpLogName = EventLog->LogName;
|
||||
|
||||
DWORD Result, Type;
|
||||
DWORD Result, dwType;
|
||||
DWORD dwMaxSize = 0, dwRetention = 0;
|
||||
BOOL Success;
|
||||
WIN32_FIND_DATAW FileInfo; // WIN32_FILE_ATTRIBUTE_DATA
|
||||
|
@ -3418,10 +3426,10 @@ InitPropertiesDlg(HWND hDlg, PEVENTLOG EventLog)
|
|||
Result = RegQueryValueExW(hLogKey,
|
||||
L"MaxSize",
|
||||
NULL,
|
||||
&Type,
|
||||
&dwType,
|
||||
(LPBYTE)&dwMaxSize,
|
||||
&cbData);
|
||||
if ((Result != ERROR_SUCCESS) || (Type != REG_DWORD))
|
||||
if ((Result != ERROR_SUCCESS) || (dwType != REG_DWORD))
|
||||
{
|
||||
// dwMaxSize = 512 * 1024; /* 512 kBytes */
|
||||
dwMaxSize = 0;
|
||||
|
@ -3433,10 +3441,10 @@ InitPropertiesDlg(HWND hDlg, PEVENTLOG EventLog)
|
|||
Result = RegQueryValueExW(hLogKey,
|
||||
L"Retention",
|
||||
NULL,
|
||||
&Type,
|
||||
&dwType,
|
||||
(LPBYTE)&dwRetention,
|
||||
&cbData);
|
||||
if ((Result != ERROR_SUCCESS) || (Type != REG_DWORD))
|
||||
if ((Result != ERROR_SUCCESS) || (dwType != REG_DWORD))
|
||||
{
|
||||
/* On Windows 2003 it is 604800 (secs) == 7 days */
|
||||
dwRetention = 0;
|
||||
|
|
|
@ -730,7 +730,7 @@ InitDetailsDlgCtrl(HWND hDlg, PDETAILDATA pData)
|
|||
*/
|
||||
SendDlgItemMessageW(hDlg, IDC_EVENTTEXTEDIT, EM_AUTOURLDETECT, AURL_ENABLEURL /* | AURL_ENABLEEAURLS */, 0);
|
||||
|
||||
/* Note that the RichEdit control never gets themed under WinXP+. One would have to write code to simulate Edit-control theming */
|
||||
/* Note that the RichEdit control never gets themed under WinXP+; one would have to write code to simulate Edit-control theming */
|
||||
|
||||
SendDlgItemMessageW(hDlg, pData->bDisplayWords ? IDC_WORDRADIO : IDC_BYTESRADIO, BM_SETCHECK, BST_CHECKED, 0);
|
||||
SendDlgItemMessageW(hDlg, IDC_EVENTDATAEDIT, WM_SETFONT, (WPARAM)pData->hMonospaceFont, (LPARAM)TRUE);
|
||||
|
|
Loading…
Reference in a new issue