ReactOS 0.4.15-dev-7788-g1ad9096
appview.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Application view class and other classes used by it
5 * COPYRIGHT: Copyright 2020 He Yang (1160386205@qq.com)
6 * Copyright 2022,2023 Mark Jansen <mark.jansen@reactos.org>
7 */
8
9#include "rapps.h"
10#include "appview.h"
11#include "gui.h"
12#include <windowsx.h>
13
14using namespace Gdiplus;
15
16// **** CMainToolbar ****
17
18VOID
20{
21 HICON hImage;
22
23 if (!(hImage =
25 {
26 return;
27 }
28
29 ImageList_AddIcon(hImageList, hImage);
30 DeleteObject(hImage);
31}
32
35{
36 HIMAGELIST hImageList;
37
38 /* Create the toolbar icon image list */
40 if (!hImageList)
41 {
42 return NULL;
43 }
44
52 AddImageToImageList(hImageList, IDI_EXIT);
53
54 return hImageList;
55}
56
57CMainToolbar::CMainToolbar() : m_iToolbarHeight(24), m_dButtonsWidthMax(0)
58{
59}
60
61VOID
63{
64 UINT idButton = (UINT)lpttt->hdr.idFrom;
65
66 switch (idButton)
67 {
68 case ID_EXIT:
69 lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_EXIT);
70 break;
71
72 case ID_INSTALL:
73 lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_INSTALL);
74 break;
75
76 case ID_UNINSTALL:
77 lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UNINSTALL);
78 break;
79
80 case ID_MODIFY:
81 lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_MODIFY);
82 break;
83
84 case ID_SETTINGS:
85 lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_SETTINGS);
86 break;
87
88 case ID_REFRESH:
89 lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_REFRESH);
90 break;
91
92 case ID_RESETDB:
93 lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UPDATE_DB);
94 break;
95 }
96}
97
98HWND
100{
101 CStringW szInstallBtn;
102 CStringW szUninstallBtn;
103 CStringW szModifyBtn;
104 CStringW szSelectAllBtn;
105 CStringW szRefreshBtn;
106 CStringW szUpdateDbBtn;
107
108 /* Load tooltip strings */
109 szInstallBtn.LoadStringW(IDS_TOOLTIP_INSTALL);
110 szUninstallBtn.LoadStringW(IDS_TOOLTIP_UNINSTALL);
111 szModifyBtn.LoadStringW(IDS_TOOLTIP_MODIFY);
112 szSelectAllBtn.LoadStringW(IDS_TOOLTIP_SELECT_ALL);
113 szRefreshBtn.LoadStringW(IDS_TOOLTIP_REFRESH);
114 szUpdateDbBtn.LoadStringW(IDS_TOOLTIP_UPDATE_DB);
115
116 /* Create buttons */
117 TBBUTTON Buttons[] = {
118 /* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */
119 {0, ID_INSTALL, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, (INT_PTR)szInstallBtn.GetString()},
120 {1, ID_UNINSTALL, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, (INT_PTR)szUninstallBtn.GetString()},
121 {2, ID_MODIFY, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, (INT_PTR)szModifyBtn.GetString()},
122 {3, ID_CHECK_ALL, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, (INT_PTR)szSelectAllBtn.GetString()},
123 {-1, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
124 {4, ID_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, (INT_PTR)szRefreshBtn.GetString()},
125 {5, ID_RESETDB, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, {0}, 0, (INT_PTR)szUpdateDbBtn.GetString()}};
126
127 m_hWnd = CreateWindowExW(
129 hwndParent, 0, hInst, NULL);
130
131 if (!m_hWnd)
132 {
133 return FALSE;
134 }
135
138
139 /* Set image list */
140 HIMAGELIST hImageList = InitImageList();
141
142 if (hImageList)
143 {
144 ImageList_Destroy(SetImageList(hImageList));
145 }
146
148
149 /* Remember ideal width to use as a max width of buttons */
150 SIZE size;
153
154 return m_hWnd;
155}
156
157VOID
159{
160 DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
162}
163
164VOID
166{
167 DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
169}
170
171DWORD
173{
174 return m_dButtonsWidthMax;
175}
176// **** CMainToolbar ****
177
178// **** CSearchBar ****
179
180CSearchBar::CSearchBar() : m_Width(180), m_Height(22)
181{
182}
183
184VOID
186{
188}
189
190HWND
192{
193 CStringW szBuf;
196 hwndParent, (HMENU)NULL, hInst, 0);
197
199 szBuf.LoadStringW(IDS_SEARCH_TEXT);
200 SetWindowTextW(szBuf);
201 return m_hWnd;
202}
203// **** CSearchBar ****
204
205// **** CComboBox ****
206
207CComboBox::CComboBox() : m_Width(80), m_Height(22)
208{
209}
210
211HWND
213{
217
219
220 for (int i = 0; i < (int)_countof(m_TypeStringID); i++)
221 {
222 CStringW szBuf;
223 szBuf.LoadStringW(m_TypeStringID[i]);
225 }
226
227 SendMessageW(CB_SETCURSEL, m_DefaultSelectType, 0); // select the first item
228
229 return m_hWnd;
230}
231// **** CComboBox ****
232
233// **** CAppRichEdit ****
234
235VOID
236CAppRichEdit::LoadAndInsertText(UINT uStringID, const CStringW &szText, DWORD TextFlags)
237{
238 CStringW szLoadedText;
239 if (!szText.IsEmpty() && szLoadedText.LoadStringW(uStringID))
240 {
241 const DWORD StringFlags = CFE_BOLD;
242 InsertText(szLoadedText, StringFlags);
243 InsertText(szText, TextFlags);
244 }
245}
246
247VOID
249{
250 CStringW szLoadedText;
251 if (szLoadedText.LoadStringW(uStringID))
252 {
253 InsertText(L"\n", 0);
254 InsertText(szLoadedText, StringFlags);
255 InsertText(L"\n", 0);
256 }
257}
258
259VOID
261{
262 if (!Text.IsEmpty())
263 {
264 LoadAndInsertText(StringID, Text, TextFlags);
265 }
266}
267
268VOID
270{
271 CStringW szText;
272
273 szText.LoadStringW(IDS_WELCOME_TITLE);
274 SetText(szText, CFE_BOLD);
275
276 szText.LoadStringW(IDS_WELCOME_TEXT);
277 InsertText(szText, 0);
278
279 szText.LoadStringW(IDS_WELCOME_URL);
280 InsertText(szText, CFM_LINK);
281}
282// **** CAppRichEdit ****
283
284int
286{
288 switch (Event)
289 {
290 case ASYNCINET_DATA:
293 break;
298 break;
303 break;
304 case ASYNCINET_ERROR:
307 break;
308 default:
310 break;
311 }
312 return 0;
313}
314
315// **** CAppScrnshotPreview ****
316
317CAppScrnshotPreview::CAppScrnshotPreview(const CStringW &BasePath) : m_BasePath(BasePath)
318{
319}
320
321BOOL
323 HWND hwnd,
324 UINT Msg,
327 LRESULT &theResult,
328 DWORD dwMapId)
329{
330 theResult = 0;
331 switch (Msg)
332 {
333 case WM_CREATE:
336 break;
337 case WM_SIZE:
338 {
340 {
342
343 if (hBrokenImgIcon)
344 {
348 }
349 }
350 break;
351 }
353 {
356 AsyncInet = NULL;
357 switch (wParam)
358 {
359 case ERROR_SUCCESS:
360 if (ContentID == DownloadParam->ID)
361 {
362 DisplayFile(DownloadParam->DownloadFileName);
363 // send a message to trigger resizing
365 InvalidateRect(0, 0);
367 DownloadParam->DownloadFileName; // record tmp file path in order to delete it when cleanup
368 }
369 else
370 {
371 // the picture downloaded is already outdated. delete it.
372 DeleteFileW(DownloadParam->DownloadFileName);
373 }
374 break;
375 case ERROR_CANCELLED:
376 DeleteFileW(DownloadParam->DownloadFileName);
377 break;
378 default:
380 // send a message to trigger resizing
382 InvalidateRect(0, 0);
383 DeleteFileW(DownloadParam->DownloadFileName);
384 break;
385 }
386 delete DownloadParam;
387 break;
388 }
389 case WM_PAINT:
390 {
391 PAINTSTRUCT ps;
392 HDC hdc = BeginPaint(&ps);
393 CRect rect;
395
396 PaintOnDC(hdc, rect.Width(), rect.Height(), ps.fErase);
397
398 EndPaint(&ps);
399 break;
400 }
401 case WM_PRINTCLIENT:
402 {
404 {
405 if (!IsWindowVisible())
406 break;
407 }
408 CRect rect;
410
411 PaintOnDC((HDC)wParam, rect.Width(), rect.Height(), lParam & PRF_ERASEBKGND);
412 break;
413 }
414 case WM_ERASEBKGND:
415 {
416 return TRUE; // do not erase to avoid blinking
417 }
418 case WM_TIMER:
419 {
420 switch (wParam)
421 {
425 HDC hdc = GetDC();
426 CRect rect;
428
429 PaintOnDC(hdc, rect.Width(), rect.Height(), TRUE);
430 ReleaseDC(hdc);
431 }
432 break;
433 }
434 case WM_DESTROY:
435 {
439 break;
440 }
441 }
442 return FALSE;
443}
444
445VOID
447{
449 if (bLoadingTimerOn)
450 {
452 }
456}
457
458VOID
460{
464}
465
466BOOL
468{
471 pImage = Bitmap::FromFile(lpszFileName, 0);
472 if (pImage->GetLastStatus() != Ok)
473 {
475 return FALSE;
476 }
477 return TRUE;
478}
479
480VOID
482{
484}
485
486VOID
488{
489 // use an off screen dc to avoid blinking
493
494 if (bDrawBkgnd)
495 {
496 HBRUSH hOldBrush = (HBRUSH)SelectObject(hdcMem, (HGDIOBJ)GetSysColorBrush(COLOR_BTNFACE));
497 PatBlt(hdcMem, 0, 0, width, height, PATCOPY);
498 SelectObject(hdcMem, hOldBrush);
499 }
500
501 switch (ScrnshotPrevStauts)
502 {
504 {
505 }
506 break;
507
509 {
510 Graphics graphics(hdcMem);
511 Color color(255, 0, 0);
512 SolidBrush dotBrush(Color(255, 100, 100, 100));
513
514 graphics.SetSmoothingMode(SmoothingMode::SmoothingModeAntiAlias);
515
516 // Paint three dot
517 float DotWidth = GetLoadingDotWidth(width, height);
518 graphics.FillEllipse(
519 (Brush *)(&dotBrush), (REAL)width / 2.0 - min(width, height) * 2.0 / 16.0 - DotWidth / 2.0,
520 (REAL)height / 2.0 -
522 DotWidth, DotWidth);
523
524 graphics.FillEllipse(
525 (Brush *)(&dotBrush), (REAL)width / 2.0 - DotWidth / 2.0,
526 (REAL)height / 2.0 - GetFrameDotShift(LoadingAnimationFrame, width, height) - DotWidth / 2.0, DotWidth,
527 DotWidth);
528
529 graphics.FillEllipse(
530 (Brush *)(&dotBrush), (REAL)width / 2.0 + min(width, height) * 2.0 / 16.0 - DotWidth / 2.0,
531 (REAL)height / 2.0 -
533 DotWidth, DotWidth);
534 }
535 break;
536
538 {
539 if (pImage)
540 {
541 // always draw entire image inside the window.
542 Graphics graphics(hdcMem);
543 float ZoomRatio =
544 min(((float)width / (float)pImage->GetWidth()), ((float)height / (float)pImage->GetHeight()));
545 float ZoomedImgWidth = ZoomRatio * (float)pImage->GetWidth();
546 float ZoomedImgHeight = ZoomRatio * (float)pImage->GetHeight();
547
548 graphics.DrawImage(
549 pImage, ((float)width - ZoomedImgWidth) / 2.0, ((float)height - ZoomedImgHeight) / 2.0,
550 ZoomedImgWidth, ZoomedImgHeight);
551 }
552 }
553 break;
554
556 {
560 }
561 break;
562 }
563
564 // copy the content form off-screen dc to hdc
565 BitBlt(hdc, 0, 0, width, height, hdcMem, 0, 0, SRCCOPY);
568}
569
570float
572{
573 return min(width, height) / 20.0;
574}
575
576float
578{
579 return min(width, height) * (1.0 / 16.0) * (2.0 / (2.0 - sqrt(3.0))) *
580 (max(sin((float)Frame * 2 * PI / (LOADING_ANIMATION_PERIOD * LOADING_ANIMATION_FPS)), sqrt(3.0) / 2.0) -
581 sqrt(3.0) / 2.0);
582}
583
586{
587 DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
588 static ATL::CWndClassInfo wc = {
589 {sizeof(WNDCLASSEX), csStyle, StartWindowProc, 0, 0, NULL, 0, LoadCursorW(NULL, IDC_ARROW),
590 (HBRUSH)(COLOR_BTNFACE + 1), 0, L"RAppsScrnshotPreview", NULL},
591 NULL,
592 NULL,
593 IDC_ARROW,
594 TRUE,
595 0,
596 _T("")};
597 return wc;
598}
599
600HWND
602{
603 RECT r = {0, 0, 0, 0};
604
605 return CWindowImpl::Create(hParent, r, L"", WS_CHILD | WS_VISIBLE);
606}
607
608VOID
610{
611 if (bLoadingTimerOn)
612 {
615 }
617 if (pImage)
618 {
619 delete pImage;
620 pImage = NULL;
621 }
622 if (AsyncInet)
623 {
625 }
626 if (!TempImagePath.IsEmpty())
627 {
630 }
631}
632
633VOID
635{
639}
640
641BOOL
643{
646
647 if (PathIsURLW(lpszLocation))
648 {
650
652 if (!DownloadParam)
653 return FALSE;
654
655 DownloadParam->hwndNotify = m_hWnd;
656 DownloadParam->ID = ID;
657 // generate a filename
658 CStringW ScrnshotFolder = m_BasePath;
659 PathAppendW(ScrnshotFolder.GetBuffer(MAX_PATH), L"screenshots");
660 ScrnshotFolder.ReleaseBuffer();
661
662 if (!PathIsDirectoryW(ScrnshotFolder.GetString()))
663 {
664 CreateDirectoryW(ScrnshotFolder.GetString(), NULL);
665 }
666
667 if (!GetTempFileNameW(
668 ScrnshotFolder.GetString(), L"img", 0, DownloadParam->DownloadFileName.GetBuffer(MAX_PATH)))
669 {
670 DownloadParam->DownloadFileName.ReleaseBuffer();
671 delete DownloadParam;
673 return FALSE;
674 }
675 DownloadParam->DownloadFileName.ReleaseBuffer();
676
677 DownloadParam->hFile = CreateFileW(
678 DownloadParam->DownloadFileName.GetString(), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,
679 NULL);
681 {
682 delete DownloadParam;
684 return FALSE;
685 }
686
689 if (!AsyncInet)
690 {
692 DeleteFileW(DownloadParam->DownloadFileName.GetBuffer());
693 delete DownloadParam;
695 return FALSE;
696 }
697 return TRUE;
698 }
699 else
700 {
701 return DisplayFile(lpszLocation);
702 }
703}
704
705int
706CAppScrnshotPreview::GetRequestedWidth(int Height) // calculate requested window width by given height
707{
708 switch (ScrnshotPrevStauts)
709 {
711 return 0;
713 return 200;
715 if (pImage)
716 {
717 // return the width needed to display image inside the window.
718 // and always keep window w/h ratio inside [ 1/SCRNSHOT_MAX_ASPECT_RAT, SCRNSHOT_MAX_ASPECT_RAT ]
719 return (int)floor(
720 (float)Height *
721 max(min((float)pImage->GetWidth() / (float)pImage->GetHeight(), (float)SCRNSHOT_MAX_ASPECT_RAT),
722 1.0 / (float)SCRNSHOT_MAX_ASPECT_RAT));
723 }
724 return 0;
726 return 200;
727 default:
728 return 0;
729 }
730}
731
733{
735}
736// **** CAppScrnshotPreview ****
737
738// **** CAppInfoDisplay ****
739
740BOOL
742 HWND hwnd,
746 LRESULT &theResult,
747 DWORD dwMapId)
748{
749 theResult = 0;
750 switch (message)
751 {
752 case WM_CREATE:
753 {
754 RichEdit = new CAppRichEdit();
756
761 break;
762 }
763 case WM_SIZE:
764 {
766 break;
767 }
769 {
771 break;
772 }
773 case WM_COMMAND:
774 {
776 break;
777 }
778 case WM_NOTIFY:
779 {
780 NMHDR *NotifyHeader = (NMHDR *)lParam;
781 if (NotifyHeader->hwndFrom == RichEdit->m_hWnd)
782 {
783 switch (NotifyHeader->code)
784 {
785 case EN_LINK:
786 OnLink((ENLINK *)lParam);
787 break;
788 }
789 }
790 break;
791 }
792 }
793
794 return FALSE;
795}
796
797VOID
799{
800 CRect rect;
802 ResizeChildren(rect.Width(), rect.Height());
803}
804
805VOID
807{
808 int ScrnshotWidth = ScrnshotPrev->GetRequestedWidth(Height);
809
810 // make sure richedit always have room to display
811 ScrnshotWidth = min(ScrnshotWidth, Width - INFO_DISPLAY_PADDING - RICHEDIT_MIN_WIDTH);
812
813 DWORD dwError = ERROR_SUCCESS;
814 HDWP hDwp = BeginDeferWindowPos(2);
815
816 if (hDwp)
817 {
818 hDwp = ::DeferWindowPos(hDwp, ScrnshotPrev->m_hWnd, NULL, 0, 0, ScrnshotWidth, Height, 0);
819
820 if (hDwp)
821 {
822 // hide the padding if scrnshot window width == 0
823 int RicheditPosX = ScrnshotWidth ? (ScrnshotWidth + INFO_DISPLAY_PADDING) : 0;
824
825 hDwp = ::DeferWindowPos(hDwp, RichEdit->m_hWnd, NULL, RicheditPosX, 0, Width - RicheditPosX, Height, 0);
826
827 if (hDwp)
828 {
829 EndDeferWindowPos(hDwp);
830 }
831 else
832 {
833 dwError = GetLastError();
834 }
835 }
836 else
837 {
838 dwError = GetLastError();
839 }
840 }
841 else
842 {
843 dwError = GetLastError();
844 }
845
846#if DBG
847 ATLASSERT(dwError == ERROR_SUCCESS);
848#endif
849 UNREFERENCED_PARAMETER(dwError);
850
851 UpdateWindow();
852}
853
854VOID
856{
857 switch (Link->msg)
858 {
859 case WM_LBUTTONUP:
860 case WM_RBUTTONUP:
861 {
862 if (pLink)
864
866 GetProcessHeap(), 0,
867 (max(Link->chrg.cpMin, Link->chrg.cpMax) - min(Link->chrg.cpMin, Link->chrg.cpMax) + 1) *
868 sizeof(WCHAR));
869 if (!pLink)
870 {
871 /* TODO: Error message */
872 return;
873 }
874
875 RichEdit->SendMessageW(EM_SETSEL, Link->chrg.cpMin, Link->chrg.cpMax);
876 RichEdit->SendMessageW(EM_GETSELTEXT, 0, (LPARAM)pLink);
877
878 ShowPopupMenuEx(m_hWnd, m_hWnd, IDR_LINKMENU, -1);
879 }
880 break;
881 }
882}
883
886{
887 DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
888 static ATL::CWndClassInfo wc = {/*.m_wc=*/
889 {/*cbSize=*/sizeof(WNDCLASSEX),
890 /*style=*/csStyle,
891 /*lpfnWndProc=*/StartWindowProc,
892 /*cbClsExtra=*/0,
893 /*cbWndExtra=*/0,
894 /*hInstance=*/NULL,
895 /*hIcon=*/NULL,
896 /*hCursor*/ NULL,
897 /*hbrBackground=*/(HBRUSH)(COLOR_BTNFACE + 1),
898 /*lpszMenuName=*/NULL,
899 /*lpszClassName=*/L"RAppsAppInfo",
900 /*hIconSm=*/NULL},
901 /*m_lpszOrigName=*/NULL,
902 /*pWndProc=*/NULL,
903 /*m_lpszCursorID=*/IDC_ARROW,
904 /*m_bSystemCursor*/ TRUE,
905 /*m_atom=*/0,
906 /*m_szAutoName=*/_T("")};
907 return wc;
908}
909
910HWND
912{
913 RECT r = {0, 0, 0, 0};
914
916}
917
918VOID
920{
921 CStringW ScrnshotLocation;
922 if (Info->RetrieveScreenshot(ScrnshotLocation))
923 {
924 ScrnshotPrev->DisplayImage(ScrnshotLocation);
925 }
926 else
927 {
929 }
931 Info->ShowAppInfo(RichEdit);
932}
933
934VOID
936{
940}
941
942VOID
944{
945 WORD wCommand = LOWORD(wParam);
946
947 switch (wCommand)
948 {
949 case ID_OPEN_LINK:
950
951 ShellExecuteW(m_hWnd, L"open", pLink, NULL, NULL, SW_SHOWNOACTIVATE);
953 pLink = NULL;
954 break;
955
956 case ID_COPY_LINK:
959 pLink = NULL;
960 break;
961 }
962}
963
965{
966 delete RichEdit;
967 delete ScrnshotPrev;
968}
969// **** CAppInfoDisplay ****
970
971// **** CAppsListView ****
972
974{
975}
976
978{
980 {
982 }
983}
984
987{
988 LRESULT lRes = this->DefWindowProc(uMsg, wParam, lParam);
989 if (!m_Watermark.IsEmpty())
990 {
991 RECT rc;
992 GetClientRect(&rc);
998 SelectFont(HDC(wParam), oldFont);
999 }
1000 return lRes;
1001}
1002
1003VOID
1005{
1006 m_Watermark = Text;
1007}
1008
1009VOID
1011{
1012 if (bIsVisible)
1013 {
1014 SetExtendedListViewStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
1015 }
1016 else
1017 {
1018 SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
1019 }
1020
1021 bHasCheckboxes = bIsVisible;
1022}
1023
1024VOID
1026{
1027 HWND hHeader;
1028 HDITEMW hColumn;
1029 INT nHeaderID = pnmv->iSubItem;
1030
1032 return;
1033
1034 hHeader = (HWND)SendMessage(LVM_GETHEADER, 0, 0);
1035 ZeroMemory(&hColumn, sizeof(hColumn));
1036
1037 /* If the sorting column changed, remove the sorting style from the old column */
1038 if ((nLastHeaderID != -1) && (nLastHeaderID != nHeaderID))
1039 {
1040 bIsAscending = TRUE; // also reset sorting method to ascending
1041 hColumn.mask = HDI_FORMAT;
1042 Header_GetItem(hHeader, nLastHeaderID, &hColumn);
1043 hColumn.fmt &= ~(HDF_SORTUP | HDF_SORTDOWN);
1044 Header_SetItem(hHeader, nLastHeaderID, &hColumn);
1045 }
1046
1047 /* Set the sorting style to the new column */
1048 hColumn.mask = HDI_FORMAT;
1049 Header_GetItem(hHeader, nHeaderID, &hColumn);
1050
1051 hColumn.fmt &= ~(HDF_SORTDOWN | HDF_SORTUP);
1052 hColumn.fmt |= (bIsAscending ? HDF_SORTUP : HDF_SORTDOWN);
1053 Header_SetItem(hHeader, nHeaderID, &hColumn);
1054
1055 /* Sort the list, using the current values of nHeaderID and bIsAscending */
1056 SortContext ctx = {this, nHeaderID};
1057 SortItems(s_CompareFunc, &ctx);
1058
1059 /* Save new values */
1060 nLastHeaderID = nHeaderID;
1062}
1063
1064BOOL
1066{
1067 LVCOLUMNW Column;
1068
1069 ZeroMemory(&Column, sizeof(Column));
1070
1072 Column.iSubItem = Index;
1073 Column.pszText = const_cast<LPWSTR>(Text.GetString());
1074 Column.cx = Width;
1075 Column.fmt = Format;
1076
1077 return SendMessage(LVM_INSERTCOLUMN, Index, (LPARAM)(&Column));
1078}
1079
1080void
1082{
1084 return;
1085}
1086
1087INT
1089{
1090 LVITEMW Item;
1091
1092 ZeroMemory(&Item, sizeof(Item));
1093
1095 Item.pszText = const_cast<LPWSTR>(lpText);
1096 Item.lParam = lParam;
1097 Item.iItem = ItemIndex;
1098 Item.iImage = IconIndex;
1099
1100 if (IconIndex >= 0)
1101 {
1102 Item.iImage = IconIndex;
1103 Item.mask |= LVIF_IMAGE;
1104 }
1105 return InsertItem(&Item);
1106}
1107
1110{
1111 return (HIMAGELIST)SendMessage(LVM_GETIMAGELIST, iImageList, 0);
1112}
1113
1116{
1117 SortContext *ctx = ((SortContext *)lParamSort);
1118 return ctx->lvw->CompareFunc(lParam1, lParam2, ctx->iSubItem);
1119}
1120
1121INT
1122CAppsListView::CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
1123{
1124 CStringW Item1, Item2;
1125 LVFINDINFOW IndexInfo;
1126 INT Index;
1127
1128 IndexInfo.flags = LVFI_PARAM;
1129
1130 IndexInfo.lParam = lParam1;
1131 Index = FindItem(-1, &IndexInfo);
1132 GetItemText(Index, iSubItem, Item1.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
1133 Item1.ReleaseBuffer();
1134
1135 IndexInfo.lParam = lParam2;
1136 Index = FindItem(-1, &IndexInfo);
1137 GetItemText(Index, iSubItem, Item2.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
1138 Item2.ReleaseBuffer();
1139
1140 return bIsAscending ? Item1.Compare(Item2) : Item2.Compare(Item1);
1141}
1142
1143HWND
1145{
1146 RECT r = {205, 28, 465, 250};
1149
1151
1152 if (hwnd)
1153 {
1155 }
1156
1158
1161
1162#pragma push_macro("SubclassWindow")
1163#undef SubclassWindow
1164 m_hWnd = NULL;
1166#pragma pop_macro("SubclassWindow")
1167
1168 return hwnd;
1169}
1170
1171BOOL
1173{
1174 return (BOOL)(GetItemState(item, LVIS_STATEIMAGEMASK) >> 12) - 1;
1175}
1176
1177VOID
1179{
1180 if (bHasCheckboxes)
1181 {
1182 SetItemState(item, INDEXTOSTATEIMAGEMASK((fCheck) ? 2 : 1), LVIS_STATEIMAGEMASK);
1183 }
1184}
1185
1186VOID
1188{
1189 if (bHasCheckboxes)
1190 {
1192 {
1193 // clear all
1194 SetCheckState(-1, FALSE);
1195 }
1196 else
1197 {
1198 // check all
1199 SetCheckState(-1, TRUE);
1200 }
1201 }
1202}
1203
1204PVOID
1206{
1207 INT item = GetSelectionMark();
1208 if (item == -1)
1209 {
1210 return (PVOID)0;
1211 }
1212 return (PVOID)GetItemData(item);
1213}
1214
1215BOOL
1217{
1218 if (!DeleteAllItems())
1219 return FALSE;
1220 ApplicationViewType = AppType;
1221
1223
1224 ItemCount = 0;
1225 CheckedItemCount = 0;
1226
1227 // delete old columns
1228 while (ColumnCount)
1229 {
1231 }
1232
1234
1235 // add new columns
1236 CStringW szText;
1237 switch (AppType)
1238 {
1240
1241 /* Add columns to ListView */
1242 szText.LoadStringW(IDS_APP_NAME);
1243 AddColumn(ColumnCount++, szText, 250, LVCFMT_LEFT);
1244
1245 szText.LoadStringW(IDS_APP_INST_VERSION);
1246 AddColumn(ColumnCount++, szText, 90, LVCFMT_RIGHT);
1247
1248 szText.LoadStringW(IDS_APP_DESCRIPTION);
1249 AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
1250
1251 // disable checkboxes
1253 break;
1254
1256
1257 /* Add columns to ListView */
1258 szText.LoadStringW(IDS_APP_NAME);
1259 AddColumn(ColumnCount++, szText, 250, LVCFMT_LEFT);
1260
1261 szText.LoadStringW(IDS_APP_INST_VERSION);
1262 AddColumn(ColumnCount++, szText, 90, LVCFMT_RIGHT);
1263
1264 szText.LoadStringW(IDS_APP_DESCRIPTION);
1265 AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
1266
1267 // enable checkboxes
1269 break;
1270
1271 default:
1272 break;
1273 }
1274
1275 return TRUE;
1276}
1277
1278BOOL
1280{
1281 return SendMessage(LVM_SETVIEW, (WPARAM)ViewMode, 0) == 1;
1282}
1283
1284BOOL
1285CAppsListView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState)
1286{
1288 {
1289 /* Load icon from registry */
1290 HICON hIcon = NULL;
1291 CStringW szIconPath;
1292 int IconIndex;
1293 if (AppInfo->RetrieveIcon(szIconPath))
1294 {
1296 szIconPath.ReleaseBuffer();
1297
1298 ExtractIconExW(szIconPath.GetString(), IconIndex, &hIcon, NULL, 1);
1299 }
1300
1301 /* Use the default icon if none were found in the file, or if it is not supported (returned 1) */
1302 if (!hIcon || (hIcon == (HICON)1))
1303 {
1304 /* Load default icon */
1306 }
1307
1310
1311 int Index = AddItem(ItemCount, IconIndex, AppInfo->szDisplayName, (LPARAM)AppInfo);
1312 SetItemText(Index, 1, AppInfo->szDisplayVersion.IsEmpty() ? L"---" : AppInfo->szDisplayVersion);
1313 SetItemText(Index, 2, AppInfo->szComments.IsEmpty() ? L"---" : AppInfo->szComments);
1314
1315 ItemCount++;
1316 return TRUE;
1317 }
1319 {
1320 /* Load icon from file */
1321 HICON hIcon = NULL;
1322 CStringW szIconPath;
1323 if (AppInfo->RetrieveIcon(szIconPath))
1324 {
1327 }
1328
1329 if (!hIcon)
1330 {
1331 /* Load default icon */
1333 }
1334
1337
1338 int Index = AddItem(ItemCount, IconIndex, AppInfo->szDisplayName, (LPARAM)AppInfo);
1339
1340 if (InitialCheckState)
1341 {
1343 }
1344
1345 SetItemText(Index, 1, AppInfo->szDisplayVersion);
1346 SetItemText(Index, 2, AppInfo->szComments);
1347
1348 ItemCount++;
1349 return TRUE;
1350 }
1351 else
1352 {
1353 return FALSE;
1354 }
1355}
1356
1357// this function is called when parent window receiving an notification about checkstate changing
1358VOID
1360{
1361 if (bCheck)
1362 {
1364 }
1365 else
1366 {
1368 }
1369}
1370// **** CAppsListView ****
1371
1372// **** CApplicationView ****
1373
1374BOOL
1376 HWND hwnd,
1377 UINT message,
1378 WPARAM wParam,
1379 LPARAM lParam,
1380 LRESULT &theResult,
1381 DWORD dwMapId)
1382{
1383 theResult = 0;
1384 switch (message)
1385 {
1386 case WM_CREATE:
1387 {
1388 BOOL bSuccess = TRUE;
1389 m_Panel = new CUiPanel();
1392
1399
1401
1402 RECT rTop;
1403
1404 ::GetWindowRect(m_Toolbar->m_hWnd, &rTop);
1405 m_HSplitter->m_Margin.top = rTop.bottom - rTop.top;
1406 if (!bSuccess)
1407 {
1408 return -1; // creation failure
1409 }
1410 }
1411 break;
1412
1413 case WM_NOTIFY:
1414 {
1415 LPNMHDR pNotifyHeader = (LPNMHDR)lParam;
1416 if (pNotifyHeader->hwndFrom == m_ListView->GetWindow())
1417 {
1418 switch (pNotifyHeader->code)
1419 {
1420 case LVN_ITEMCHANGED:
1421 {
1423
1424 /* Check if this is a valid item
1425 * (technically, it can be also an unselect) */
1426 INT ItemIndex = pnic->iItem;
1427 if (ItemIndex == -1 || ItemIndex >= ListView_GetItemCount(pnic->hdr.hwndFrom))
1428 {
1429 break;
1430 }
1431
1432 /* Check if the focus has been moved to another item */
1433 if ((pnic->uChanged & LVIF_STATE) && (pnic->uNewState & LVIS_FOCUSED) &&
1434 !(pnic->uOldState & LVIS_FOCUSED))
1435 {
1436 ItemGetFocus((LPVOID)pnic->lParam);
1437 }
1438
1439 /* Check if the item is checked/unchecked */
1440 if (pnic->uChanged & LVIF_STATE)
1441 {
1442 int iOldState = STATEIMAGETOINDEX(pnic->uOldState);
1443 int iNewState = STATEIMAGETOINDEX(pnic->uNewState);
1444
1445 if (iOldState == STATEIMAGE_UNCHECKED && iNewState == STATEIMAGE_CHECKED)
1446 {
1447 // this item is just checked
1450 }
1451 else if (iOldState == STATEIMAGE_CHECKED && iNewState == STATEIMAGE_UNCHECKED)
1452 {
1453 // this item is just unchecked
1456 }
1457 }
1458 }
1459 break;
1460
1461 case LVN_COLUMNCLICK:
1462 {
1464
1465 m_ListView->ColumnClick(pnmv);
1466 }
1467 break;
1468
1469 case NM_DBLCLK:
1470 {
1472 if (Item->iItem != -1)
1473 {
1474 /* this won't do anything if the program is already installed */
1475
1477 {
1479 (CAppInfo *)m_ListView->GetItemData(Item->iItem));
1480 }
1481 }
1482 }
1483 break;
1484
1485 case NM_RCLICK:
1486 {
1487 if (((LPNMLISTVIEW)lParam)->iItem != -1)
1488 {
1489 ShowPopupMenuEx(m_hWnd, m_hWnd, 0, ID_INSTALL);
1490 }
1491 }
1492 break;
1493 }
1494 }
1495 else if (pNotifyHeader->hwndFrom == m_Toolbar->GetWindow())
1496 {
1497 switch (pNotifyHeader->code)
1498 {
1499 case TTN_GETDISPINFO:
1501 break;
1502 }
1503 }
1504 }
1505 break;
1506
1507 case WM_SYSCOLORCHANGE:
1508 {
1509 /* Forward WM_SYSCOLORCHANGE to common controls */
1510 m_ListView->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1512 m_Toolbar->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1513 m_ComboBox->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1514 }
1515 break;
1516
1517 case WM_SIZE:
1518 {
1520 break;
1521 }
1522
1523 case WM_COMMAND:
1524 {
1526 }
1527 break;
1528 }
1529 return FALSE;
1530}
1531
1532BOOL
1534{
1535 m_Toolbar = new CMainToolbar();
1539
1540 return m_Toolbar->Create(m_hWnd) != NULL;
1541}
1542
1543BOOL
1545{
1551
1552 return m_SearchBar->Create(m_Toolbar->m_hWnd) != NULL;
1553}
1554
1555BOOL
1557{
1561 m_ComboBox->m_Margin.top = 4;
1562
1563 return m_ComboBox->Create(m_Toolbar->m_hWnd) != NULL;
1564}
1565
1566BOOL
1568{
1569 m_HSplitter = new CUiSplitPanel();
1574 m_HSplitter->m_Pos = INT_MAX; // set INT_MAX to use lowest possible position (m_MinSecond)
1575 m_HSplitter->m_MinFirst = 10;
1576 m_HSplitter->m_MinSecond = 140;
1578
1579 return m_HSplitter->Create(m_hWnd) != NULL;
1580}
1581
1582BOOL
1584{
1585 m_ListView = new CAppsListView();
1589
1590 return m_ListView->Create(m_hWnd) != NULL;
1591}
1592
1593BOOL
1595{
1600
1601 return m_AppsInfo->Create(m_hWnd) != NULL;
1602}
1603
1604void
1606{
1607 CWindow::SetRedraw(bRedraw);
1608 m_ListView->SetRedraw(bRedraw);
1609}
1610
1611void
1613{
1615}
1616
1617VOID
1619{
1620 if (wParam == SIZE_MINIMIZED)
1621 return;
1622
1623 /* Size tool bar */
1625
1626 /* Automatically hide captions */
1627 DWORD dToolbarTreshold = m_Toolbar->GetMaxButtonsWidth();
1628 DWORD dSearchbarMargin = (LOWORD(lParam) - m_SearchBar->m_Width - m_ComboBox->m_Width - TOOLBAR_PADDING * 2);
1629
1630 if (dSearchbarMargin > dToolbarTreshold)
1631 {
1633 }
1634 else if (dSearchbarMargin < dToolbarTreshold)
1635 {
1637 }
1638
1639 RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
1640 HDWP hdwp = NULL;
1642
1643 hdwp = BeginDeferWindowPos(count);
1644 if (hdwp)
1645 {
1646 hdwp = m_Panel->OnParentSize(r, hdwp);
1647 if (hdwp)
1648 {
1649 EndDeferWindowPos(hdwp);
1650 }
1651 }
1652
1654 hdwp = BeginDeferWindowPos(count);
1655 if (hdwp)
1656 {
1657 hdwp = m_SearchBar->OnParentSize(r, hdwp);
1658 if (hdwp)
1659 {
1660 EndDeferWindowPos(hdwp);
1661 }
1662 }
1663
1666 hdwp = BeginDeferWindowPos(count);
1667 if (hdwp)
1668 {
1669 hdwp = m_ComboBox->OnParentSize(r, hdwp);
1670 if (hdwp)
1671 {
1672 EndDeferWindowPos(hdwp);
1673 }
1674 }
1675}
1676
1677VOID
1679{
1680 if (lParam)
1681 {
1682 if ((HWND)lParam == m_SearchBar->GetWindow())
1683 {
1684 CStringW szBuf;
1685 switch (HIWORD(wParam))
1686 {
1687 case EN_SETFOCUS:
1688 {
1689 CStringW szWndText;
1690
1691 szBuf.LoadStringW(IDS_SEARCH_TEXT);
1692 m_SearchBar->GetWindowTextW(szWndText);
1693 if (szBuf == szWndText)
1694 {
1695 m_SearchBar->SetWindowTextW(L"");
1696 }
1697 }
1698 break;
1699
1700 case EN_KILLFOCUS:
1701 {
1703 if (szBuf.IsEmpty())
1704 {
1705 szBuf.LoadStringW(IDS_SEARCH_TEXT);
1706 m_SearchBar->SetWindowTextW(szBuf.GetString());
1707 }
1708 }
1709 break;
1710
1711 case EN_CHANGE:
1712 {
1713 CStringW szWndText;
1714
1715 szBuf.LoadStringW(IDS_SEARCH_TEXT);
1716 m_SearchBar->GetWindowTextW(szWndText);
1717 if (szBuf == szWndText)
1718 {
1719 szWndText = L"";
1720 m_MainWindow->SearchTextChanged(szWndText);
1721 }
1722 else
1723 {
1724 m_MainWindow->SearchTextChanged(szWndText);
1725 }
1726 }
1727 break;
1728 }
1729
1730 return;
1731 }
1732 else if ((HWND)lParam == m_ComboBox->GetWindow())
1733 {
1734 int NotifyCode = HIWORD(wParam);
1735 switch (NotifyCode)
1736 {
1737 case CBN_SELCHANGE:
1738 int CurrSelection = m_ComboBox->SendMessageW(CB_GETCURSEL);
1739
1740 int ViewModeList[] = {LV_VIEW_DETAILS, LV_VIEW_LIST, LV_VIEW_TILE};
1741 ATLASSERT(CurrSelection < (int)_countof(ViewModeList));
1742 if (!m_ListView->SetViewMode(ViewModeList[CurrSelection]))
1743 {
1744 MessageBoxW(L"View mode invalid or unimplemented");
1745 }
1746 break;
1747 }
1748
1749 return;
1750 }
1751 else if ((HWND)lParam == m_Toolbar->GetWindow())
1752 {
1753 // the message is sent from Toolbar. fall down to continue process
1754 }
1755 else
1756 {
1757 return;
1758 }
1759 }
1760
1761 // the LOWORD of wParam contains a Menu or Control ID
1762 WORD wCommand = LOWORD(wParam);
1763
1764 switch (wCommand)
1765 {
1766 case ID_INSTALL:
1767 case ID_UNINSTALL:
1768 case ID_MODIFY:
1769 case ID_REGREMOVE:
1770 case ID_REFRESH:
1771 case ID_RESETDB:
1772 case ID_CHECK_ALL:
1773 m_MainWindow->SendMessageW(WM_COMMAND, wCommand, 0);
1774 break;
1775 }
1776}
1777
1778CApplicationView::CApplicationView(CMainWindow *MainWindow) : m_MainWindow(MainWindow)
1779{
1780}
1781
1783{
1784 delete m_Toolbar;
1785 delete m_SearchBar;
1786 delete m_ListView;
1787 delete m_AppsInfo;
1788 delete m_HSplitter;
1789}
1790
1793{
1794 DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
1795 static ATL::CWndClassInfo wc = {
1796 {sizeof(WNDCLASSEX), csStyle, StartWindowProc, 0, 0, NULL, NULL, NULL, (HBRUSH)(COLOR_BTNFACE + 1), NULL,
1797 L"RAppsApplicationView", NULL},
1798 NULL,
1799 NULL,
1800 IDC_ARROW,
1801 TRUE,
1802 0,
1803 _T("")};
1804 return wc;
1805}
1806
1807HWND
1809{
1810 RECT r = {0, 0, 0, 0};
1811
1813
1815}
1816
1817BOOL
1819{
1820 if (!m_ListView->SetDisplayAppType(AppType))
1821 {
1822 return FALSE;
1823 }
1824 ApplicationViewType = AppType;
1826
1827 HMENU hMenu = ::GetMenu(m_hWnd);
1828 switch (AppType)
1829 {
1835
1836 m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE);
1837 m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
1838 m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE);
1839 break;
1840
1846
1847 m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, TRUE);
1849 m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, FALSE);
1850 break;
1851 }
1852 return TRUE;
1853}
1854
1855BOOL
1857{
1858 return m_ListView->AddApplication(AppInfo, InitialCheckState);
1859}
1860
1861VOID
1863{
1865}
1866
1867void
1869{
1871}
1872
1873PVOID
1875{
1877}
1878
1879int
1881{
1882 return m_ListView->GetItemCount();
1883}
1884
1885VOID
1887{
1893}
1894
1895// this function is called when a item of listview get focus.
1896// CallbackParam is the param passed to listview when adding the item (the one getting focus now).
1897VOID
1899{
1900 if (CallbackParam)
1901 {
1902 CAppInfo *Info = static_cast<CAppInfo *>(CallbackParam);
1904
1906 {
1907 HMENU hMenu = ::GetMenu(m_hWnd);
1908
1909 BOOL CanModify = Info->CanModify();
1910
1911 EnableMenuItem(hMenu, ID_MODIFY, CanModify ? MF_ENABLED : MF_GRAYED);
1912 m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, CanModify);
1913 }
1914 }
1915}
1916
1917// this function is called when a item of listview is checked/unchecked
1918// CallbackParam is the param passed to listview when adding the item (the one getting changed now).
1919VOID
1921{
1922 m_MainWindow->ItemCheckStateChanged(bChecked, CallbackParam);
1923}
1924// **** CApplicationView ****
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
Arabic default style
Definition: afstyles.h:94
int ScrnshotDownloadCallback(pASYNCINET AsyncInet, ASYNC_EVENT Event, WPARAM wParam, LPARAM lParam, VOID *Extension)
Definition: appview.cpp:285
#define WM_RAPPS_DOWNLOAD_COMPLETE
Definition: appview.h:40
int ScrnshotDownloadCallback(pASYNCINET AsyncInet, ASYNC_EVENT Event, WPARAM wParam, LPARAM lParam, VOID *Extension)
Definition: appview.cpp:285
#define BROKENIMG_ICON_SIZE
Definition: appview.h:25
#define STATEIMAGETOINDEX(x)
Definition: appview.h:60
#define WM_RAPPS_RESIZE_CHILDREN
Definition: appview.h:42
#define STATEIMAGE_UNCHECKED
Definition: appview.h:64
#define TOOLBAR_PADDING
Definition: appview.h:37
#define PI
Definition: appview.h:57
#define SCRNSHOT_MAX_ASPECT_RAT
Definition: appview.h:28
#define LOADING_ANIMATION_PERIOD
Definition: appview.h:54
#define STATEIMAGE_CHECKED
Definition: appview.h:65
#define LOADING_ANIMATION_FPS
Definition: appview.h:55
#define RICHEDIT_MIN_WIDTH
Definition: appview.h:34
SCRNSHOT_STATUS
Definition: appview.h:45
@ SCRNSHOT_PREV_LOADING
Definition: appview.h:47
@ SCRNSHOT_PREV_FAILED
Definition: appview.h:49
@ SCRNSHOT_PREV_EMPTY
Definition: appview.h:46
@ SCRNSHOT_PREV_IMAGE
Definition: appview.h:48
#define LISTVIEW_ICON_SIZE
Definition: appview.h:22
struct __ScrnshotDownloadParam ScrnshotDownloadParam
#define TIMER_LOADING_ANIMATION
Definition: appview.h:52
#define INFO_DISPLAY_PADDING
Definition: appview.h:31
APPLICATION_VIEW_TYPE
Definition: appview.h:70
@ AppViewTypeInstalledApps
Definition: appview.h:72
@ AppViewTypeAvailableApps
Definition: appview.h:71
pASYNCINET AsyncInetDownload(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, LPCWSTR lpszUrl, BOOL bAllowCache, ASYNCINET_CALLBACK Callback, VOID *Extension)
Definition: asyncinet.cpp:33
BOOL AsyncInetCancel(pASYNCINET AsyncInet)
Definition: asyncinet.cpp:126
VOID AsyncInetRelease(pASYNCINET AsyncInet)
Definition: asyncinet.cpp:184
ASYNC_EVENT
Definition: asyncinet.h:6
@ ASYNCINET_ERROR
Definition: asyncinet.h:15
@ ASYNCINET_COMPLETE
Definition: asyncinet.h:9
@ ASYNCINET_CANCELLED
Definition: asyncinet.h:12
@ ASYNCINET_DATA
Definition: asyncinet.h:7
#define IDI_MAIN
Definition: resource.h:4
#define ID_EXIT
Definition: resource.h:10
HTREEITEM InsertItem(HWND hTree, LPCWSTR szName, HTREEITEM hParent, HTREEITEM hInsertAfter)
Definition: treeview.c:95
#define IDS_TOOLTIP_REFRESH
Definition: resource.h:48
#define ID_REFRESH
Definition: resource.h:16
#define MAX_STR_LEN
Definition: defines.h:43
BOOL GetStorageDirectory(CStringW &lpDirectory)
Definition: misc.cpp:145
INT GetSystemColorDepth()
Definition: misc.cpp:321
VOID CopyTextToClipboard(LPCWSTR lpszText)
Definition: misc.cpp:19
VOID ShowPopupMenuEx(HWND hwnd, HWND hwndOwner, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:46
#define ID_REGREMOVE
Definition: resource.h:83
#define IDS_TOOLTIP_UPDATE_DB
Definition: resource.h:134
#define IDS_APP_DESCRIPTION
Definition: resource.h:139
#define IDS_TOOLTIP_INSTALL
Definition: resource.h:127
#define IDS_SEARCH_TEXT
Definition: resource.h:93
#define ID_UNINSTALL
Definition: resource.h:75
#define IDI_UPDATE_DB
Definition: resource.h:14
#define IDS_WELCOME_TITLE
Definition: resource.h:95
#define ID_COPY_LINK
Definition: resource.h:80
#define IDS_WELCOME_TEXT
Definition: resource.h:96
#define IDS_TOOLTIP_SETTINGS
Definition: resource.h:131
#define IDI_EXIT
Definition: resource.h:5
#define IDI_BROKEN_IMAGE
Definition: resource.h:17
#define IDI_MODIFY
Definition: resource.h:9
#define IDS_APP_INST_VERSION
Definition: resource.h:138
#define IDR_LINKMENU
Definition: resource.h:69
#define ID_CHECK_ALL
Definition: resource.h:85
#define IDI_CHECK_ALL
Definition: resource.h:15
#define IDS_TOOLTIP_MODIFY
Definition: resource.h:129
#define IDR_APPLICATIONMENU
Definition: resource.h:70
#define IDI_INSTALL
Definition: resource.h:6
#define IDI_SETTINGS
Definition: resource.h:8
#define ID_MODIFY
Definition: resource.h:78
#define ID_OPEN_LINK
Definition: resource.h:79
#define IDI_UNINSTALL
Definition: resource.h:7
#define IDS_TOOLTIP_UNINSTALL
Definition: resource.h:128
#define IDS_TOOLTIP_SELECT_ALL
Definition: resource.h:130
#define ID_RESETDB
Definition: resource.h:84
#define IDS_APP_NAME
Definition: resource.h:137
#define IDS_TOOLTIP_EXIT
Definition: resource.h:133
#define ID_INSTALL
Definition: resource.h:74
#define IDS_WELCOME_URL
Definition: resource.h:97
#define ID_SETTINGS
Definition: resource.h:81
#define IDI_REFRESH
Definition: resource.h:10
#define InterlockedIncrement64(a)
Definition: btrfs_drv.h:143
bool IsEmpty() const noexcept
Definition: atlsimpstr.h:394
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
int GetLength() const noexcept
Definition: atlsimpstr.h:362
void Empty() noexcept
Definition: atlsimpstr.h:253
int Compare(_In_z_ PCXSTR psz) const
Definition: cstringt.h:738
static LRESULT CALLBACK StartWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1619
HWND Create(HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: atlwin.h:1734
HDC GetDC()
Definition: atlwin.h:547
HWND SetFocus()
Definition: atlwin.h:1198
void SetRedraw(BOOL bRedraw=TRUE)
Definition: atlwin.h:1234
CWindow GetParent() const
Definition: atlwin.h:700
BOOL IsWindowVisible() const
Definition: atlwin.h:958
HWND m_hWnd
Definition: atlwin.h:273
static Bitmap * FromFile(const WCHAR *filename, BOOL useEmbeddedColorManagement)
VOID OnCommand(WPARAM wParam, LPARAM lParam)
Definition: appview.cpp:943
HWND Create(HWND hwndParent)
Definition: appview.cpp:911
VOID ShowAppInfo(CAppInfo *Info)
Definition: appview.cpp:919
BOOL ProcessWindowMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: appview.cpp:741
VOID SetWelcomeText()
Definition: appview.cpp:935
VOID OnLink(ENLINK *Link)
Definition: appview.cpp:855
VOID ResizeChildren()
Definition: appview.cpp:798
CAppRichEdit * RichEdit
Definition: appview.h:170
CAppScrnshotPreview * ScrnshotPrev
Definition: appview.h:171
LPWSTR pLink
Definition: appview.h:156
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: appview.cpp:885
virtual BOOL RetrieveIcon(CStringW &Path) const =0
CStringW szDisplayName
Definition: appinfo.h:78
VOID SetWelcomeText()
Definition: appview.cpp:269
VOID InsertTextWithString(UINT StringID, const CStringW &Text, DWORD TextFlags)
Definition: appview.cpp:260
VOID LoadAndInsertText(UINT uStringID, const CStringW &szText, DWORD TextFlags)
Definition: appview.cpp:236
float GetLoadingDotWidth(int width, int height)
Definition: appview.cpp:571
CAppScrnshotPreview(const CStringW &BasePath)
Definition: appview.cpp:317
VOID PreviousDisplayCleanup()
Definition: appview.cpp:609
VOID SetStatus(SCRNSHOT_STATUS Status)
Definition: appview.cpp:481
SCRNSHOT_STATUS ScrnshotPrevStauts
Definition: appview.h:103
BOOL DisplayFile(LPCWSTR lpszFileName)
Definition: appview.cpp:467
VOID PaintOnDC(HDC hdc, int width, int height, BOOL bDrawBkgnd)
Definition: appview.cpp:487
BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: appview.cpp:322
HICON hBrokenImgIcon
Definition: appview.h:105
LONGLONG ContentID
Definition: appview.h:110
int LoadingAnimationFrame
Definition: appview.h:107
CStringW TempImagePath
Definition: appview.h:112
HWND Create(HWND hParent)
Definition: appview.cpp:601
float GetFrameDotShift(int Frame, int width, int height)
Definition: appview.cpp:577
BOOL DisplayImage(LPCWSTR lpszLocation)
Definition: appview.cpp:642
pASYNCINET AsyncInet
Definition: appview.h:109
CStringW m_BasePath
Definition: appview.h:102
Gdiplus::Image * pImage
Definition: appview.h:104
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: appview.cpp:585
int GetRequestedWidth(int Height)
Definition: appview.cpp:706
BOOL CreateToolbar()
Definition: appview.cpp:1533
PVOID GetFocusedItemData()
Definition: appview.cpp:1874
VOID ItemGetFocus(LPVOID CallbackParam)
Definition: appview.cpp:1898
BOOL CreateHSplitter()
Definition: appview.cpp:1567
APPLICATION_VIEW_TYPE ApplicationViewType
Definition: appview.h:353
HWND Create(HWND hwndParent)
Definition: appview.cpp:1808
BOOL CreateAppInfoDisplay()
Definition: appview.cpp:1594
VOID OnCommand(WPARAM wParam, LPARAM lParam)
Definition: appview.cpp:1678
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: appview.cpp:1792
CUiPanel * m_Panel
Definition: appview.h:345
CUiWindow< CComboBox > * m_ComboBox
Definition: appview.h:347
CUiWindow< CSearchBar > * m_SearchBar
Definition: appview.h:348
BOOL AddApplication(CAppInfo *InstAppInfo, BOOL InitialCheckState)
Definition: appview.cpp:1856
BOOL ProcessWindowMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: appview.cpp:1375
BOOL SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
Definition: appview.cpp:1818
CApplicationView(CMainWindow *MainWindow)
Definition: appview.cpp:1778
CMainWindow * m_MainWindow
Definition: appview.h:352
CAppInfoDisplay * m_AppsInfo
Definition: appview.h:350
void SetFocusOnSearchBar()
Definition: appview.cpp:1612
VOID OnSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
Definition: appview.cpp:1618
CUiSplitPanel * m_HSplitter
Definition: appview.h:351
void SetRedraw(BOOL bRedraw)
Definition: appview.cpp:1605
BOOL CreateComboBox()
Definition: appview.cpp:1556
BOOL CreateSearchBar()
Definition: appview.cpp:1544
CMainToolbar * m_Toolbar
Definition: appview.h:346
VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: appview.cpp:1886
VOID SetWatermark(const CStringW &Text)
Definition: appview.cpp:1862
BOOL CreateListView()
Definition: appview.cpp:1583
CAppsListView * m_ListView
Definition: appview.h:349
VOID ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
Definition: appview.cpp:1920
INT AddItem(INT ItemIndex, INT IconIndex, LPCWSTR lpText, LPARAM lParam)
Definition: appview.cpp:1088
void DeleteColumn(INT Index)
Definition: appview.cpp:1081
VOID ColumnClick(LPNMLISTVIEW pnmv)
Definition: appview.cpp:1025
BOOL bHasCheckboxes
Definition: appview.h:198
INT ItemCount
Definition: appview.h:200
BOOL SetViewMode(DWORD ViewMode)
Definition: appview.cpp:1279
INT ColumnCount
Definition: appview.h:202
VOID ItemCheckStateNotify(int iItem, BOOL bCheck)
Definition: appview.cpp:1359
VOID CheckAll()
Definition: appview.cpp:1187
HIMAGELIST m_hImageListView
Definition: appview.h:208
HIMAGELIST GetImageList(int iImageList)
Definition: appview.cpp:1109
BOOL SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
Definition: appview.cpp:1216
APPLICATION_VIEW_TYPE ApplicationViewType
Definition: appview.h:206
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: appview.cpp:986
PVOID GetFocusedItemData()
Definition: appview.cpp:1205
HWND Create(HWND hwndParent)
Definition: appview.cpp:1144
BOOL GetCheckState(INT item)
Definition: appview.cpp:1172
VOID SetCheckboxesVisible(BOOL bIsVisible)
Definition: appview.cpp:1010
VOID SetWatermark(const CStringW &Text)
Definition: appview.cpp:1004
VOID SetCheckState(INT item, BOOL fCheck)
Definition: appview.cpp:1178
INT nLastHeaderID
Definition: appview.h:204
BOOL AddColumn(INT Index, CStringW &Text, INT Width, INT Format)
Definition: appview.cpp:1065
CStringW m_Watermark
Definition: appview.h:209
BOOL AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState)
Definition: appview.cpp:1285
INT CheckedItemCount
Definition: appview.h:201
static INT CALLBACK s_CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: appview.cpp:1115
BOOL bIsAscending
Definition: appview.h:197
INT CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
Definition: appview.cpp:1122
const int m_DefaultSelectType
Definition: appview.h:330
HWND Create(HWND hwndParent)
Definition: appview.cpp:212
const UINT m_TypeStringID[3]
Definition: appview.h:328
int m_Width
Definition: appview.h:333
int m_Height
Definition: appview.h:334
HWND Create(HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: rosctrls.h:8
VOID ShowButtonCaption()
Definition: appview.cpp:165
DWORD m_dButtonsWidthMax
Definition: appview.h:276
DWORD GetMaxButtonsWidth() const
Definition: appview.cpp:172
VOID OnGetDispInfo(LPTOOLTIPTEXT lpttt)
Definition: appview.cpp:62
HWND Create(HWND hwndParent)
Definition: appview.cpp:99
const INT m_iToolbarHeight
Definition: appview.h:275
VOID AddImageToImageList(HIMAGELIST hImageList, UINT ImageIndex)
Definition: appview.cpp:19
HIMAGELIST InitImageList()
Definition: appview.cpp:34
VOID HideButtonCaption()
Definition: appview.cpp:158
BOOL SearchTextChanged(CStringW &SearchText)
Definition: gui.cpp:748
BOOL InstallApplication(CAppInfo *Info)
Definition: gui.cpp:733
VOID ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
Definition: gui.cpp:705
INT Append(T *ptr)
Definition: rosui.h:87
HWND Create(HWND hwndParent)
Definition: crichedit.h:104
VOID InsertText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:77
VOID SetText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:91
HWND Create(HWND hwndParent)
Definition: appview.cpp:191
const INT m_Height
Definition: appview.h:306
const INT m_Width
Definition: appview.h:305
VOID SetText(LPCWSTR lpszText)
Definition: appview.cpp:185
DWORD AutoSize()
Definition: rosctrls.h:378
DWORD AddButtons(int count, TBBUTTON *buttons)
Definition: rosctrls.h:332
DWORD SetButtonStructSize()
Definition: rosctrls.h:286
HIMAGELIST SetImageList(HIMAGELIST himl)
Definition: rosctrls.h:424
DWORD GetIdealSize(BOOL useHeight, LPSIZE size)
Definition: rosctrls.h:388
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:257
CUiAlignment m_VerticalAlignment
Definition: rosui.h:258
CUiMargin m_Margin
Definition: rosui.h:255
CUiCollection & Children()
Definition: rosui.h:384
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:439
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:454
INT m_Pos
Definition: rosui.h:584
BOOL m_Horizontal
Definition: rosui.h:585
CUiCollection & First()
Definition: rosui.h:618
BOOL m_DynamicFirst
Definition: rosui.h:586
CUiCollection & Second()
Definition: rosui.h:623
INT m_MinSecond
Definition: rosui.h:588
HWND Create(HWND hwndParent)
Definition: rosui.h:867
INT m_MinFirst
Definition: rosui.h:587
VOID GetWindowTextW(CStringW &szText)
Definition: rosui.h:561
virtual VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: rosui.h:546
HWND GetWindow()
Definition: rosui.h:492
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:522
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:516
Status FillEllipse(const Brush *brush, const Rect &rect)
Status SetSmoothingMode(SmoothingMode smoothingMode)
Status DrawImage(Image *image, const Point *destPoints, INT count)
WPARAM wParam
Definition: combotst.c:138
char * Text
Definition: combotst.c:136
LPARAM lParam
Definition: combotst.c:139
struct @1627 Msg[]
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
Definition: commctrl.c:1845
static HWND hwndParent
Definition: cryptui.c:300
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HBITMAP hBitmap
Definition: timezone.c:26
float REAL
Definition: types.h:41
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define CloseHandle
Definition: compat.h:739
#define GetProcessHeap()
Definition: compat.h:736
HANDLE HWND
Definition: compat.h:19
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define CALLBACK
Definition: compat.h:35
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
static const WCHAR IconIndex[]
Definition: install.c:52
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1723
int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
Definition: path.c:1092
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
Definition: url.c:2432
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
static BOOLEAN bSuccess
Definition: drive.cpp:433
static VOID NTAPI BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:49
switch(r->id)
Definition: btrfs.c:3046
HINSTANCE hInst
Definition: dxdiag.c:13
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
Definition: filename.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
_Inout_opt_ PUNICODE_STRING Extension
Definition: fltkernel.h:1092
pKey DeleteObject()
Status
Definition: gdiplustypes.h:25
@ Ok
Definition: gdiplustypes.h:26
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLint GLint GLsizei width
Definition: gl.h:1546
GLsizeiptr size
Definition: glext.h:5919
GLuint color
Definition: glext.h:6243
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
UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons)
Definition: iconcache.cpp:849
#define INT_MAX
Definition: limits.h:40
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
#define CREATE_ALWAYS
Definition: disk.h:72
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
static HICON
Definition: imagelist.c:84
static float(__cdecl *square_half_float)(float x
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static ATOM item
Definition: dde.c:856
#define min(a, b)
Definition: monoChain.cc:55
static const TBBUTTON Buttons[]
Definition: mplay32.c:41
static VOID SetImageList(HWND hwnd)
Definition: mplay32.c:238
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
#define DWORD
Definition: nt_native.h:44
#define GENERIC_WRITE
Definition: nt_native.h:90
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define L(x)
Definition: ntvdm.h:50
#define PathAppendW
Definition: pathcch.h:309
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPED
Definition: pedump.c:615
#define ES_AUTOHSCROLL
Definition: pedump.c:672
#define WS_VISIBLE
Definition: pedump.c:620
#define ES_LEFT
Definition: pedump.c:664
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define Header_GetItem(hwndHD, i, phdi)
Definition: commctrl.h:751
#define LV_VIEW_DETAILS
Definition: commctrl.h:2841
#define LVSIL_SMALL
Definition: commctrl.h:2299
#define BTNS_BUTTON
Definition: commctrl.h:998
#define TB_SETEXTENDEDSTYLE
Definition: commctrl.h:1190
#define LVS_SINGLESEL
Definition: commctrl.h:2266
#define BTNS_AUTOSIZE
Definition: commctrl.h:1004
#define LVS_SHAREIMAGELISTS
Definition: commctrl.h:2270
#define LVN_COLUMNCLICK
Definition: commctrl.h:3139
#define NM_DBLCLK
Definition: commctrl.h:131
#define LVM_GETHEADER
Definition: commctrl.h:2650
#define SBT_NOBORDERS
Definition: commctrl.h:1971
#define LVIF_STATE
Definition: commctrl.h:2312
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:989
#define Header_SetItem(hwndHD, i, phdi)
Definition: commctrl.h:758
#define BTNS_SEP
Definition: commctrl.h:999
#define LVFI_PARAM
Definition: commctrl.h:2436
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2267
#define LVM_DELETECOLUMN
Definition: commctrl.h:2638
#define LVS_REPORT
Definition: commctrl.h:2262
#define TBSTYLE_LIST
Definition: commctrl.h:993
#define TBSTYLE_EX_MIXEDBUTTONS
Definition: commctrl.h:1012
#define LVCF_WIDTH
Definition: commctrl.h:2587
#define LV_VIEW_LIST
Definition: commctrl.h:2843
#define LVS_EX_CHECKBOXES
Definition: commctrl.h:2731
#define TTN_GETDISPINFO
Definition: commctrl.h:1878
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2734
#define LVS_SORTASCENDING
Definition: commctrl.h:2268
#define LV_VIEW_TILE
Definition: commctrl.h:2844
#define ImageList_RemoveAll(himl)
Definition: commctrl.h:556
#define LVM_INSERTCOLUMN
Definition: commctrl.h:2634
#define HDF_SORTUP
Definition: commctrl.h:724
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
Definition: commctrl.h:1013
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
struct tagNMITEMACTIVATE * LPNMITEMACTIVATE
#define TB_ENABLEBUTTON
Definition: commctrl.h:1042
#define LVM_GETIMAGELIST
Definition: commctrl.h:2295
#define TB_GETEXTENDEDSTYLE
Definition: commctrl.h:1191
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define LVIF_PARAM
Definition: commctrl.h:2311
#define HDI_FORMAT
Definition: commctrl.h:705
struct tagNMLISTVIEW * LPNMLISTVIEW
#define LVS_NOSORTHEADER
Definition: commctrl.h:2285
#define LVIF_TEXT
Definition: commctrl.h:2309
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define TBSTYLE_FLAT
Definition: commctrl.h:992
#define LVM_SETVIEW
Definition: commctrl.h:2846
#define LVCF_FMT
Definition: commctrl.h:2586
#define ImageList_AddIcon(himl, hicon)
Definition: commctrl.h:415
#define NM_RCLICK
Definition: commctrl.h:133
#define LVCF_SUBITEM
Definition: commctrl.h:2589
#define LVCFMT_LEFT
Definition: commctrl.h:2598
#define ILC_MASK
Definition: commctrl.h:351
#define INDEXTOSTATEIMAGEMASK(i)
Definition: commctrl.h:2328
#define SB_SETTEXT
Definition: commctrl.h:1949
#define LVCFMT_RIGHT
Definition: commctrl.h:2599
#define LVIF_IMAGE
Definition: commctrl.h:2310
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
#define LVCF_TEXT
Definition: commctrl.h:2588
#define LVIS_STATEIMAGEMASK
Definition: commctrl.h:2326
#define LVIS_FOCUSED
Definition: commctrl.h:2318
#define HDF_SORTDOWN
Definition: commctrl.h:725
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
#define WC_COMBOBOX
Definition: commctrl.h:4718
#define LVSIL_NORMAL
Definition: commctrl.h:2298
#define LPTOOLTIPTEXT
Definition: commctrl.h:1890
#define EM_GETSELTEXT
Definition: richedit.h:95
#define CFE_BOLD
Definition: richedit.h:406
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
#define WM_PRINTCLIENT
Definition: richedit.h:70
#define CFM_LINK
Definition: richedit.h:337
#define EN_LINK
Definition: richedit.h:202
#define WM_NOTIFY
Definition: richedit.h:61
#define DefWindowProc
Definition: ros2win.h:31
@ UiAlign_Stretch
Definition: rosui.h:249
@ UiAlign_LeftTop
Definition: rosui.h:246
@ UiAlign_RightBtm
Definition: rosui.h:248
#define ID
Definition: ruserpass.c:36
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2379
#define _countof(array)
Definition: sndvol32.h:68
& rect
Definition: startmenu.cpp:1413
base for all directory entries
Definition: entries.h:138
UINT mask
Definition: commctrl.h:684
int fmt
Definition: commctrl.h:689
Definition: tftpd.h:60
LPWSTR pszText
Definition: commctrl.h:2567
LPARAM lParam
Definition: commctrl.h:2458
UINT code
Definition: winuser.h:3159
HWND hwndFrom
Definition: winuser.h:3157
UINT uNewState
Definition: commctrl.h:3036
LPARAM lParam
Definition: commctrl.h:3040
UINT uOldState
Definition: commctrl.h:3037
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
#define max(a, b)
Definition: svc.c:63
#define GetWindowLongPtr
Definition: treelist.c:73
int32_t INT_PTR
Definition: typedefs.h:64
int64_t LONGLONG
Definition: typedefs.h:68
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
#define AddItem
Definition: userenv.h:209
static int Link(const char **args)
Definition: vfdcmd.c:2414
#define _T(x)
Definition: vfdio.h:22
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION Direction
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
Definition: wdfiotarget.h:960
HDC hdcMem
Definition: welcome.c:104
#define ZeroMemory
Definition: winbase.h:1712
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ ULONG NotifyCode
Definition: winddi.h:4265
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
CONST void * LPCVOID
Definition: windef.h:191
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define SelectFont(hdc, hfont)
Definition: windowsx.h:516
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
#define GetStockFont(i)
Definition: windowsx.h:308
#define ERROR_CANCELLED
Definition: winerror.h:726
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define DI_COMPAT
Definition: wingdi.h:68
#define DEFAULT_GUI_FONT
Definition: wingdi.h:909
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define DI_NORMAL
Definition: wingdi.h:72
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define SRCCOPY
Definition: wingdi.h:333
#define PATCOPY
Definition: wingdi.h:335
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI DeleteDC(_In_ HDC)
#define INTERNET_OPEN_TYPE_PRECONFIG
Definition: wininet.h:521
#define WM_PAINT
Definition: winuser.h:1620
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define CS_VREDRAW
Definition: winuser.h:658
DWORD WINAPI GetSysColor(_In_ int)
#define DT_NOPREFIX
Definition: winuser.h:537
#define EN_KILLFOCUS
Definition: winuser.h:2025
#define COLOR_GRAYTEXT
Definition: winuser.h:932
#define DT_CENTER
Definition: winuser.h:527
#define LR_LOADFROMFILE
Definition: winuser.h:1092
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
#define IMAGE_ICON
Definition: winuser.h:212
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CREATE
Definition: winuser.h:1608
#define EN_SETFOCUS
Definition: winuser.h:2027
#define WM_SIZE
Definition: winuser.h:1611
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define PRF_ERASEBKGND
Definition: winuser.h:2526
#define DT_SINGLELINE
Definition: winuser.h:540
#define WM_COMMAND
Definition: winuser.h:1740
#define CS_HREDRAW
Definition: winuser.h:653
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
#define IDC_ARROW
Definition: winuser.h:687
#define CB_SETCURSEL
Definition: winuser.h:1961
#define WM_RBUTTONUP
Definition: winuser.h:1780
#define SW_SHOWNOACTIVATE
Definition: winuser.h:774
#define SIZE_MINIMIZED
Definition: winuser.h:2506
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1626
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2105
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define CBN_SELCHANGE
Definition: winuser.h:1979
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define MF_ENABLED
Definition: winuser.h:128
#define WM_SETFONT
Definition: winuser.h:1650
#define WM_TIMER
Definition: winuser.h:1742
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
Definition: cursoricon.c:2028
#define CB_ADDSTRING
Definition: winuser.h:1936
BOOL WINAPI UpdateWindow(_In_ HWND)
struct tagNMHDR * LPNMHDR
#define SendMessage
Definition: winuser.h:5843
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5719
#define EM_SETSEL
Definition: winuser.h:2018
#define CBS_HASSTRINGS
Definition: winuser.h:285
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define DT_VCENTER
Definition: winuser.h:543
#define LoadImage
Definition: winuser.h:5815
#define PRF_CHECKVISIBLE
Definition: winuser.h:2523
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_DESTROY
Definition: winuser.h:1609
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define CB_GETCURSEL
Definition: winuser.h:1943
#define GWL_STYLE
Definition: winuser.h:852
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MAKEINTRESOURCE
Definition: winuser.h:591
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2075
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HMENU WINAPI GetMenu(_In_ HWND)
#define COLOR_BTNFACE
Definition: winuser.h:928
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2053
#define MF_GRAYED
Definition: winuser.h:129
#define EN_CHANGE
Definition: winuser.h:2022
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185