ReactOS 0.4.15-dev-7958-gcd0bb1a
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)
17extern WCHAR szTitle[];
18extern HWND hwndListView;
19extern BOOL
22 IN PEVENTLOGRECORD pevlr,
23 OUT PWCHAR EventText);
24
25
26typedef struct _DETAILDATA
27{
28 /* Data initialized from EVENTDETAIL_INFO */
31
34
39
40
41static
42VOID
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
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
97static
98UINT
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
140static
141UINT
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
176static
177VOID
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
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
244static
245HFONT
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
261
262 return hFont;
263}
264
265static
266VOID
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));
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 */
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 */
327
328Quit:
329 /* Close the clipboard once we are done with it */
331}
332
333static
334VOID
335OnLink(HWND hDlg, ENLINK* penLink)
336{
337 LPWSTR pLink;
338 TEXTRANGE txtRange;
339
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
371static
372VOID
373OnScroll(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
468static
469VOID
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
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
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
731static
732VOID
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 */
767static
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
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)
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:
947 return (INT_PTR)TRUE;
948 }
949
950 return (INT_PTR)FALSE;
951}
952
953HWND
955 HWND hParentWnd,
957{
960 hParentWnd, EventDetailsCtrl, lParam);
961}
static HDC hDC
Definition: 3dtext.c:33
WCHAR SourceName[256]
Definition: arping.c:28
#define IDC_COPY
Definition: resource.h:17
HWND hWnd
Definition: settings.c:17
#define IDC_EVENTCOMPUTERSTATIC
Definition: resource.h:46
#define IDD_EVENTDETAILS_CTRL
Definition: resource.h:33
#define IDC_EVENTDATESTATIC
Definition: resource.h:39
#define IDC_EVENTUSERSTATIC
Definition: resource.h:45
#define IDC_WORDRADIO
Definition: resource.h:53
#define IDI_PREV
Definition: resource.h:23
#define IDC_EVENTTYPESTATIC
Definition: resource.h:43
#define IDS_COPY
Definition: resource.h:131
#define IDC_BYTESRADIO
Definition: resource.h:52
#define IDC_EVENTTIMESTATIC
Definition: resource.h:41
#define IDC_EVENTDATAEDIT
Definition: resource.h:54
#define IDC_EVENTSOURCESTATIC
Definition: resource.h:40
#define IDC_PREVIOUS
Definition: resource.h:47
#define IDI_NEXT
Definition: resource.h:22
#define IDC_EVENTCATEGORYSTATIC
Definition: resource.h:42
#define IDC_EVENTTEXTEDIT
Definition: resource.h:50
#define IDC_DETAILS_STATIC
Definition: resource.h:51
#define IDI_COPY
Definition: resource.h:24
#define IDC_EVENTIDSTATIC
Definition: resource.h:44
#define CF_UNICODETEXT
Definition: constants.h:408
HFONT hFont
Definition: main.c:53
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define swprintf
Definition: precomp.h:40
HINSTANCE hInst
Definition: dxdiag.c:13
static INT cxMin
Definition: eventvwr.c:4312
static INT cyMin
Definition: eventvwr.c:4312
#define AURL_ENABLEURL
Definition: eventvwr.h:44
#define EnableDlgItem(hDlg, nID, bEnable)
Definition: eventvwr.h:55
struct _EVENTLOGFILTER * PEVENTLOGFILTER
BOOL GetEventMessage(IN LPCWSTR KeyName, IN LPCWSTR SourceName, IN PEVENTLOGRECORD pevlr, OUT PWCHAR EventText)
Definition: eventvwr.c:1639
static VOID OnScroll(HWND hDlg, PDETAILDATA pData, INT nBar, WORD sbCode)
Definition: evtdetctl.c:373
static VOID InitDetailsDlgCtrl(HWND hDlg, PDETAILDATA pData)
Definition: evtdetctl.c:733
static INT_PTR CALLBACK EventDetailsCtrl(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: evtdetctl.c:769
static VOID CopyEventEntry(HWND hWnd)
Definition: evtdetctl.c:267
static HFONT CreateMonospaceFont(VOID)
Definition: evtdetctl.c:246
#define EVENT_MESSAGE_EVENTTEXT_BUFFER
Definition: evtdetctl.c:16
struct _DETAILDATA * PDETAILDATA
static VOID DisplayEventData(_In_ HWND hDlg, _In_ PDETAILDATA pDetailData)
Definition: evtdetctl.c:178
static VOID OnLink(HWND hDlg, ENLINK *penLink)
Definition: evtdetctl.c:335
static UINT PrintByteDataLine(PWCHAR pBuffer, UINT uOffset, PBYTE pData, UINT uLength)
Definition: evtdetctl.c:99
static UINT PrintWordDataLine(PWCHAR pBuffer, UINT uOffset, PULONG pData, UINT uLength)
Definition: evtdetctl.c:142
static VOID DisplayEvent(_In_ HWND hDlg, _In_ PDETAILDATA pDetailData)
Definition: evtdetctl.c:43
WCHAR szTitle[]
Definition: magnifier.c:35
struct _DETAILDATA DETAILDATA
HWND CreateEventDetailsCtrl(HINSTANCE hInstance, HWND hParentWnd, LPARAM lParam)
Definition: evtdetctl.c:954
HWND hwndListView
Definition: eventvwr.c:66
static VOID OnSize(HWND hDlg, PDETAILDATA pData, INT cx, INT cy)
Definition: evtdetctl.c:470
struct _EVENTDETAIL_INFO * PEVENTDETAIL_INFO
#define EVT_DISPLAY
Definition: evtdetctl.h:22
#define EVT_SETFILTER
Definition: evtdetctl.h:21
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
#define IDC_NEXT
Definition: fontview.h:17
pKey DeleteObject()
LARGE_INTEGER li
Definition: fxtimerapi.cpp:235
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLsizeiptr size
Definition: glext.h:5919
GLdouble n
Definition: glext.h:7729
GLfloat GLfloat p
Definition: glext.h:8902
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
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define iswprint(_c)
Definition: ctype.h:672
char hdr[14]
Definition: iptest.cpp:33
if(dx< 0)
Definition: linetemp.h:194
#define ASSERT(a)
Definition: mode.c:44
static HDC
Definition: imagelist.c:92
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define min(a, b)
Definition: monoChain.cc:55
#define _In_
Definition: ms_sal.h:308
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
BYTE * PBYTE
Definition: pedump.c:66
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_HSCROLL
Definition: pedump.c:628
#define INT
Definition: polytest.cpp:20
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
#define ListView_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2673
#define LVNI_SELECTED
Definition: commctrl.h:2424
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
Definition: commctrl.h:2684
#define LVNI_BELOW
Definition: commctrl.h:2429
_Out_opt_ int * cx
Definition: commctrl.h:585
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2434
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
#define LVIS_SELECTED
Definition: commctrl.h:2319
#define LVIF_PARAM
Definition: commctrl.h:2311
#define LVNI_ABOVE
Definition: commctrl.h:2428
#define LVIS_FOCUSED
Definition: commctrl.h:2318
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2394
#define ListView_EnsureVisible(hwndLV, i, fPartialOK)
Definition: commctrl.h:2519
PVOID pBuffer
#define EM_GETEVENTMASK
Definition: richedit.h:92
#define EM_AUTOURLDETECT
Definition: richedit.h:125
#define ENM_LINK
Definition: richedit.h:485
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
#define EM_GETTEXTRANGE
Definition: richedit.h:108
#define EN_LINK
Definition: richedit.h:202
#define WM_NOTIFY
Definition: richedit.h:61
#define ENM_MOUSEEVENTS
Definition: richedit.h:476
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2402
TCHAR szTime[64]
Definition: solitaire.cpp:20
& rect
Definition: startmenu.cpp:1413
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
LONG lfHeight
Definition: dimm.idl:59
LONG lfWeight
Definition: dimm.idl:63
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
PEVENTLOGFILTER EventLogFilter
Definition: evtdetctl.c:29
INT iEventItem
Definition: evtdetctl.c:30
POINT scPos
Definition: evtdetctl.c:37
BOOL bDisplayWords
Definition: evtdetctl.c:32
HFONT hMonospaceFont
Definition: evtdetctl.c:33
PEVENTLOGFILTER EventLogFilter
Definition: evtdetctl.h:17
PEVENTLOG EventLogs[ANYSIZE_ARRAY]
Definition: eventvwr.h:138
PWSTR LogName
Definition: eventvwr.h:93
LONG cpMax
Definition: richedit.h:501
LONG cpMin
Definition: richedit.h:500
UINT_PTR idFrom
Definition: winuser.h:3158
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define max(a, b)
Definition: svc.c:63
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
int32_t * PLONG
Definition: typedefs.h:58
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
#define GMEM_MOVEABLE
Definition: winbase.h:294
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define LOGPIXELSY
Definition: wingdi.h:719
#define FW_NORMAL
Definition: wingdi.h:373
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
struct _EVENTLOGRECORD * PEVENTLOGRECORD
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
#define SWP_NOACTIVATE
Definition: winuser.h:1242
#define SB_THUMBTRACK
Definition: winuser.h:573
#define DWLP_USER
Definition: winuser.h:872
#define GetWindowLongPtrW
Definition: winuser.h:4829
#define SB_LINEUP
Definition: winuser.h:564
#define WM_HSCROLL
Definition: winuser.h:1743
#define IMAGE_ICON
Definition: winuser.h:212
#define WM_VSCROLL
Definition: winuser.h:1744
#define SW_SCROLLCHILDREN
Definition: winuser.h:2578
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SIF_RANGE
Definition: winuser.h:1235
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define SM_CXVSCROLL
Definition: winuser.h:961
#define WM_SIZE
Definition: winuser.h:1611
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
#define SB_VERT
Definition: winuser.h:553
#define SB_BOTTOM
Definition: winuser.h:577
#define WM_COMMAND
Definition: winuser.h:1740
#define SW_INVALIDATE
Definition: winuser.h:2579
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2203
BOOL WINAPI CloseClipboard(void)
Definition: ntwrapper.h:178
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define SW_SHOWNOACTIVATE
Definition: winuser.h:774
#define SIF_PAGE
Definition: winuser.h:1233
#define SWP_NOSIZE
Definition: winuser.h:1245
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
#define WM_INITDIALOG
Definition: winuser.h:1739
#define MB_YESNO
Definition: winuser.h:817
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define SIF_TRACKPOS
Definition: winuser.h:1237
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define SM_CYHSCROLL
Definition: winuser.h:962
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define BM_SETCHECK
Definition: winuser.h:1921
#define HWND_DESKTOP
Definition: winuser.h:1209
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BM_SETIMAGE
Definition: winuser.h:1922
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_SETFONT
Definition: winuser.h:1650
#define IDNO
Definition: winuser.h:836
BOOL WINAPI EmptyClipboard(void)
Definition: ntwrapper.h:190
#define SB_PAGEDOWN
Definition: winuser.h:569
struct tagNMHDR * LPNMHDR
HDC WINAPI GetDC(_In_opt_ HWND)
#define SB_LINEDOWN
Definition: winuser.h:565
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define SB_TOP
Definition: winuser.h:578
#define MB_ICONQUESTION
Definition: winuser.h:789
#define SIF_POS
Definition: winuser.h:1234
#define DWLP_MSGRESULT
Definition: winuser.h:870
#define SW_ERASE
Definition: winuser.h:2580
#define LR_DEFAULTCOLOR
Definition: winuser.h:1087
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define WM_DESTROY
Definition: winuser.h:1609
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SWP_NOZORDER
Definition: winuser.h:1247
#define SetWindowLongPtrW
Definition: winuser.h:5346
#define GWL_STYLE
Definition: winuser.h:852
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
#define SB_PAGEUP
Definition: winuser.h:568
#define BST_CHECKED
Definition: winuser.h:197
#define SB_HORZ
Definition: winuser.h:552
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define COLOR_3DFACE
Definition: winuser.h:929
#define SB_THUMBPOSITION
Definition: winuser.h:572
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185