mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 18:02:55 +00:00
- Replace the check-marks in the protocol menu by radio-bullets because the user can only select one of three protocols.
- Mark a protocol in the menu only if it was read correctly. Otherwise the security protocol gets selected although the user is not able to see this protocol. - Minor clean-up of the resource id mess. svn path=/trunk/; revision=37586
This commit is contained in:
parent
d801a49d71
commit
8811ad12d4
|
@ -486,7 +486,7 @@ ShowStatusMessageThread(IN LPVOID lpParameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID
|
BOOL
|
||||||
QueryEventMessages(LPTSTR lpMachineName,
|
QueryEventMessages(LPTSTR lpMachineName,
|
||||||
LPTSTR lpLogName)
|
LPTSTR lpLogName)
|
||||||
{
|
{
|
||||||
|
@ -529,7 +529,7 @@ QueryEventMessages(LPTSTR lpMachineName,
|
||||||
_TEXT("Could not open the event log."),
|
_TEXT("Could not open the event log."),
|
||||||
_TEXT("Event Log"),
|
_TEXT("Event Log"),
|
||||||
MB_OK | MB_ICONINFORMATION);
|
MB_OK | MB_ICONINFORMATION);
|
||||||
return;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable listview redraw
|
// Disable listview redraw
|
||||||
|
@ -686,6 +686,8 @@ QueryEventMessages(LPTSTR lpMachineName,
|
||||||
|
|
||||||
// Close the event log.
|
// Close the event log.
|
||||||
CloseEventLog(hEventLog);
|
CloseEventLog(hEventLog);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -870,13 +872,19 @@ InitInstance(HINSTANCE hInstance,
|
||||||
LRESULT CALLBACK
|
LRESULT CALLBACK
|
||||||
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
int wmId, wmEvent;
|
|
||||||
RECT rect;
|
RECT rect;
|
||||||
NMHDR *hdr;
|
NMHDR *hdr;
|
||||||
HMENU hMenu;
|
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
|
case WM_CREATE:
|
||||||
|
CheckMenuRadioItem(GetMenu(hWnd),
|
||||||
|
ID_LOG_APPLICATION,
|
||||||
|
ID_LOG_SYSTEM,
|
||||||
|
ID_LOG_APPLICATION,
|
||||||
|
MF_BYCOMMAND);
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
switch (((LPNMHDR)lParam)->code)
|
switch (((LPNMHDR)lParam)->code)
|
||||||
{
|
{
|
||||||
|
@ -888,7 +896,10 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if (lpnmitem->iItem != -1)
|
if (lpnmitem->iItem != -1)
|
||||||
{
|
{
|
||||||
DialogBox(hInst, MAKEINTRESOURCE(IDD_EVENTDETAILDIALOG), hWnd, EventDetails);
|
DialogBox(hInst,
|
||||||
|
MAKEINTRESOURCE(IDD_EVENTDETAILDIALOG),
|
||||||
|
hWnd,
|
||||||
|
EventDetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -896,41 +907,43 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
wmId = LOWORD(wParam);
|
|
||||||
wmEvent = HIWORD(wParam);
|
|
||||||
|
|
||||||
if ((wmId == ID_LOG_APPLICATION) ||
|
|
||||||
(wmId == ID_LOG_SYSTEM) ||
|
|
||||||
(wmId == ID_LOG_SECURITY))
|
|
||||||
{
|
|
||||||
hMenu = GetMenu(hWnd); // get the menu handle. Use it below
|
|
||||||
|
|
||||||
CheckMenuItem(hMenu, ID_LOG_APPLICATION, MF_UNCHECKED);
|
|
||||||
CheckMenuItem(hMenu, ID_LOG_SYSTEM, MF_UNCHECKED);
|
|
||||||
CheckMenuItem (hMenu, ID_LOG_SECURITY, MF_UNCHECKED);
|
|
||||||
|
|
||||||
if (hMenu)
|
|
||||||
{
|
|
||||||
CheckMenuItem(hMenu, wmId, MF_CHECKED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse the menu selections:
|
// Parse the menu selections:
|
||||||
switch (wmId)
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case ID_LOG_APPLICATION:
|
case ID_LOG_APPLICATION:
|
||||||
QueryEventMessages(lpComputerName, // Use the local computer.
|
if (QueryEventMessages(lpComputerName, // Use the local computer.
|
||||||
EVENT_SOURCE_APPLICATION); // The event log category
|
EVENT_SOURCE_APPLICATION)) // The event log category
|
||||||
break;
|
{
|
||||||
|
CheckMenuRadioItem(GetMenu(hWnd),
|
||||||
case ID_LOG_SYSTEM:
|
ID_LOG_APPLICATION,
|
||||||
QueryEventMessages(lpComputerName, // Use the local computer.
|
ID_LOG_SYSTEM,
|
||||||
EVENT_SOURCE_SYSTEM); // The event log category
|
ID_LOG_APPLICATION,
|
||||||
|
MF_BYCOMMAND);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_LOG_SECURITY:
|
case ID_LOG_SECURITY:
|
||||||
QueryEventMessages(lpComputerName, // Use the local computer.
|
if (QueryEventMessages(lpComputerName, // Use the local computer.
|
||||||
EVENT_SOURCE_SECURITY); // The event log category
|
EVENT_SOURCE_SECURITY)) // The event log category
|
||||||
|
{
|
||||||
|
CheckMenuRadioItem(GetMenu(hWnd),
|
||||||
|
ID_LOG_APPLICATION,
|
||||||
|
ID_LOG_SYSTEM,
|
||||||
|
ID_LOG_SECURITY,
|
||||||
|
MF_BYCOMMAND);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ID_LOG_SYSTEM:
|
||||||
|
if (QueryEventMessages(lpComputerName, // Use the local computer.
|
||||||
|
EVENT_SOURCE_SYSTEM)) // The event log category
|
||||||
|
{
|
||||||
|
CheckMenuRadioItem(GetMenu(hWnd),
|
||||||
|
ID_LOG_APPLICATION,
|
||||||
|
ID_LOG_SYSTEM,
|
||||||
|
ID_LOG_SYSTEM,
|
||||||
|
MF_BYCOMMAND);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDM_REFRESH:
|
case IDM_REFRESH:
|
||||||
|
|
|
@ -4,7 +4,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Äíåâíèê"
|
POPUP "&Äíåâíèê"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Ïðèëîæåíèå", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Ïðèëîæåíèå", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Ñèãóðíîñò", ID_LOG_SECURITY
|
MENUITEM "&Ñèãóðíîñò", ID_LOG_SECURITY
|
||||||
MENUITEM "&Óðåäáà", ID_LOG_SYSTEM
|
MENUITEM "&Óðåäáà", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Protokoll"
|
POPUP "&Protokoll"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Anwendung", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Anwendung", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Sicherheit", ID_LOG_SECURITY
|
MENUITEM "&Sicherheit", ID_LOG_SECURITY
|
||||||
MENUITEM "&System", ID_LOG_SYSTEM
|
MENUITEM "&System", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Log"
|
POPUP "&Log"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&ÅöáñìïãÞ", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&ÅöáñìïãÞ", ID_LOG_APPLICATION
|
||||||
MENUITEM "&ÁóöÜëåéá", ID_LOG_SECURITY
|
MENUITEM "&ÁóöÜëåéá", ID_LOG_SECURITY
|
||||||
MENUITEM "&Óýóôçìá", ID_LOG_SYSTEM
|
MENUITEM "&Óýóôçìá", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Log"
|
POPUP "&Log"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Application", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Application", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Security", ID_LOG_SECURITY
|
MENUITEM "&Security", ID_LOG_SECURITY
|
||||||
MENUITEM "&System", ID_LOG_SYSTEM
|
MENUITEM "&System", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Log"
|
POPUP "&Log"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Aplicación", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Aplicación", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Seguridad", ID_LOG_SECURITY
|
MENUITEM "&Seguridad", ID_LOG_SECURITY
|
||||||
MENUITEM "&Sistema", ID_LOG_SYSTEM
|
MENUITEM "&Sistema", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "Journa&l"
|
POPUP "Journa&l"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Application", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Application", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Sécurité", ID_LOG_SECURITY
|
MENUITEM "&Sécurité", ID_LOG_SECURITY
|
||||||
MENUITEM "&Système", ID_LOG_SYSTEM
|
MENUITEM "&Système", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Log"
|
POPUP "&Log"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Applicazioni", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Applicazioni", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Sicurezza", ID_LOG_SECURITY
|
MENUITEM "&Sicurezza", ID_LOG_SECURITY
|
||||||
MENUITEM "&Sistema", ID_LOG_SYSTEM
|
MENUITEM "&Sistema", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -8,7 +8,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "로그(&L)"
|
POPUP "로그(&L)"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "애플리케이션(&A)", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "애플리케이션(&A)", ID_LOG_APPLICATION
|
||||||
MENUITEM "보안(&S)", ID_LOG_SECURITY
|
MENUITEM "보안(&S)", ID_LOG_SECURITY
|
||||||
MENUITEM "시스템(&S)", ID_LOG_SYSTEM
|
MENUITEM "시스템(&S)", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Logg"
|
POPUP "&Logg"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Applikasjon", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Applikasjon", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Sikkerhet", ID_LOG_SECURITY
|
MENUITEM "&Sikkerhet", ID_LOG_SECURITY
|
||||||
MENUITEM "&System", ID_LOG_SYSTEM
|
MENUITEM "&System", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -16,7 +16,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Logi"
|
POPUP "&Logi"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Aplikacja", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Aplikacja", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Zabezpieczenia", ID_LOG_SECURITY
|
MENUITEM "&Zabezpieczenia", ID_LOG_SECURITY
|
||||||
MENUITEM "&System", ID_LOG_SYSTEM
|
MENUITEM "&System", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Ëîãè"
|
POPUP "&Ëîãè"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Ïðèëîæåíèé", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Ïðèëîæåíèé", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Áåçîïàñíîñòè", ID_LOG_SECURITY
|
MENUITEM "&Áåçîïàñíîñòè", ID_LOG_SECURITY
|
||||||
MENUITEM "&Ñèñòåìû", ID_LOG_SYSTEM
|
MENUITEM "&Ñèñòåìû", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -9,7 +9,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Záznam"
|
POPUP "&Záznam"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Application", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Application", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Security", ID_LOG_SECURITY
|
MENUITEM "&Security", ID_LOG_SECURITY
|
||||||
MENUITEM "&System", ID_LOG_SYSTEM
|
MENUITEM "&System", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -12,7 +12,7 @@ IDC_EVENTVWR MENU
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP "&Çâ³ò"
|
POPUP "&Çâ³ò"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Ïðîãðàìà", ID_LOG_APPLICATION, CHECKED
|
MENUITEM "&Ïðîãðàìà", ID_LOG_APPLICATION
|
||||||
MENUITEM "&Çàõèñò", ID_LOG_SECURITY
|
MENUITEM "&Çàõèñò", ID_LOG_SECURITY
|
||||||
MENUITEM "&Ñèñòåìà", ID_LOG_SYSTEM
|
MENUITEM "&Ñèñòåìà", ID_LOG_SYSTEM
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
|
|
@ -41,10 +41,9 @@
|
||||||
#define IDC_BYTESRADIO 1011
|
#define IDC_BYTESRADIO 1011
|
||||||
#define IDC_WORDRADIO 1013
|
#define IDC_WORDRADIO 1013
|
||||||
#define IDC_EVENTDATAEDIT 1014
|
#define IDC_EVENTDATAEDIT 1014
|
||||||
#define ID_LOG_APLICATION 32771
|
#define ID_LOG_APPLICATION 32771
|
||||||
#define ID_LOG_SECURITY 32772
|
#define ID_LOG_SECURITY 32772
|
||||||
#define ID_LOG_SYSTEM 32773
|
#define ID_LOG_SYSTEM 32773
|
||||||
#define ID_LOG_APPLICATION 32774
|
|
||||||
#define ID_HELP_HELP 32775
|
#define ID_HELP_HELP 32775
|
||||||
#define ID_HELP 32776
|
#define ID_HELP 32776
|
||||||
#define ID_OPTIONS 32777
|
#define ID_OPTIONS 32777
|
||||||
|
|
Loading…
Reference in a new issue