ReactOS  0.4.15-dev-5500-g82cf6c2
evtdetctl.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Event Log Viewer
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Event Details Control.
5  * COPYRIGHT: Copyright 2007 Marc Piulachs <marc.piulachs@codexchange.net>
6  * Copyright 2008-2016 Eric Kohl <eric.kohl@reactos.org>
7  * Copyright 2016-2022 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
8  */
9 
10 #include "eventvwr.h"
11 #include "evtdetctl.h"
12 
13 #include <shellapi.h>
14 
15 // FIXME:
16 #define EVENT_MESSAGE_EVENTTEXT_BUFFER (1024*10)
17 extern WCHAR szTitle[];
18 extern HWND hwndListView;
19 extern BOOL
22  IN PEVENTLOGRECORD pevlr,
23  OUT PWCHAR EventText);
24 
25 
26 typedef struct _DETAILDATA
27 {
28  /* Data initialized from EVENTDETAIL_INFO */
31 
34 
39 
40 
41 static
42 VOID
44  _In_ HWND hDlg,
45  _In_ PDETAILDATA pDetailData)
46 {
47  PEVENTLOGFILTER EventLogFilter = pDetailData->EventLogFilter;
48  INT iItem = pDetailData->iEventItem;
49  LVITEMW li;
50  PEVENTLOGRECORD pevlr;
51  BOOL bEventData;
52 
53  WCHAR szEventType[MAX_PATH];
55  WCHAR szDate[MAX_PATH];
56  WCHAR szUser[MAX_PATH];
57  WCHAR szComputer[MAX_PATH];
58  WCHAR szSource[MAX_PATH];
59  WCHAR szCategory[MAX_PATH];
60  WCHAR szEventID[MAX_PATH];
62 
63  li.mask = LVIF_PARAM;
64  li.iItem = iItem;
65  li.iSubItem = 0;
67 
68  pevlr = (PEVENTLOGRECORD)li.lParam;
69 
70  ListView_GetItemText(hwndListView, iItem, 0, szEventType, ARRAYSIZE(szEventType));
71  ListView_GetItemText(hwndListView, iItem, 1, szDate, ARRAYSIZE(szDate));
73  ListView_GetItemText(hwndListView, iItem, 3, szSource, ARRAYSIZE(szSource));
74  ListView_GetItemText(hwndListView, iItem, 4, szCategory, ARRAYSIZE(szCategory));
75  ListView_GetItemText(hwndListView, iItem, 5, szEventID, ARRAYSIZE(szEventID));
76  ListView_GetItemText(hwndListView, iItem, 6, szUser, ARRAYSIZE(szUser));
77  ListView_GetItemText(hwndListView, iItem, 7, szComputer, ARRAYSIZE(szComputer));
78 
79  SetDlgItemTextW(hDlg, IDC_EVENTDATESTATIC, szDate);
81  SetDlgItemTextW(hDlg, IDC_EVENTUSERSTATIC, szUser);
82  SetDlgItemTextW(hDlg, IDC_EVENTSOURCESTATIC, szSource);
83  SetDlgItemTextW(hDlg, IDC_EVENTCOMPUTERSTATIC, szComputer);
84  SetDlgItemTextW(hDlg, IDC_EVENTCATEGORYSTATIC, szCategory);
85  SetDlgItemTextW(hDlg, IDC_EVENTIDSTATIC, szEventID);
86  SetDlgItemTextW(hDlg, IDC_EVENTTYPESTATIC, szEventType);
87 
88  bEventData = (pevlr->DataLength > 0);
89  EnableDlgItem(hDlg, IDC_BYTESRADIO, bEventData);
90  EnableDlgItem(hDlg, IDC_WORDRADIO, bEventData);
91 
92  // FIXME: At the moment we support only one event log in the filter
93  GetEventMessage(EventLogFilter->EventLogs[0]->LogName, szSource, pevlr, szEventText);
94  SetDlgItemTextW(hDlg, IDC_EVENTTEXTEDIT, szEventText);
95 }
96 
97 static
98 UINT
100 {
101  PWCHAR p = pBuffer;
102  UINT n, i, r = 0;
103 
104  if (uOffset != 0)
105  {
106  n = swprintf(p, L"\r\n");
107  p += n;
108  r += n;
109  }
110 
111  n = swprintf(p, L"%04lx:", uOffset);
112  p += n;
113  r += n;
114 
115  for (i = 0; i < uLength; i++)
116  {
117  n = swprintf(p, L" %02x", pData[i]);
118  p += n;
119  r += n;
120  }
121 
122  for (i = 0; i < 9 - uLength; i++)
123  {
124  n = swprintf(p, L" ");
125  p += n;
126  r += n;
127  }
128 
129  for (i = 0; i < uLength; i++)
130  {
131  // NOTE: Normally iswprint should return FALSE for tabs...
132  n = swprintf(p, L"%c", (iswprint(pData[i]) && (pData[i] != L'\t')) ? pData[i] : L'.');
133  p += n;
134  r += n;
135  }
136 
137  return r;
138 }
139 
140 static
141 UINT
143 {
144  PWCHAR p = pBuffer;
145  UINT n, i, r = 0;
146 
147  if (uOffset != 0)
148  {
149  n = swprintf(p, L"\r\n");
150  p += n;
151  r += n;
152  }
153 
154  n = swprintf(p, L"%04lx:", uOffset);
155  p += n;
156  r += n;
157 
158  for (i = 0; i < uLength / sizeof(ULONG); i++)
159  {
160  n = swprintf(p, L" %08lx", pData[i]);
161  p += n;
162  r += n;
163  }
164 
165  /* Display the remaining bytes if uLength was not a multiple of sizeof(ULONG) */
166  for (i = (uLength / sizeof(ULONG)) * sizeof(ULONG); i < uLength; i++)
167  {
168  n = swprintf(p, L" %02x", ((PBYTE)pData)[i]);
169  p += n;
170  r += n;
171  }
172 
173  return r;
174 }
175 
176 static
177 VOID
179  _In_ HWND hDlg,
180  _In_ PDETAILDATA pDetailData)
181 {
182  BOOL bDisplayWords = pDetailData->bDisplayWords;
183  INT iItem = pDetailData->iEventItem;
184  LVITEMW li;
185  PEVENTLOGRECORD pevlr;
186 
187  LPBYTE pData;
188  UINT i, uOffset;
189  UINT uBufferSize, uLineLength;
190  PWCHAR pTextBuffer, pLine;
191 
192  li.mask = LVIF_PARAM;
193  li.iItem = iItem;
194  li.iSubItem = 0;
196 
197  pevlr = (PEVENTLOGRECORD)li.lParam;
198  if (pevlr->DataLength == 0)
199  {
201  return;
202  }
203 
204  if (bDisplayWords)
205  uBufferSize = ((pevlr->DataLength / 8) + 1) * 26 * sizeof(WCHAR);
206  else
207  uBufferSize = ((pevlr->DataLength / 8) + 1) * 43 * sizeof(WCHAR);
208 
209  pTextBuffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, uBufferSize);
210  if (!pTextBuffer)
211  return;
212 
213  pLine = pTextBuffer;
214  uOffset = 0;
215 
216  for (i = 0; i < pevlr->DataLength / 8; i++)
217  {
218  pData = (LPBYTE)((LPBYTE)pevlr + pevlr->DataOffset + uOffset);
219 
220  if (bDisplayWords)
221  uLineLength = PrintWordDataLine(pLine, uOffset, (PULONG)pData, 8);
222  else
223  uLineLength = PrintByteDataLine(pLine, uOffset, pData, 8);
224  pLine = pLine + uLineLength;
225 
226  uOffset += 8;
227  }
228 
229  if (pevlr->DataLength % 8 != 0)
230  {
231  pData = (LPBYTE)((LPBYTE)pevlr + pevlr->DataOffset + uOffset);
232 
233  if (bDisplayWords)
234  PrintWordDataLine(pLine, uOffset, (PULONG)pData, pevlr->DataLength % 8);
235  else
236  PrintByteDataLine(pLine, uOffset, pData, pevlr->DataLength % 8);
237  }
238 
239  SetDlgItemTextW(hDlg, IDC_EVENTDATAEDIT, pTextBuffer);
240 
241  HeapFree(GetProcessHeap(), 0, pTextBuffer);
242 }
243 
244 static
245 HFONT
247 {
248  LOGFONTW tmpFont = {0};
249  HFONT hFont;
250  HDC hDC;
251 
252  hDC = GetDC(NULL);
253 
254  tmpFont.lfHeight = -MulDiv(8, GetDeviceCaps(hDC, LOGPIXELSY), 72);
255  tmpFont.lfWeight = FW_NORMAL;
256  wcscpy(tmpFont.lfFaceName, L"Courier New");
257 
258  hFont = CreateFontIndirectW(&tmpFont);
259 
260  ReleaseDC(NULL, hDC);
261 
262  return hFont;
263 }
264 
265 static
266 VOID
268 {
269  WCHAR tmpHeader[512];
270  WCHAR szEventType[MAX_PATH];
271  WCHAR szSource[MAX_PATH];
272  WCHAR szCategory[MAX_PATH];
273  WCHAR szEventID[MAX_PATH];
274  WCHAR szDate[MAX_PATH];
276  WCHAR szUser[MAX_PATH];
277  WCHAR szComputer[MAX_PATH];
279  ULONG size = 0;
280  LPWSTR output;
281  HGLOBAL hMem;
282 
283  /* Try to open the clipboard */
284  if (!OpenClipboard(hWnd))
285  return;
286 
287  /* Get the formatted text needed to place the content into */
288  size += LoadStringW(hInst, IDS_COPY, tmpHeader, ARRAYSIZE(tmpHeader));
289 
290  /* Grab all the information and get it ready for the clipboard */
291  size += GetDlgItemTextW(hWnd, IDC_EVENTTYPESTATIC, szEventType, ARRAYSIZE(szEventType));
292  size += GetDlgItemTextW(hWnd, IDC_EVENTSOURCESTATIC, szSource, ARRAYSIZE(szSource));
293  size += GetDlgItemTextW(hWnd, IDC_EVENTCATEGORYSTATIC, szCategory, ARRAYSIZE(szCategory));
294  size += GetDlgItemTextW(hWnd, IDC_EVENTIDSTATIC, szEventID, ARRAYSIZE(szEventID));
295  size += GetDlgItemTextW(hWnd, IDC_EVENTDATESTATIC, szDate, ARRAYSIZE(szDate));
297  size += GetDlgItemTextW(hWnd, IDC_EVENTUSERSTATIC, szUser, ARRAYSIZE(szUser));
298  size += GetDlgItemTextW(hWnd, IDC_EVENTCOMPUTERSTATIC, szComputer, ARRAYSIZE(szComputer));
299  size += GetDlgItemTextW(hWnd, IDC_EVENTTEXTEDIT, evtDesc, ARRAYSIZE(evtDesc));
300 
301  size++; /* Null-termination */
302  size *= sizeof(WCHAR);
303 
304  /*
305  * Consolidate the information into one big piece and
306  * sort out the memory needed to write to the clipboard.
307  */
308  hMem = GlobalAlloc(GMEM_MOVEABLE, size);
309  if (hMem == NULL) goto Quit;
310 
311  output = GlobalLock(hMem);
312  if (output == NULL)
313  {
314  GlobalFree(hMem);
315  goto Quit;
316  }
317 
318  StringCbPrintfW(output, size,
319  tmpHeader, szEventType, szSource, szCategory, szEventID,
320  szDate, szTime, szUser, szComputer, evtDesc);
321 
322  GlobalUnlock(hMem);
323 
324  /* We succeeded, empty the clipboard and write the data in it */
325  EmptyClipboard();
327 
328 Quit:
329  /* Close the clipboard once we are done with it */
330  CloseClipboard();
331 }
332 
333 static
334 VOID
335 OnLink(HWND hDlg, ENLINK* penLink)
336 {
337  LPWSTR pLink;
338  TEXTRANGE txtRange;
339 
340  ASSERT(penLink->nmhdr.idFrom == IDC_EVENTTEXTEDIT);
341 
342  /* Only act on left button up events */
343  if (penLink->msg != WM_LBUTTONUP)
344  return;
345 
346  /* If the range is empty, do nothing */
347  if (penLink->chrg.cpMin == penLink->chrg.cpMax)
348  return;
349 
350  /* Allocate memory for the text link */
352  (max(penLink->chrg.cpMin, penLink->chrg.cpMax) -
353  min(penLink->chrg.cpMin, penLink->chrg.cpMax) + 1) * sizeof(WCHAR));
354  if (!pLink)
355  {
356  /* Not enough memory, bail out */
357  return;
358  }
359 
360  txtRange.chrg = penLink->chrg;
361  txtRange.lpstrText = pLink;
363 
364  /* Open the link */
365  ShellExecuteW(hDlg, L"open", pLink, NULL, NULL, SW_SHOWNOACTIVATE);
366 
367  /* Free the buffer */
368  HeapFree(GetProcessHeap(), 0, pLink);
369 }
370 
371 static
372 VOID
373 OnScroll(HWND hDlg, PDETAILDATA pData, INT nBar, WORD sbCode)
374 {
375  RECT rect;
376 
377  SCROLLINFO sInfo;
378  INT oldPos, Maximum;
379  PLONG pOriginXY;
380 
381  ASSERT(nBar == SB_HORZ || nBar == SB_VERT);
382 
383  GetClientRect(hDlg, &rect);
384 
385  if (nBar == SB_HORZ)
386  {
387  Maximum = pData->cxMin - (rect.right-rect.left) /* pData->cxOld */;
388  pOriginXY = &pData->scPos.x;
389  }
390  else // if (nBar == SB_VERT)
391  {
392  Maximum = pData->cyMin - (rect.bottom-rect.top) /* pData->cyOld */;
393  pOriginXY = &pData->scPos.y;
394  }
395 
396  /* Set scrollbar sizes */
397  sInfo.cbSize = sizeof(sInfo);
399 
400  if (!GetScrollInfo(hDlg, nBar, &sInfo))
401  return;
402 
403  oldPos = sInfo.nPos;
404 
405  switch (sbCode)
406  {
407  case SB_LINEUP: // SB_LINELEFT:
408  sInfo.nPos--;
409  break;
410 
411  case SB_LINEDOWN: // SB_LINERIGHT:
412  sInfo.nPos++;
413  break;
414 
415  case SB_PAGEUP: // SB_PAGELEFT:
416  sInfo.nPos -= sInfo.nPage;
417  break;
418 
419  case SB_PAGEDOWN: // SB_PAGERIGHT:
420  sInfo.nPos += sInfo.nPage;
421  break;
422 
423  case SB_THUMBTRACK:
424  sInfo.nPos = sInfo.nTrackPos;
425  break;
426 
427  case SB_THUMBPOSITION:
428  sInfo.nPos = sInfo.nTrackPos;
429  break;
430 
431  case SB_TOP: // SB_LEFT:
432  sInfo.nPos = sInfo.nMin;
433  break;
434 
435  case SB_BOTTOM: // SB_RIGHT:
436  sInfo.nPos = sInfo.nMax;
437  break;
438 
439  default:
440  break;
441  }
442 
443  sInfo.nPos = min(max(sInfo.nPos, 0), Maximum);
444 
445  if (oldPos != sInfo.nPos)
446  {
447  POINT scOldPos = pData->scPos;
448 
449  /* We now modify pData->scPos */
450  *pOriginXY = sInfo.nPos;
451 
452  ScrollWindowEx(hDlg,
453  (scOldPos.x - pData->scPos.x),
454  (scOldPos.y - pData->scPos.y),
455  NULL,
456  NULL,
457  NULL,
458  NULL,
460 
461  sInfo.fMask = SIF_POS;
462  SetScrollInfo(hDlg, nBar, &sInfo, TRUE);
463 
464  // UpdateWindow(hDlg);
465  }
466 }
467 
468 static
469 VOID
471 {
472  LONG_PTR dwStyle;
473  INT sbVXSize, sbHYSize;
474  SCROLLINFO sInfo;
475  POINT scOldPos;
476  HDWP hdwp;
477  HWND hItemWnd;
478  RECT rect;
479  INT y = 0;
480 
481  if (!pData)
482  return;
483 
484  dwStyle = GetWindowLongPtrW(hDlg, GWL_STYLE);
485  sbVXSize = GetSystemMetrics(SM_CXVSCROLL);
486  sbHYSize = GetSystemMetrics(SM_CYHSCROLL);
487 
488  /* Compensate for existing scroll bars (because lParam values do not accommodate scroll bar) */
489  if (dwStyle & WS_HSCROLL) cy += sbHYSize; // Window currently has a horizontal scrollbar
490  if (dwStyle & WS_VSCROLL) cx += sbVXSize; // Window currently has a vertical scrollbar
491 
492  /* Compensate for added scroll bars in window */
493  if (cx < pData->cxMin) cy -= sbHYSize; // Window will have a horizontal scroll bar
494  if (cy < pData->cyMin) cx -= sbVXSize; // Window will have a vertical scroll bar
495 
496  /* Set scrollbar sizes */
497  sInfo.cbSize = sizeof(sInfo);
498 
499  sInfo.fMask = SIF_POS;
500  if (GetScrollInfo(hDlg, SB_VERT, &sInfo))
501  scOldPos.y = sInfo.nPos;
502  else
503  scOldPos.y = pData->scPos.y;
504 
505  sInfo.fMask = SIF_RANGE | SIF_PAGE | SIF_POS;
506  sInfo.nMin = 0;
507  if (pData->cyMin > cy)
508  {
509  sInfo.nMax = pData->cyMin - 1;
510  sInfo.nPage = cy;
511  sInfo.nPos = pData->scPos.y;
512  SetScrollInfo(hDlg, SB_VERT, &sInfo, TRUE);
513 
514  /* Display the scrollbar if needed */
515  if (!(dwStyle & WS_VSCROLL))
516  ShowScrollBar(hDlg, SB_VERT, TRUE);
517  }
518  else
519  {
520  scOldPos.y = 0;
521 
522  sInfo.nMax = pData->cyMin - 1;
523  sInfo.nPage = cy;
524  sInfo.nPos = pData->scPos.y;
525  sInfo.nPos = scOldPos.y;
526  SetScrollInfo(hDlg, SB_VERT, &sInfo, TRUE);
527 
528  ShowScrollBar(hDlg, SB_VERT, FALSE);
529 
530  rect.left = cx - sbVXSize;
531  rect.right = cx;
532  rect.top = 0;
533  rect.bottom = cy;
534  InvalidateRect(hDlg, &rect, TRUE);
535  }
536 
537  sInfo.fMask = SIF_POS;
538  if (GetScrollInfo(hDlg, SB_HORZ, &sInfo))
539  scOldPos.x = sInfo.nPos;
540  else
541  scOldPos.x = pData->scPos.x;
542 
543  sInfo.fMask = SIF_RANGE | SIF_PAGE | SIF_POS;
544  sInfo.nMin = 0;
545  if (pData->cxMin > cx)
546  {
547  sInfo.nMax = pData->cxMin - 1;
548  sInfo.nPage = cx;
549  sInfo.nPos = pData->scPos.x;
550  SetScrollInfo(hDlg, SB_HORZ, &sInfo, TRUE);
551 
552  /* Display the scrollbar if needed */
553  if (!(dwStyle & WS_HSCROLL))
554  ShowScrollBar(hDlg, SB_HORZ, TRUE);
555  }
556  else
557  {
558  scOldPos.x = 0;
559 
560  sInfo.nMax = pData->cxMin - 1;
561  sInfo.nPage = cx;
562  sInfo.nPos = pData->scPos.x;
563  sInfo.nPos = scOldPos.x;
564  SetScrollInfo(hDlg, SB_HORZ, &sInfo, TRUE);
565 
566  ShowScrollBar(hDlg, SB_HORZ, FALSE);
567 
568  rect.left = 0;
569  rect.right = cx;
570  rect.top = cy - sbHYSize;
571  rect.bottom = cy;
572  InvalidateRect(hDlg, &rect, TRUE);
573  }
574 
575  if ((scOldPos.x != pData->scPos.x) || (scOldPos.y != pData->scPos.y))
576  {
577  ScrollWindowEx(hDlg,
578  // (scOldPos.x - pData->scPos.x),
579  (pData->scPos.x - scOldPos.x),
580  // (scOldPos.y - pData->scPos.y),
581  (pData->scPos.y - scOldPos.y),
582  NULL,
583  NULL,
584  NULL,
585  NULL,
587 
588  pData->scPos = scOldPos;
589  }
590 
591  // /* Adjust the start of the visible area if we are attempting to show nonexistent areas */
592  // if ((pData->cxMin - pData->scPos.x) < cx) pData->scPos.x = pData->cxMin - cx;
593  // if ((pData->cyMin - pData->scPos.y) < cy) pData->scPos.y = pData->cyMin - cy;
594  // // InvalidateRect(GuiData->hWindow, NULL, TRUE);
595 
596  /* Forbid resizing the control smaller than its minimal size */
597  if (cx < pData->cxMin) cx = pData->cxMin;
598  if (cy < pData->cyMin) cy = pData->cyMin;
599 
600  if ((cx != pData->cxOld) || (cy != pData->cyOld))
601  {
602  hdwp = BeginDeferWindowPos(8);
603 
604  /* Move the edit boxes */
605 
606  GetWindowRect(hDlg, &rect);
607 
608  hItemWnd = GetDlgItem(hDlg, IDC_EVENTTEXTEDIT);
609  GetWindowRect(hItemWnd, &rect);
610  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
611  // OffsetRect(&rect, 0, y);
612  // y += (cy - pData->cyOld) / 2 ; // + (cy - pData->cyOld) % 2;
614  if (cy >= pData->cyOld)
615  y += (cy - pData->cyOld) / 2 + (cy - pData->cyOld) % 2;
616  else
617  y -= (pData->cyOld - cy) / 2 + (pData->cyOld - cy) % 2;
618 
619  if (hdwp)
620  hdwp = DeferWindowPos(hdwp,
621  hItemWnd,
622  0,
623  rect.left, rect.top,
624  (rect.right - rect.left) + (cx - pData->cxOld),
625  (rect.bottom - rect.top) + y, SWP_NOZORDER | SWP_NOACTIVATE);
627 
628  hItemWnd = GetDlgItem(hDlg, IDC_DETAILS_STATIC);
629  GetWindowRect(hItemWnd, &rect);
630  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
631  // OffsetRect(&rect, 0, y);
632 
633  if (hdwp)
634  hdwp = DeferWindowPos(hdwp,
635  hItemWnd,
636  0,
637  rect.left, rect.top + y,
638  0, 0,
640 
641  hItemWnd = GetDlgItem(hDlg, IDC_BYTESRADIO);
642  GetWindowRect(hItemWnd, &rect);
643  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
644  // OffsetRect(&rect, 0, y);
645 
646  if (hdwp)
647  hdwp = DeferWindowPos(hdwp,
648  hItemWnd,
649  0,
650  rect.left, rect.top + y,
651  0, 0,
653 
654  hItemWnd = GetDlgItem(hDlg, IDC_WORDRADIO);
655  GetWindowRect(hItemWnd, &rect);
656  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
657  // OffsetRect(&rect, 0, y);
658 
659  if (hdwp)
660  hdwp = DeferWindowPos(hdwp,
661  hItemWnd,
662  0,
663  rect.left, rect.top + y,
664  0, 0,
666 
667  hItemWnd = GetDlgItem(hDlg, IDC_EVENTDATAEDIT);
668  GetWindowRect(hItemWnd, &rect);
669  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
670  // OffsetRect(&rect, 0, y);
671  // // y -= (cy - pData->cyOld) % 2;
672 
673  if (hdwp)
674  hdwp = DeferWindowPos(hdwp,
675  hItemWnd,
676  0,
677  rect.left, rect.top + y,
678  (rect.right - rect.left) + (cx - pData->cxOld),
679  (rect.bottom - rect.top) + y,
681 
682  /* Move the buttons */
683 
684  hItemWnd = GetDlgItem(hDlg, IDC_PREVIOUS);
685  GetWindowRect(hItemWnd, &rect);
686  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
687 
688  if (hdwp)
689  hdwp = DeferWindowPos(hdwp,
690  hItemWnd,
691  0,
692  rect.left + (cx - pData->cxOld),
693  rect.top,
694  0, 0,
696 
697  hItemWnd = GetDlgItem(hDlg, IDC_NEXT);
698  GetWindowRect(hItemWnd, &rect);
699  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
700 
701  if (hdwp)
702  hdwp = DeferWindowPos(hdwp,
703  hItemWnd,
704  0,
705  rect.left + (cx - pData->cxOld),
706  rect.top,
707  0, 0,
709 
710  hItemWnd = GetDlgItem(hDlg, IDC_COPY);
711  GetWindowRect(hItemWnd, &rect);
712  MapWindowPoints(HWND_DESKTOP /*NULL*/, hDlg, (LPPOINT)&rect, sizeof(RECT)/sizeof(POINT));
713 
714  if (hdwp)
715  hdwp = DeferWindowPos(hdwp,
716  hItemWnd,
717  0,
718  rect.left + (cx - pData->cxOld),
719  rect.top,
720  0, 0,
722 
723  if (hdwp)
724  EndDeferWindowPos(hdwp);
725 
726  pData->cxOld = cx;
727  pData->cyOld = cy;
728  }
729 }
730 
731 static
732 VOID
734 {
735  DWORD dwMask;
736 
740 
744 
745  /* Set the default read-only RichEdit color */
747 
748  /* Enable RichEdit coloured and underlined links */
751 
752  /*
753  * Activate automatic URL recognition by the RichEdit control. For more information, see:
754  * https://blogs.msdn.microsoft.com/murrays/2009/08/31/automatic-richedit-hyperlinks/
755  * https://blogs.msdn.microsoft.com/murrays/2009/09/24/richedit-friendly-name-hyperlinks/
756  * https://msdn.microsoft.com/en-us/library/windows/desktop/bb787991(v=vs.85).aspx
757  */
758  SendDlgItemMessageW(hDlg, IDC_EVENTTEXTEDIT, EM_AUTOURLDETECT, AURL_ENABLEURL /* | AURL_ENABLEEAURLS */, 0);
759 
760  /* Note that the RichEdit control never gets themed under WinXP+; one would have to write code to simulate Edit-control theming */
761 
764 }
765 
766 /* Message handler for Event Details control */
767 static
770 {
772 
774 
775  switch (uMsg)
776  {
777  case WM_INITDIALOG:
778  {
779  RECT rect;
780 
782  if (!pData)
783  {
784  EndDialog(hDlg, 0);
785  return (INT_PTR)TRUE;
786  }
788 
789  if (lParam != 0)
790  {
792  pData->EventLogFilter = DetailInfo->EventLogFilter;
793  pData->iEventItem = DetailInfo->iEventItem;
794  }
795  pData->bDisplayWords = FALSE;
796  pData->hMonospaceFont = CreateMonospaceFont();
797 
798  GetClientRect(hDlg, &rect);
799  pData->cxOld = pData->cxMin = rect.right - rect.left;
800  pData->cyOld = pData->cyMin = rect.bottom - rect.top;
801  pData->scPos.x = pData->scPos.y = 0;
802 
803  InitDetailsDlgCtrl(hDlg, pData);
804 
805  // OnSize(hDlg, pData, pData->cxOld, pData->cyOld);
806  return (INT_PTR)TRUE;
807  }
808 
809  case WM_DESTROY:
810  if (pData)
811  {
812  if (pData->hMonospaceFont)
813  DeleteObject(pData->hMonospaceFont);
815  }
816  return (INT_PTR)TRUE;
817 
818  case EVT_SETFILTER:
819  pData->EventLogFilter = (PEVENTLOGFILTER)lParam;
820  return (INT_PTR)TRUE;
821 
822  case EVT_DISPLAY:
823  {
824  pData->iEventItem = (INT)lParam;
825  if (pData->EventLogFilter)
826  {
827  /* Show event info in control */
828  DisplayEvent(hDlg, pData);
829  DisplayEventData(hDlg, pData);
830  }
831  return (INT_PTR)TRUE;
832  }
833 
834  case WM_COMMAND:
835  switch (LOWORD(wParam))
836  {
837  case IDC_PREVIOUS:
838  case IDC_NEXT:
839  {
840  BOOL bPrev = (LOWORD(wParam) == IDC_PREVIOUS);
841  INT iItem, iSel;
842 
843  /* Select the previous/next item from our current one */
845  pData->iEventItem,
846  bPrev ? LVNI_ABOVE : LVNI_BELOW);
847  if (iItem == -1)
848  {
849  // TODO: Localization.
850  if (MessageBoxW(hDlg,
851  bPrev
852  ? L"You have reached the beginning of the event log. Do you want to continue from the end?"
853  : L"You have reached the end of the event log. Do you want to continue from the beginning?",
854  szTitle,
856  == IDNO)
857  {
858  break;
859  }
860 
861  /* Determine from where to restart */
862  if (bPrev)
863  iItem = ListView_GetItemCount(hwndListView) - 1;
864  else
865  iItem = 0;
866  }
867 
868  /*
869  * Deselect the currently selected items in the list view.
870  * (They may be different from our current one, if multiple
871  * event details are being displayed concurrently!)
872  */
873  iSel = -1;
874  while ((iSel = ListView_GetNextItem(hwndListView, iSel, LVNI_SELECTED)) != -1)
875  {
878  }
879 
880  /* Select the new item */
885 
886  pData->iEventItem = iItem;
887 
888  /* Show event info in control */
889  if (pData->EventLogFilter)
890  {
891  DisplayEvent(hDlg, pData);
892  DisplayEventData(hDlg, pData);
893  }
894  return (INT_PTR)TRUE;
895  }
896 
897  case IDC_COPY:
898  if (pData->EventLogFilter)
899  CopyEventEntry(hDlg);
900  return (INT_PTR)TRUE;
901 
902  case IDC_BYTESRADIO:
903  case IDC_WORDRADIO:
904  {
905  if (pData->EventLogFilter)
906  {
907  pData->bDisplayWords = (LOWORD(wParam) == IDC_WORDRADIO);
908  DisplayEventData(hDlg, pData);
909  }
910  return (INT_PTR)TRUE;
911  }
912 
913  default:
914  break;
915  }
916  break;
917 
918  case WM_NOTIFY:
919  {
921 
922  if (hdr->idFrom == IDC_EVENTTEXTEDIT)
923  {
924  switch (hdr->code)
925  {
926  case EN_LINK:
927  OnLink(hDlg, (ENLINK*)lParam);
928  break;
929  }
930  }
931  break;
932  }
933 
934  case WM_HSCROLL:
935  case WM_VSCROLL:
936  {
937  OnScroll(hDlg, pData,
938  (uMsg == WM_HSCROLL) ? SB_HORZ : SB_VERT,
939  LOWORD(wParam));
941  return (INT_PTR)TRUE;
942  }
943 
944  case WM_SIZE:
945  OnSize(hDlg, pData, LOWORD(lParam), HIWORD(lParam));
947  return (INT_PTR)TRUE;
948  }
949 
950  return (INT_PTR)FALSE;
951 }
952 
953 HWND
955  HWND hParentWnd,
956  LPARAM lParam)
957 {
960  hParentWnd, EventDetailsCtrl, lParam);
961 }
#define IDC_WORDRADIO
Definition: resource.h:53
#define ListView_EnsureVisible(hwndLV, i, fPartialOK)
Definition: commctrl.h:2519
#define IDC_EVENTDATESTATIC
Definition: resource.h:39
INT iEventItem
Definition: evtdetctl.c:30
#define SB_PAGEDOWN
Definition: winuser.h:569
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2434
#define IN
Definition: typedefs.h:39
#define SB_PAGEUP
Definition: winuser.h:568
#define max(a, b)
Definition: svc.c:63
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define SM_CYHSCROLL
Definition: winuser.h:956
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
char hdr[14]
Definition: iptest.cpp:33
#define IMAGE_ICON
Definition: winuser.h:212
PEVENTLOG EventLogs[ANYSIZE_ARRAY]
Definition: eventvwr.h:138
#define SIF_RANGE
Definition: winuser.h:1225
#define SW_SHOWNOACTIVATE
Definition: winuser.h:768
long y
Definition: polytest.cpp:48
static INT cyMin
Definition: eventvwr.c:4314
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
PWSTR LogName
Definition: eventvwr.h:93
TCHAR szTime[64]
Definition: solitaire.cpp:19
#define EM_GETTEXTRANGE
Definition: richedit.h:108
long x
Definition: polytest.cpp:48
#define EM_GETEVENTMASK
Definition: richedit.h:92
HDC WINAPI GetDC(_In_opt_ HWND)
#define IDC_EVENTCATEGORYSTATIC
Definition: resource.h:42
#define SB_VERT
Definition: winuser.h:553
#define TRUE
Definition: types.h:120
#define ENM_MOUSEEVENTS
Definition: richedit.h:476
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define IDC_EVENTDATAEDIT
Definition: resource.h:54
WCHAR szTitle[]
Definition: magnifier.c:35
static INT cxMin
Definition: eventvwr.c:4314
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
Definition: commctrl.h:2684
#define SB_HORZ
Definition: winuser.h:552
BOOL bDisplayWords
Definition: evtdetctl.c:32
LONG lfHeight
Definition: dimm.idl:59
#define INT
Definition: polytest.cpp:20
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:35
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
HWND hWnd
Definition: settings.c:17
GLdouble n
Definition: glext.h:7729
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
HWND CreateEventDetailsCtrl(HINSTANCE hInstance, HWND hParentWnd, LPARAM lParam)
Definition: evtdetctl.c:954
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
LONG cpMax
Definition: richedit.h:501
#define IDC_EVENTSOURCESTATIC
Definition: resource.h:40
#define IDC_NEXT
Definition: fontview.h:17
#define IDI_PREV
Definition: resource.h:23
#define LVNI_SELECTED
Definition: commctrl.h:2424
UINT_PTR WPARAM
Definition: windef.h:207
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define IDC_PREVIOUS
Definition: resource.h:47
#define GetWindowLongPtrW
Definition: winuser.h:4819
uint16_t * PWCHAR
Definition: typedefs.h:56
#define SWP_NOZORDER
Definition: winuser.h:1237
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
int32_t INT_PTR
Definition: typedefs.h:64
#define IDC_EVENTUSERSTATIC
Definition: resource.h:45
if(dx==0 &&dy==0)
Definition: linetemp.h:174
HFONT hMonospaceFont
Definition: evtdetctl.c:33
BOOL GetEventMessage(IN LPCWSTR KeyName, IN LPCWSTR SourceName, IN PEVENTLOGRECORD pevlr, OUT PWCHAR EventText)
Definition: eventvwr.c:1639
#define BM_SETIMAGE
Definition: winuser.h:1912
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:58
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
#define SIF_PAGE
Definition: winuser.h:1223
DWORD WINAPI GetSysColor(_In_ int)
& rect
Definition: startmenu.cpp:1413
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define IDC_EVENTIDSTATIC
Definition: resource.h:44
HFONT hFont
Definition: main.c:53
#define DWLP_MSGRESULT
Definition: winuser.h:864
struct tagNMHDR * LPNMHDR
HWND hwndListView
Definition: eventvwr.c:66
#define EVT_DISPLAY
Definition: evtdetctl.h:22
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define ENM_LINK
Definition: richedit.h:485
HINSTANCE hInstance
Definition: charmap.c:19
static VOID DisplayEvent(_In_ HWND hDlg, _In_ PDETAILDATA pDetailData)
Definition: evtdetctl.c:43
#define L(x)
Definition: ntvdm.h:50
#define COLOR_3DFACE
Definition: winuser.h:923
static VOID CopyEventEntry(HWND hWnd)
Definition: evtdetctl.c:267
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
#define MB_YESNO
Definition: winuser.h:811
#define ListView_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2673
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
static UINT PrintByteDataLine(PWCHAR pBuffer, UINT uOffset, PBYTE pData, UINT uLength)
Definition: evtdetctl.c:99
struct _DETAILDATA * PDETAILDATA
UINT_PTR idFrom
Definition: winuser.h:3148
#define IDC_DETAILS_STATIC
Definition: resource.h:51
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define SW_ERASE
Definition: winuser.h:2570
#define IDI_NEXT
Definition: resource.h:22
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:585
PEVENTLOGFILTER EventLogFilter
Definition: evtdetctl.c:29
#define EVT_SETFILTER
Definition: evtdetctl.h:21
#define CF_UNICODETEXT
Definition: constants.h:408
static HFONT CreateMonospaceFont(VOID)
Definition: evtdetctl.c:246
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define LVIS_SELECTED
Definition: commctrl.h:2319
PVOID pBuffer
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
#define MB_ICONQUESTION
Definition: winuser.h:783
POINT scPos
Definition: evtdetctl.c:37
#define SB_THUMBPOSITION
Definition: winuser.h:572
#define _In_
Definition: ms_sal.h:308
LONG_PTR LPARAM
Definition: windef.h:208
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2697
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define WM_DESTROY
Definition: winuser.h:1599
struct _EVENTLOGFILTER * PEVENTLOGFILTER
#define EM_AUTOURLDETECT
Definition: richedit.h:125
#define BM_SETCHECK
Definition: winuser.h:1911
static VOID OnSize(HWND hDlg, PDETAILDATA pData, INT cx, INT cy)
Definition: evtdetctl.c:470
BOOL WINAPI EmptyClipboard(void)
Definition: ntwrapper.h:190
GLsizeiptr size
Definition: glext.h:5919
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define GetProcessHeap()
Definition: compat.h:736
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static VOID InitDetailsDlgCtrl(HWND hDlg, PDETAILDATA pData)
Definition: evtdetctl.c:733
#define ASSERT(a)
Definition: mode.c:44
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SB_THUMBTRACK
Definition: winuser.h:573
#define WM_SIZE
Definition: winuser.h:1601
struct _EVENTDETAIL_INFO * PEVENTDETAIL_INFO
#define SWP_NOACTIVATE
Definition: winuser.h:1232
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define IDC_COPY
Definition: resource.h:17
unsigned short WORD
Definition: ntddk_ex.h:93
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
PEVENTLOGFILTER EventLogFilter
Definition: evtdetctl.h:17
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WS_HSCROLL
Definition: pedump.c:628
BOOL WINAPI CloseClipboard(void)
Definition: ntwrapper.h:178
#define LVNI_BELOW
Definition: commctrl.h:2429
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
struct _EVENTLOGRECORD * PEVENTLOGRECORD
#define IDC_BYTESRADIO
Definition: resource.h:52
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
#define DWLP_USER
Definition: winuser.h:866
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define IDC_EVENTTEXTEDIT
Definition: resource.h:50
static VOID OnScroll(HWND hDlg, PDETAILDATA pData, INT nBar, WORD sbCode)
Definition: evtdetctl.c:373
#define WM_COMMAND
Definition: winuser.h:1730
int _cdecl swprintf(const WCHAR *,...)
#define IDD_EVENTDETAILS_CTRL
Definition: resource.h:33
#define IDC_EVENTCOMPUTERSTATIC
Definition: resource.h:46
#define SW_INVALIDATE
Definition: winuser.h:2569
#define SIF_POS
Definition: winuser.h:1224
#define IDC_EVENTTIMESTATIC
Definition: resource.h:41
#define SWP_NOSIZE
Definition: winuser.h:1235
#define GWL_STYLE
Definition: winuser.h:846
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SB_TOP
Definition: winuser.h:578
HINSTANCE hInst
Definition: dxdiag.c:13
struct _DETAILDATA DETAILDATA
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static VOID DisplayEventData(_In_ HWND hDlg, _In_ PDETAILDATA pDetailData)
Definition: evtdetctl.c:178
#define EnableDlgItem(hDlg, nID, bEnable)
Definition: eventvwr.h:55
#define EN_LINK
Definition: richedit.h:202
#define WM_LBUTTONUP
Definition: winuser.h:1767
#define SIF_TRACKPOS
Definition: winuser.h:1227
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int * PULONG
Definition: retypes.h:1
#define iswprint(_c)
Definition: ctype.h:672
#define HWND_DESKTOP
Definition: winuser.h:1199
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
#define SB_LINEDOWN
Definition: winuser.h:565
#define NULL
Definition: types.h:112
#define WM_HSCROLL
Definition: winuser.h:1733
#define SB_LINEUP
Definition: winuser.h:564
#define SB_BOTTOM
Definition: winuser.h:577
#define WS_VSCROLL
Definition: pedump.c:627
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
WCHAR SourceName[256]
Definition: arping.c:28
#define SW_SCROLLCHILDREN
Definition: winuser.h:2568
#define SM_CXVSCROLL
Definition: winuser.h:955
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define WM_SETFONT
Definition: winuser.h:1640
#define BST_CHECKED
Definition: winuser.h:197
#define FW_NORMAL
Definition: wingdi.h:373
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static INT_PTR CALLBACK EventDetailsCtrl(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: evtdetctl.c:769
static VOID OnLink(HWND hDlg, ENLINK *penLink)
Definition: evtdetctl.c:335
_Out_opt_ int * cx
Definition: commctrl.h:585
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2394
#define OUT
Definition: typedefs.h:40
#define LVIF_PARAM
Definition: commctrl.h:2311
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2346
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
#define HIWORD(l)
Definition: typedefs.h:247
unsigned int ULONG
Definition: retypes.h:1
#define IDI_COPY
Definition: resource.h:24
#define LOGPIXELSY
Definition: wingdi.h:719
#define LVNI_ABOVE
Definition: commctrl.h:2428
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SetWindowLongPtrW
Definition: winuser.h:5336
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define IDNO
Definition: winuser.h:830
LONG lfWeight
Definition: dimm.idl:63
#define IDC_EVENTTYPESTATIC
Definition: resource.h:43
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define AURL_ENABLEURL
Definition: eventvwr.h:44
#define LR_DEFAULTCOLOR
Definition: winuser.h:1081
signed int * PLONG
Definition: retypes.h:5
BYTE * PBYTE
Definition: pedump.c:66
#define WM_INITDIALOG
Definition: winuser.h:1729
LPARAM lParam
Definition: combotst.c:139
static UINT PrintWordDataLine(PWCHAR pBuffer, UINT uOffset, PULONG pData, UINT uLength)
Definition: evtdetctl.c:142
#define LOWORD(l)
Definition: pedump.c:82
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define HeapFree(x, y, z)
Definition: compat.h:735
#define GMEM_MOVEABLE
Definition: winbase.h:294
#define LVIS_FOCUSED
Definition: commctrl.h:2318
LONG cpMin
Definition: richedit.h:500
#define WM_NOTIFY
Definition: richedit.h:61
#define IDS_COPY
Definition: resource.h:131
LARGE_INTEGER li
Definition: fxtimerapi.cpp:235
#define WM_VSCROLL
Definition: winuser.h:1734
#define EVENT_MESSAGE_EVENTTEXT_BUFFER
Definition: evtdetctl.c:16