ReactOS  0.4.12-dev-722-g4ba3c90
gui.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Applications Manager
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * FILE: base/applications/rapps/gui.cpp
5  * PURPOSE: GUI classes for RAPPS
6  * COPYRIGHT: Copyright 2015 David Quintana (gigaherz@gmail.com)
7  * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
8  */
9 #include "rapps.h"
10 
11 #include "rapps.h"
12 #include "rosui.h"
13 #include "crichedit.h"
14 
15 #include <shlobj_undoc.h>
16 #include <shlguid_undoc.h>
17 
18 #include <atlbase.h>
19 #include <atlcom.h>
20 #include <atlwin.h>
21 #include <wininet.h>
22 #include <shellutils.h>
23 #include <rosctrls.h>
24 
25 #define SEARCH_TIMER_ID 'SR'
26 #define LISTVIEW_ICON_SIZE 24
27 #define TREEVIEW_ICON_SIZE 24
28 
30 
32 {
33  DEVMODEW pDevMode;
34  INT ColorDepth;
35 
36  pDevMode.dmSize = sizeof(pDevMode);
37  pDevMode.dmDriverExtra = 0;
38 
40  {
41  /* TODO: Error message */
42  return ILC_COLOR;
43  }
44 
45  switch (pDevMode.dmBitsPerPel)
46  {
47  case 32: ColorDepth = ILC_COLOR32; break;
48  case 24: ColorDepth = ILC_COLOR24; break;
49  case 16: ColorDepth = ILC_COLOR16; break;
50  case 8: ColorDepth = ILC_COLOR8; break;
51  case 4: ColorDepth = ILC_COLOR4; break;
52  default: ColorDepth = ILC_COLOR; break;
53  }
54 
55  return ColorDepth;
56 }
57 
59 {
60  static inline VOID InsertTextAfterLoaded_RichEdit(UINT uStringID,
61  const ATL::CStringW& szText,
62  DWORD StringFlags,
63  DWORD TextFlags)
64  {
65  ATL::CStringW szLoadedText;
66  if (!szText.IsEmpty() && szLoadedText.LoadStringW(uStringID))
67  {
68  InsertRichEditText(szLoadedText, StringFlags);
69  InsertRichEditText(szText, TextFlags);
70  }
71  }
72 
73  static inline VOID InsertLoadedTextNewl_RichEdit(UINT uStringID,
74  DWORD StringFlags)
75  {
76  ATL::CStringW szLoadedText;
77  if (szLoadedText.LoadStringW(uStringID))
78  {
79  InsertRichEditText(L"\n", 0);
80  InsertRichEditText(szLoadedText, StringFlags);
81  InsertRichEditText(L"\n", 0);
82  }
83  }
84 
86  {
87  if (Info->IsInstalled())
88  {
89  if (Info->HasInstalledVersion())
90  {
91  if (Info->HasUpdate())
93  else
95 
97  }
98  else
99  {
101  }
102  }
103  else
104  {
106  }
107 
109  }
110 
112  {
113  ATL::CStringW szLicense;
114  switch (Info->m_LicenseType)
115  {
116  case LICENSE_OPENSOURCE:
117  szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
118  break;
119  case LICENSE_FREEWARE:
120  szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
121  break;
122  case LICENSE_TRIAL:
123  szLicense.LoadStringW(IDS_LICENSE_TRIAL);
124  break;
125  default:
127  return;
128  }
129 
130  szLicense += L" (" + Info->m_szLicense + L")";
132  }
133 
135  {
136  if (!Info->HasLanguageInfo())
137  {
138  return;
139  }
140 
141  const INT nTranslations = Info->m_LanguageLCIDs.GetSize();
142  ATL::CStringW szLangInfo;
143  ATL::CStringW szLoadedTextAvailability;
144  ATL::CStringW szLoadedAInfoText;
145 
146  szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
147 
148  if (Info->HasNativeLanguage())
149  {
150  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
151  if (nTranslations > 1)
152  {
154  buf.LoadStringW(IDS_LANGUAGE_MORE_PLACEHOLDER);
155  szLangInfo.Format(buf, nTranslations - 1);
156  }
157  else
158  {
159  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
160  szLangInfo = L" (" + szLangInfo + L")";
161  }
162  }
163  else if (Info->HasEnglishLanguage())
164  {
165  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
166  if (nTranslations > 1)
167  {
170  szLangInfo.Format(buf, nTranslations - 1);
171  }
172  else
173  {
174  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
175  szLangInfo = L" (" + szLangInfo + L")";
176  }
177  }
178  else
179  {
180  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
181  }
182 
183  InsertRichEditText(szLoadedAInfoText, CFE_BOLD);
184  InsertRichEditText(szLoadedTextAvailability, NULL);
185  InsertRichEditText(szLangInfo, CFE_ITALIC);
186  }
187 
188 public:
190  {
192  if (!Info) return FALSE;
193 
194  NewRichEditText(Info->m_szName, CFE_BOLD);
198 
203 
204  return TRUE;
205  }
206 };
207 
209  public CUiWindow< CToolbar<> >
210 {
213 
218 
219  VOID AddImageToImageList(HIMAGELIST hImageList, UINT ImageIndex)
220  {
221  HICON hImage;
222 
223  if (!(hImage = (HICON) LoadImageW(hInst,
224  MAKEINTRESOURCE(ImageIndex),
225  IMAGE_ICON,
228  0)))
229  {
230  /* TODO: Error message */
231  }
232 
233  ImageList_AddIcon(hImageList, hImage);
234  DeleteObject(hImage);
235  }
236 
238  {
239  HIMAGELIST hImageList;
240 
241  /* Create the toolbar icon image list */
242  hImageList = ImageList_Create(m_iToolbarHeight,//GetSystemMetrics(SM_CXSMICON),
243  m_iToolbarHeight,//GetSystemMetrics(SM_CYSMICON),
245  1, 1);
246  if (!hImageList)
247  {
248  /* TODO: Error message */
249  return NULL;
250  }
251 
252  AddImageToImageList(hImageList, IDI_INSTALL);
253  AddImageToImageList(hImageList, IDI_UNINSTALL);
254  AddImageToImageList(hImageList, IDI_MODIFY);
255  AddImageToImageList(hImageList, IDI_CHECK_ALL);
256  AddImageToImageList(hImageList, IDI_REFRESH);
257  AddImageToImageList(hImageList, IDI_UPDATE_DB);
258  AddImageToImageList(hImageList, IDI_SETTINGS);
259  AddImageToImageList(hImageList, IDI_EXIT);
260 
261  return hImageList;
262  }
263 
264 public:
266  {
267  }
268 
270  {
271  UINT idButton = (UINT) lpttt->hdr.idFrom;
272 
273  switch (idButton)
274  {
275  case ID_EXIT:
276  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_EXIT);
277  break;
278 
279  case ID_INSTALL:
280  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_INSTALL);
281  break;
282 
283  case ID_UNINSTALL:
284  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UNINSTALL);
285  break;
286 
287  case ID_MODIFY:
288  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_MODIFY);
289  break;
290 
291  case ID_SETTINGS:
292  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_SETTINGS);
293  break;
294 
295  case ID_REFRESH:
296  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_REFRESH);
297  break;
298 
299  case ID_RESETDB:
300  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UPDATE_DB);
301  break;
302  }
303  }
304 
306  {
307  /* Create buttons */
308  TBBUTTON Buttons[] =
309  { /* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */
314  { -1, 0, TBSTATE_ENABLED, BTNS_SEP, { 0 }, 0, 0 },
315  { 4, ID_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, { 0 }, 0, 0 },
316  { 5, ID_RESETDB, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, { 0 }, 0, 0 },
317  { -1, 0, TBSTATE_ENABLED, BTNS_SEP, { 0 }, 0, 0 },
318  { 6, ID_SETTINGS, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, { 0 }, 0, 0 },
319  { 7, ID_EXIT, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, { 0 }, 0, 0 },
320  };
321 
326 
329  0, 0, 0, 0,
330  hwndParent,
331  0, hInst, NULL);
332 
333  if (!m_hWnd)
334  {
335  /* TODO: Show error message */
336  return FALSE;
337  }
338 
341 
342  /* Set image list */
343  HIMAGELIST hImageList = InitImageList();
344 
345  if (!hImageList)
346  {
347  /* TODO: Show error message */
348  return FALSE;
349  }
350 
351  ImageList_Destroy(SetImageList(hImageList));
352 
354 
355  /* Remember ideal width to use as a max width of buttons */
356  SIZE size;
359 
360  return m_hWnd;
361  }
362 
364  {
365  DWORD dCurrentExStyle = (DWORD) SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
367  }
368 
370  {
371  DWORD dCurrentExStyle = (DWORD) SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
373  }
374 
376  {
377  return m_dButtonsWidthMax;
378  }
379 };
380 
382  public CUiWindow<CListView>
383 {
384  struct SortContext
385  {
388  };
389 
393 
395 
396 public:
401  nLastHeaderID(-1)
402  {
403  }
404 
406  {
407  if (bIsVisible)
408  {
410  }
411  else
412  {
414  }
415 
416  bHasCheckboxes = bIsVisible;
417  }
418 
420  {
421  HWND hHeader;
422  HDITEMW hColumn;
423  INT nHeaderID = pnmv->iSubItem;
424 
426  return;
427 
428  hHeader = (HWND) SendMessage(LVM_GETHEADER, 0, 0);
429  ZeroMemory(&hColumn, sizeof(hColumn));
430 
431  /* If the sorting column changed, remove the sorting style from the old column */
432  if ((nLastHeaderID != -1) && (nLastHeaderID != nHeaderID))
433  {
434  hColumn.mask = HDI_FORMAT;
435  Header_GetItem(hHeader, nLastHeaderID, &hColumn);
436  hColumn.fmt &= ~(HDF_SORTUP | HDF_SORTDOWN);
437  Header_SetItem(hHeader, nLastHeaderID, &hColumn);
438  }
439 
440  /* Set the sorting style to the new column */
441  hColumn.mask = HDI_FORMAT;
442  Header_GetItem(hHeader, nHeaderID, &hColumn);
443 
444  hColumn.fmt &= (bIsAscending ? ~HDF_SORTDOWN : ~HDF_SORTUP);
445  hColumn.fmt |= (bIsAscending ? HDF_SORTUP : HDF_SORTDOWN);
446  Header_SetItem(hHeader, nHeaderID, &hColumn);
447 
448  /* Sort the list, using the current values of nHeaderID and bIsAscending */
449  SortContext ctx = {this, nHeaderID};
450  SortItems(s_CompareFunc, &ctx);
451 
452  /* Save new values */
453  nLastHeaderID = nHeaderID;
455  }
456 
458  {
459  INT ItemIndex;
460  LVITEMW Item;
461 
462  if (Index == -1)
463  {
464  ItemIndex = (INT) SendMessage(LVM_GETNEXTITEM, -1, LVNI_FOCUSED);
465  if (ItemIndex == -1)
466  return NULL;
467  }
468  else
469  {
470  ItemIndex = Index;
471  }
472 
473  ZeroMemory(&Item, sizeof(Item));
474 
475  Item.mask = LVIF_PARAM;
476  Item.iItem = ItemIndex;
477  if (!GetItem(&Item))
478  return NULL;
479 
480  return (PVOID) Item.lParam;
481  }
482 
484  {
485  return AddColumn(Index, const_cast<LPWSTR>(Text.GetString()), Width, Format);
486  }
487 
489  {
490  LVCOLUMNW Column;
491 
492  ZeroMemory(&Column, sizeof(Column));
493 
495  Column.iSubItem = Index;
496  Column.pszText = lpText;
497  Column.cx = Width;
498  Column.fmt = Format;
499 
500  return (InsertColumn(Index, &Column) == -1) ? FALSE : TRUE;
501  }
502 
504  {
505  LVITEMW Item;
506 
507  ZeroMemory(&Item, sizeof(Item));
508 
510  Item.pszText = lpText;
511  Item.lParam = lParam;
512  Item.iItem = ItemIndex;
513  Item.iImage = IconIndex;
514 
515  return InsertItem(&Item);
516  }
517 
518  static INT CALLBACK s_CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
519  {
520  SortContext * ctx = ((SortContext*) lParamSort);
521  return ctx->lvw->CompareFunc(lParam1, lParam2, ctx->iSubItem);
522  }
523 
524  INT CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
525  {
526  ATL::CStringW Item1, Item2;
527  LVFINDINFOW IndexInfo;
528  INT Index;
529 
530  IndexInfo.flags = LVFI_PARAM;
531 
532  IndexInfo.lParam = lParam1;
533  Index = FindItem(-1, &IndexInfo);
534  GetItemText(Index, iSubItem, Item1.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
535  Item1.ReleaseBuffer();
536 
537  IndexInfo.lParam = lParam2;
538  Index = FindItem(-1, &IndexInfo);
539  GetItemText(Index, iSubItem, Item2.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
540  Item2.ReleaseBuffer();
541 
542  return bIsAscending ? Item1.Compare(Item2) : Item2.Compare(Item1);
543  }
544 
546  {
547  RECT r = {205, 28, 465, 250};
550 
552 
553  if (hwnd)
554  {
556  }
557 
558  return hwnd;
559  }
560 
562  {
563  return (BOOL) (GetItemState(item, LVIS_STATEIMAGEMASK) >> 12) - 1;
564  }
565 
567  {
568  if (bHasCheckboxes)
569  {
571  SetSelected(item, fCheck);
572  }
573  }
574 
576  {
577  if (item < 0)
578  {
579  for (INT i = 0; i >= 0; i = GetNextItem(i, LVNI_ALL))
580  {
582  if (pAppInfo)
583  {
584  pAppInfo->m_IsSelected = value;
585  }
586  }
587  }
588  else
589  {
591  if (pAppInfo)
592  {
593  pAppInfo->m_IsSelected = value;
594  }
595  }
596  }
597 
599  {
600  if (bHasCheckboxes)
601  {
604  }
605  }
606 
608  {
609  if (!bHasCheckboxes)
610  {
612  }
613 
615  for (INT i = 0; i >= 0; i = GetNextItem(i, LVNI_ALL))
616  {
617  if (GetCheckState(i) != FALSE)
618  {
620  list.Add(*pAppInfo);
621  }
622  }
623  return list;
624  }
625 
627  {
630  }
631 };
632 
634  public CUiWindow<CTreeView>
635 {
637 
638 public:
640  CUiWindow(),
643  0, 1))
644  {
645  }
646 
648  {
649  return CUiWindow<CTreeView>::AddItem(hParent, const_cast<LPWSTR>(Text.GetString()), Image, SelectedImage, lParam);
650  }
651 
653  {
655  INT Index;
656  HICON hIcon;
657 
660  IMAGE_ICON,
664  if (hIcon)
665  {
668  }
669 
670  szText.LoadStringW(TextIndex);
671  return AddItem(hRootItem, szText, Index, Index, TextIndex);
672  }
673 
675  {
677  }
678 
680  {
681  if (hImageTreeView)
683  }
684 
686  {
688  }
689 };
690 
691 class CSearchBar :
692  public CWindow
693 {
694 public:
695  const INT m_Width;
696  const INT m_Height;
697 
699  {
700  }
701 
702  VOID SetText(LPCWSTR lpszText)
703  {
705  }
706 
708  {
709  ATL::CStringW szBuf;
712  0, 0, m_Width, m_Height,
713  hwndParent, (HMENU) NULL,
714  hInst, 0);
715 
717  szBuf.LoadStringW(IDS_SEARCH_TEXT);
718  SetWindowTextW(szBuf);
719  return m_hWnd;
720  }
721 
722 };
723 
724 class CMainWindow :
725  public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits>
726 {
730 
733 
737 
740 
742 
744 
747 
748 public:
751  pLink(NULL),
753  {
754  }
755 
756 private:
758  {
760 
761  /* Add columns to ListView */
762  szText.LoadStringW(IDS_APP_NAME);
764 
765  szText.LoadStringW(IDS_APP_INST_VERSION);
767 
768  szText.LoadStringW(IDS_APP_DESCRIPTION);
770 
771  // Unnesesary since the list updates on every TreeView selection
772  // UpdateApplicationsList(ENUM_ALL_COMPONENTS);
773  }
774 
776  {
777  return m_TreeView->AddCategory(hRootItem, TextIndex, IconIndex);
778  }
779 
781  {
782  HTREEITEM hRootItemInstalled, hRootItemAvailable;
783 
784  hRootItemInstalled = AddCategory(TVI_ROOT, IDS_INSTALLED, IDI_CATEGORY);
785  AddCategory(hRootItemInstalled, IDS_APPLICATIONS, IDI_APPS);
786  AddCategory(hRootItemInstalled, IDS_UPDATES, IDI_APPUPD);
787 
789 
790  hRootItemAvailable = AddCategory(TVI_ROOT, IDS_AVAILABLEFORINST, IDI_CATEGORY);
791  AddCategory(hRootItemAvailable, IDS_CAT_AUDIO, IDI_CAT_AUDIO);
792  AddCategory(hRootItemAvailable, IDS_CAT_VIDEO, IDI_CAT_VIDEO);
793  AddCategory(hRootItemAvailable, IDS_CAT_GRAPHICS, IDI_CAT_GRAPHICS);
794  AddCategory(hRootItemAvailable, IDS_CAT_GAMES, IDI_CAT_GAMES);
795  AddCategory(hRootItemAvailable, IDS_CAT_INTERNET, IDI_CAT_INTERNET);
796  AddCategory(hRootItemAvailable, IDS_CAT_OFFICE, IDI_CAT_OFFICE);
797  AddCategory(hRootItemAvailable, IDS_CAT_DEVEL, IDI_CAT_DEVEL);
798  AddCategory(hRootItemAvailable, IDS_CAT_EDU, IDI_CAT_EDU);
799  AddCategory(hRootItemAvailable, IDS_CAT_ENGINEER, IDI_CAT_ENGINEER);
800  AddCategory(hRootItemAvailable, IDS_CAT_FINANCE, IDI_CAT_FINANCE);
801  AddCategory(hRootItemAvailable, IDS_CAT_SCIENCE, IDI_CAT_SCIENCE);
802  AddCategory(hRootItemAvailable, IDS_CAT_TOOLS, IDI_CAT_TOOLS);
803  AddCategory(hRootItemAvailable, IDS_CAT_DRIVERS, IDI_CAT_DRIVERS);
804  AddCategory(hRootItemAvailable, IDS_CAT_LIBS, IDI_CAT_LIBS);
805  AddCategory(hRootItemAvailable, IDS_CAT_OTHER, IDI_CAT_OTHER);
806 
808  m_TreeView->Expand(hRootItemInstalled, TVE_EXPAND);
809  m_TreeView->Expand(hRootItemAvailable, TVE_EXPAND);
810  m_TreeView->SelectItem(hRootItemAvailable);
811  }
812 
814  {
819 
821  }
822 
824  {
825  m_Toolbar = new CMainToolbar();
829 
830  return m_Toolbar->Create(m_hWnd) != NULL;
831  }
832 
834  {
835  m_TreeView = new CSideTreeView();
839 
840  return m_TreeView->Create(m_hWnd) != NULL;
841  }
842 
844  {
845  m_ListView = new CAppsListView();
849 
851  return hListView != NULL;
852  }
853 
855  {
860 
861  return m_RichEdit->Create(m_hWnd) != NULL;
862  }
863 
865  {
866  m_VSplitter = new CUiSplitPanel();
871  m_VSplitter->m_MinFirst = 0;
872  m_VSplitter->m_MinSecond = 320;
873  m_VSplitter->m_Pos = 240;
875 
876  return m_VSplitter->Create(m_hWnd) != NULL;
877  }
878 
880  {
881  m_HSplitter = new CUiSplitPanel();
886  m_HSplitter->m_Pos = INT_MAX; //set INT_MAX to use lowest possible position (m_MinSecond)
887  m_HSplitter->m_MinFirst = 10;
888  m_HSplitter->m_MinSecond = 140;
890 
891  return m_HSplitter->Create(m_hWnd) != NULL;
892  }
893 
895  {
899  m_SearchBar->m_Margin.top = 4;
901 
902  return m_SearchBar->Create(m_Toolbar->m_hWnd) != NULL;
903  }
904 
906  {
907  BOOL b = TRUE;
908  bUpdating = TRUE;
909 
910  m_ClientPanel = new CUiPanel();
913 
914  // Top level
915  b = b && CreateStatusBar();
916  b = b && CreateToolbar();
917  b = b && CreateSearchBar();
918  b = b && CreateVSplitter();
919 
920  // Inside V Splitter
921  b = b && CreateHSplitter();
922  b = b && CreateTreeView();
923 
924  // Inside H Splitter
925  b = b && CreateListView();
926  b = b && CreateRichEdit();
927 
928  if (b)
929  {
930  RECT rTop;
931  RECT rBottom;
932 
933  /* Size status bar */
934  m_StatusBar->SendMessageW(WM_SIZE, 0, 0);
935 
936  /* Size tool bar */
937  m_Toolbar->AutoSize();
938 
939  ::GetWindowRect(m_Toolbar->m_hWnd, &rTop);
940  ::GetWindowRect(m_StatusBar->m_hWnd, &rBottom);
941 
942  m_VSplitter->m_Margin.top = rTop.bottom - rTop.top;
943  m_VSplitter->m_Margin.bottom = rBottom.bottom - rBottom.top;
944  }
945 
946  bUpdating = FALSE;
947  return b;
948  }
949 
951  {
952  if (CreateLayout())
953  {
954 
957 
958  nSelectedApps = 0;
960 
961  return TRUE;
962  }
963 
964  return FALSE;
965  }
966 
968  {
969  if (wParam == SIZE_MINIMIZED)
970  return;
971 
972  /* Size status bar */
973  m_StatusBar->SendMessage(WM_SIZE, 0, 0);
974 
975  /* Size tool bar */
976  m_Toolbar->AutoSize();
977 
978  /* Automatically hide captions */
979  DWORD dToolbarTreshold = m_Toolbar->GetMaxButtonsWidth();
980  DWORD dSearchbarMargin = (LOWORD(lParam) - m_SearchBar->m_Width);
981 
982  if (dSearchbarMargin > dToolbarTreshold)
983  {
985  }
986  else if (dSearchbarMargin < dToolbarTreshold)
987  {
989  }
990 
991  RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)};
992  HDWP hdwp = NULL;
994 
995  hdwp = BeginDeferWindowPos(count);
996  if (hdwp)
997  {
998  hdwp = m_ClientPanel->OnParentSize(r, hdwp);
999  if (hdwp)
1000  {
1001  EndDeferWindowPos(hdwp);
1002  }
1003 
1004  }
1005 
1006  // TODO: Sub-layouts for children of children
1008  hdwp = BeginDeferWindowPos(count);
1009  if (hdwp)
1010  {
1011  hdwp = m_SearchBar->OnParentSize(r, hdwp);
1012  if (hdwp)
1013  {
1014  EndDeferWindowPos(hdwp);
1015  }
1016  }
1017 
1018  }
1019 
1021  {
1022  theResult = 0;
1023  switch (Msg)
1024  {
1025  case WM_CREATE:
1026  if (!InitControls())
1027  ::PostMessageW(hwnd, WM_CLOSE, 0, 0);
1028  break;
1029 
1030  case WM_DESTROY:
1031  {
1033  SaveSettings(hwnd);
1034 
1035  FreeLogs();
1037 
1040 
1041  delete m_ClientPanel;
1042 
1043  PostQuitMessage(0);
1044  return 0;
1045  }
1046 
1047  case WM_COMMAND:
1049  break;
1050 
1051  case WM_NOTIFY:
1052  {
1053  LPNMHDR data = (LPNMHDR) lParam;
1054 
1055  switch (data->code)
1056  {
1057  case TVN_SELCHANGED:
1058  {
1059  if (data->hwndFrom == m_TreeView->m_hWnd)
1060  {
1061  switch (((LPNMTREEVIEW) lParam)->itemNew.lParam)
1062  {
1063  case IDS_INSTALLED:
1065  break;
1066 
1067  case IDS_APPLICATIONS:
1069  break;
1070 
1071  case IDS_UPDATES:
1073  break;
1074 
1075  case IDS_AVAILABLEFORINST:
1077  break;
1078 
1079  case IDS_CAT_AUDIO:
1081  break;
1082 
1083  case IDS_CAT_DEVEL:
1085  break;
1086 
1087  case IDS_CAT_DRIVERS:
1089  break;
1090 
1091  case IDS_CAT_EDU:
1093  break;
1094 
1095  case IDS_CAT_ENGINEER:
1097  break;
1098 
1099  case IDS_CAT_FINANCE:
1101  break;
1102 
1103  case IDS_CAT_GAMES:
1105  break;
1106 
1107  case IDS_CAT_GRAPHICS:
1109  break;
1110 
1111  case IDS_CAT_INTERNET:
1113  break;
1114 
1115  case IDS_CAT_LIBS:
1117  break;
1118 
1119  case IDS_CAT_OFFICE:
1121  break;
1122 
1123  case IDS_CAT_OTHER:
1125  break;
1126 
1127  case IDS_CAT_SCIENCE:
1129  break;
1130 
1131  case IDS_CAT_TOOLS:
1133  break;
1134 
1135  case IDS_CAT_VIDEO:
1137  break;
1138 
1139  case IDS_SELECTEDFORINST:
1141  break;
1142  }
1143  }
1144 
1145  HMENU mainMenu = ::GetMenu(hwnd);
1146  HMENU lvwMenu = ::GetMenu(m_ListView->m_hWnd);
1147 
1148  /* Disable/enable items based on treeview selection */
1150  {
1152  EnableMenuItem(mainMenu, ID_INSTALL, MF_GRAYED);
1154  EnableMenuItem(mainMenu, ID_MODIFY, MF_ENABLED);
1155 
1157  EnableMenuItem(lvwMenu, ID_INSTALL, MF_GRAYED);
1159  EnableMenuItem(lvwMenu, ID_MODIFY, MF_ENABLED);
1160 
1161  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE);
1162  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE);
1163  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
1164  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE);
1165  }
1166  else
1167  {
1169  EnableMenuItem(mainMenu, ID_INSTALL, MF_ENABLED);
1171  EnableMenuItem(mainMenu, ID_MODIFY, MF_GRAYED);
1172 
1176  EnableMenuItem(lvwMenu, ID_MODIFY, MF_GRAYED);
1177 
1178  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, FALSE);
1179  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, TRUE);
1180  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, FALSE);
1181  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, FALSE);
1182  }
1183  }
1184  break;
1185 
1186  case LVN_ITEMCHANGED:
1187  {
1188  LPNMLISTVIEW pnic = (LPNMLISTVIEW) lParam;
1189 
1190  if (pnic->hdr.hwndFrom == m_ListView->m_hWnd)
1191  {
1192  /* Check if this is a valid item
1193  * (technically, it can be also an unselect) */
1194  INT ItemIndex = pnic->iItem;
1195  if (ItemIndex == -1 ||
1196  ItemIndex >= ListView_GetItemCount(pnic->hdr.hwndFrom))
1197  {
1198  break;
1199  }
1200 
1201  /* Check if the focus has been moved to another item */
1202  if ((pnic->uChanged & LVIF_STATE) &&
1203  (pnic->uNewState & LVIS_FOCUSED) &&
1204  !(pnic->uOldState & LVIS_FOCUSED))
1205  {
1207  ShowInstalledAppInfo(ItemIndex);
1210  }
1211  /* Check if the item is checked */
1212  if ((pnic->uNewState & LVIS_STATEIMAGEMASK) && !bUpdating)
1213  {
1214  BOOL checked = m_ListView->GetCheckState(pnic->iItem);
1215  /* FIXME: HAX!
1216  - preventing decremention below zero as a safeguard for ReactOS
1217  In ReactOS this action is triggered whenever user changes *selection*, but should be only when *checkbox* state toggled
1218  Maybe LVIS_STATEIMAGEMASK is set incorrectly
1219  */
1220  nSelectedApps +=
1221  (checked)
1222  ? 1
1223  : ((nSelectedApps > 0)
1224  ? -1
1225  : 0);
1226 
1227  /* Update item's selection status */
1228  m_ListView->SetSelected(pnic->iItem, checked);
1229 
1231  }
1232  }
1233  }
1234  break;
1235 
1236  case LVN_COLUMNCLICK:
1237  {
1238  LPNMLISTVIEW pnmv = (LPNMLISTVIEW) lParam;
1239 
1240  m_ListView->ColumnClick(pnmv);
1241  }
1242  break;
1243 
1244  case NM_CLICK:
1245  {
1246  if (data->hwndFrom == m_ListView->m_hWnd && ((LPNMLISTVIEW) lParam)->iItem != -1)
1247  {
1252  }
1253  }
1254  break;
1255 
1256  case NM_DBLCLK:
1257  {
1258  if (data->hwndFrom == m_ListView->m_hWnd && ((LPNMLISTVIEW) lParam)->iItem != -1)
1259  {
1260  /* this won't do anything if the program is already installed */
1262  }
1263  }
1264  break;
1265 
1266  case NM_RCLICK:
1267  {
1268  if (data->hwndFrom == m_ListView->m_hWnd && ((LPNMLISTVIEW) lParam)->iItem != -1)
1269  {
1270  ShowPopupMenu(m_ListView->m_hWnd, 0, ID_INSTALL);
1271  }
1272  }
1273  break;
1274 
1275  case EN_LINK:
1276  OnLink((ENLINK*) lParam);
1277  break;
1278 
1279  case TTN_GETDISPINFO:
1281  break;
1282  }
1283  }
1284  break;
1285 
1286  case WM_SIZE:
1287  OnSize(hwnd, wParam, lParam);
1288  break;
1289 
1290  case WM_SIZING:
1291  {
1292  LPRECT pRect = (LPRECT) lParam;
1293 
1294  if (pRect->right - pRect->left < 565)
1295  pRect->right = pRect->left + 565;
1296 
1297  if (pRect->bottom - pRect->top < 300)
1298  pRect->bottom = pRect->top + 300;
1299 
1300  return TRUE;
1301  }
1302 
1303  case WM_SYSCOLORCHANGE:
1304  {
1305  /* Forward WM_SYSCOLORCHANGE to common controls */
1306  m_ListView->SendMessageW(WM_SYSCOLORCHANGE, 0, 0);
1307  m_TreeView->SendMessageW(WM_SYSCOLORCHANGE, 0, 0);
1308  m_Toolbar->SendMessageW(WM_SYSCOLORCHANGE, 0, 0);
1310  }
1311  break;
1312 
1313  case WM_TIMER:
1314  if (wParam == SEARCH_TIMER_ID)
1315  {
1317  if (bSearchEnabled)
1319  }
1320  break;
1321  }
1322 
1323  return FALSE;
1324  }
1325 
1327  {
1328  switch (Link->msg)
1329  {
1330  case WM_LBUTTONUP:
1331  case WM_RBUTTONUP:
1332  {
1333  if (pLink) HeapFree(GetProcessHeap(), 0, pLink);
1334 
1336  (max(Link->chrg.cpMin, Link->chrg.cpMax) -
1337  min(Link->chrg.cpMin, Link->chrg.cpMax) + 1) * sizeof(WCHAR));
1338  if (!pLink)
1339  {
1340  /* TODO: Error message */
1341  return;
1342  }
1343 
1344  m_RichEdit->SendMessageW(EM_SETSEL, Link->chrg.cpMin, Link->chrg.cpMax);
1345  m_RichEdit->SendMessageW(EM_GETSELTEXT, 0, (LPARAM) pLink);
1346 
1347  ShowPopupMenu(m_RichEdit->m_hWnd, IDR_LINKMENU, -1);
1348  }
1349  break;
1350  }
1351  }
1352 
1354  {
1355  HTREEITEM hSelectedItem = m_TreeView->GetSelection();
1356  TV_ITEM tItem;
1357 
1358  tItem.mask = TVIF_PARAM | TVIF_HANDLE;
1359  tItem.hItem = hSelectedItem;
1360  m_TreeView->GetItem(&tItem);
1361  switch (tItem.lParam)
1362  {
1363  case IDS_INSTALLED:
1364  case IDS_APPLICATIONS:
1365  case IDS_UPDATES:
1366  return TRUE;
1367  default:
1368  return FALSE;
1369  }
1370  }
1371 
1373  {
1374  WORD wCommand = LOWORD(wParam);
1375 
1376  if (lParam == (LPARAM) m_SearchBar->m_hWnd)
1377  {
1378  ATL::CStringW szBuf;
1379 
1380  switch (HIWORD(wParam))
1381  {
1382  case EN_SETFOCUS:
1383  {
1384  ATL::CStringW szWndText;
1385 
1386  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1387  m_SearchBar->GetWindowTextW(szWndText);
1388  if (szBuf == szWndText)
1389  {
1391  m_SearchBar->SetWindowTextW(L"");
1392  }
1393  }
1394  break;
1395 
1396  case EN_KILLFOCUS:
1397  {
1398  m_SearchBar->GetWindowTextW(szBuf);
1399  if (szBuf.IsEmpty())
1400  {
1401  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1403  m_SearchBar->SetWindowTextW(szBuf.GetString());
1404  }
1405  }
1406  break;
1407 
1408  case EN_CHANGE:
1409  {
1410  ATL::CStringW szWndText;
1411 
1412  if (!bSearchEnabled)
1413  {
1414  bSearchEnabled = TRUE;
1415  break;
1416  }
1417 
1418  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1419  m_SearchBar->GetWindowTextW(szWndText);
1420  if (szBuf == szWndText)
1421  {
1423  }
1424  else
1425  {
1426  szSearchPattern = szWndText;
1427  }
1428 
1429  DWORD dwDelay;
1430  SystemParametersInfoW(SPI_GETMENUSHOWDELAY, 0, &dwDelay, 0);
1431  SetTimer(SEARCH_TIMER_ID, dwDelay);
1432  }
1433  break;
1434  }
1435 
1436  return;
1437  }
1438 
1439  switch (wCommand)
1440  {
1441  case ID_OPEN_LINK:
1443  HeapFree(GetProcessHeap(), 0, pLink);
1444  break;
1445 
1446  case ID_COPY_LINK:
1448  HeapFree(GetProcessHeap(), 0, pLink);
1449  break;
1450 
1451  case ID_SETTINGS:
1453  break;
1454 
1455  case ID_EXIT:
1456  PostMessageW(WM_CLOSE, 0, 0);
1457  break;
1458 
1459  case ID_SEARCH:
1461  break;
1462 
1463  case ID_INSTALL:
1465  {
1466  if (nSelectedApps > 0)
1467  {
1471  }
1473  {
1475  }
1476 
1477  }
1478  break;
1479 
1480  case ID_UNINSTALL:
1481  if (UninstallApplication(-1, FALSE))
1483  break;
1484 
1485  case ID_MODIFY:
1486  if (UninstallApplication(-1, TRUE))
1488  break;
1489 
1490  case ID_REGREMOVE:
1492  break;
1493 
1494  case ID_REFRESH:
1496  break;
1497 
1498  case ID_RESETDB:
1501  break;
1502 
1503  case ID_HELP:
1504  MessageBoxW(L"Help not implemented yet", NULL, MB_OK);
1505  break;
1506 
1507  case ID_ABOUT:
1508  ShowAboutDialog();
1509  break;
1510 
1511  case ID_CHECK_ALL:
1512  m_ListView->CheckAll();
1513  break;
1514  }
1515  }
1516 
1518  {
1519  INT Count = m_ListView->GetItemCount() - 1;
1521 
1522  while (Count >= 0)
1523  {
1525  if (Info)
1526  {
1527  RegCloseKey(Info->hSubKey);
1528  delete Info;
1529  }
1530  Count--;
1531  }
1532  }
1533 
1534  static BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
1535  {
1536  if (!*szNeedle)
1537  return TRUE;
1538  /* TODO: Improve pattern search beyond a simple case-insensitive substring search. */
1539  return StrStrIW(szHaystack, szNeedle) != NULL;
1540  }
1541 
1543  {
1544  PINSTALLED_INFO ItemInfo;
1546  INT Index;
1547 
1548  if (!SearchPatternMatch(m_szName.GetString(), szSearchPattern))
1549  {
1550  RegCloseKey(Info->hSubKey);
1551  return TRUE;
1552  }
1553 
1554  ItemInfo = new INSTALLED_INFO(*Info);
1555  if (!ItemInfo)
1556  {
1557  RegCloseKey(Info->hSubKey);
1558  return FALSE;
1559  }
1560 
1561  Index = ListViewAddItem(ItemIndex, 0, m_szName, (LPARAM) ItemInfo);
1562 
1563  /* Get version info */
1564  GetApplicationString(ItemInfo->hSubKey, L"DisplayVersion", szText);
1565  ListView_SetItemText(hListView, Index, 1, const_cast<LPWSTR>(szText.GetString()));
1566 
1567  /* Get comments */
1568  GetApplicationString(ItemInfo->hSubKey, L"Comments", szText);
1569  ListView_SetItemText(hListView, Index, 2, const_cast<LPWSTR>(szText.GetString()));
1570 
1571  return TRUE;
1572  }
1573 
1575  {
1576  INT Index;
1577  HICON hIcon = NULL;
1578 
1580 
1581  if (!SearchPatternMatch(Info->m_szName.GetString(), szSearchPattern) &&
1583  {
1584  return TRUE;
1585  }
1586 
1587  /* Load icon from file */
1588  ATL::CStringW szIconPath;
1589  szIconPath.Format(L"%lsicons\\%ls.ico", szFolderPath, Info->m_szName.GetString());
1590  hIcon = (HICON) LoadImageW(NULL,
1591  szIconPath.GetString(),
1592  IMAGE_ICON,
1595  LR_LOADFROMFILE);
1596 
1597  if (!hIcon || GetLastError() != ERROR_SUCCESS)
1598  {
1599  /* Load default icon */
1601  }
1602 
1603  Index = ImageList_AddIcon(hImageListView, hIcon);
1604  DestroyIcon(hIcon);
1605 
1606  Index = ListViewAddItem(Info->m_Category, Index, Info->m_szName.GetString(), (LPARAM) Info);
1607  ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL);
1608 
1609  ListView_SetItemText(hListView, Index, 1, const_cast<LPWSTR>(Info->m_szVersion.GetString()));
1610  ListView_SetItemText(hListView, Index, 2, const_cast<LPWSTR>(Info->m_szDesc.GetString()));
1611  ListView_SetCheckState(hListView, Index, Info->m_IsSelected);
1612 
1613  return TRUE;
1614  }
1615 
1617  {
1618  if (m_StatusBar)
1619  {
1620  ATL::CStringW szBuffer;
1621 
1623  m_StatusBar->SetText(szBuffer);
1624  }
1625  }
1626 
1628  {
1629  ATL::CStringW szBuffer1, szBuffer2;
1630  HIMAGELIST hImageListView;
1631  BOOL bWasInInstalled = IsInstalledEnum(SelectedEnumType);
1632 
1633  bUpdating = TRUE;
1635 
1636  if (EnumType < 0)
1637  {
1638  EnumType = SelectedEnumType;
1639  }
1640 
1641  //if previous one was INSTALLED purge the list
1642  //TODO: make the Installed category a separate class to avoid doing this
1643  if (bWasInInstalled)
1644  {
1646  }
1647 
1649 
1650  // Create new ImageList
1651  hImageListView = ImageList_Create(LISTVIEW_ICON_SIZE,
1654  0, 1);
1655  HIMAGELIST hImageListBuf = m_ListView->SetImageList(hImageListView, LVSIL_SMALL);
1656  if (hImageListBuf)
1657  {
1658  ImageList_Destroy(hImageListBuf);
1659  }
1660 
1661  if (IsInstalledEnum(EnumType))
1662  {
1663  if (!bWasInInstalled)
1664  {
1666  }
1667 
1669  ImageList_AddIcon(hImageListView, hIcon);
1670  DestroyIcon(hIcon);
1671 
1672  // Enum installed applications and updates
1675  }
1676  else if (IsAvailableEnum(EnumType))
1677  {
1678  if (bWasInInstalled)
1679  {
1681  }
1682 
1683  // Enum available applications
1685  }
1686 
1687  SelectedEnumType = EnumType;
1689  SetWelcomeText();
1690 
1691  // Set automatic column width for program names if the list is not empty
1692  if (m_ListView->GetItemCount() > 0)
1693  {
1695  }
1696 
1697  bUpdating = FALSE;
1699  }
1700 
1701 public:
1703  {
1704  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
1705  static ATL::CWndClassInfo wc =
1706  {
1707  {
1708  sizeof(WNDCLASSEX),
1709  csStyle,
1711  0,
1712  0,
1713  NULL,
1716  (HBRUSH) (COLOR_BTNFACE + 1),
1718  L"RAppsWnd",
1719  NULL
1720  },
1721  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
1722  };
1723  return wc;
1724  }
1725 
1727  {
1728  ATL::CStringW szWindowName;
1729  szWindowName.LoadStringW(IDS_APPTITLE);
1730 
1731  RECT r = {
1736  };
1737  r.right += r.left;
1738  r.bottom += r.top;
1739 
1741  }
1742 
1744  {
1745  return m_StatusBar;
1746  }
1747 
1749  {
1750  return m_ListView;
1751  }
1752 
1754  {
1755  return m_RichEdit;
1756  }
1757 
1759  {
1760  return &m_AvailableApps;
1761  }
1762 };
1763 
1764 // global interface
1766 
1768 {
1769  g_MainWindow = new CMainWindow();
1770  return g_MainWindow->Create();
1771 }
1772 
1774 {
1775  if (item < 0)
1776  {
1778  }
1780 }
1781 
1783 {
1785 }
1786 
1788 {
1789  return g_MainWindow->GetListView()->AddItem(ItemIndex, IconIndex, lpName, lParam);
1790 }
1791 
1793 {
1795 }
1796 
1798 {
1800 }
1801 
1803 {
1804  return g_MainWindow->GetAvailableApps();
1805 }
1806 
1807 // ATL version of functions above
1809 {
1810  SetStatusBarText(szText.GetString());
1811 }
1812 
1814 {
1815  return ListViewAddItem(ItemIndex, IconIndex, const_cast<LPWSTR>(Name.GetString()), lParam);
1816 }
1817 
1819 {
1820  NewRichEditText(szText.GetString(), flags);
1821 }
1822 
1824 {
1825  InsertRichEditText(szText.GetString(), flags);
1826 }
BOOL bIsAscending
Definition: gui.cpp:391
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define IDS_AINFO_VERSION
Definition: resource.h:150
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
DWORD GetMaxButtonsWidth() const
Definition: gui.cpp:375
HINSTANCE GetModuleInstance()
Definition: atlcore.h:198
VOID ShowPopupMenu(HWND hwnd, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:89
CUiSplitPanel * m_VSplitter
Definition: gui.cpp:728
DWORD_PTR GetItemData(int i)
Definition: rosctrls.h:191
#define IDI_UNINSTALL
Definition: resource.h:7
INT GetSystemColorDepth()
Definition: gui.cpp:31
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static INT CALLBACK s_CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: gui.cpp:518
#define ILC_COLOR16
Definition: commctrl.h:341
#define MAKEINTRESOURCE
Definition: winuser.h:591
DWORD_PTR ListViewGetlParam(INT item)
Definition: gui.cpp:1773
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
#define IDR_MAINMENU
Definition: resource.h:40
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
VOID OnGetDispInfo(LPTOOLTIPTEXT lpttt)
Definition: gui.cpp:269
#define max(a, b)
Definition: svc.c:63
static HICON
Definition: imagelist.c:84
int iImage
Definition: commctrl.h:2339
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define TRUE
Definition: types.h:120
HWND SetFocus()
Definition: atlwin.h:1130
#define ID_REFRESH
Definition: resource.h:18
#define IMAGE_ICON
Definition: winuser.h:212
INT nLastHeaderID
Definition: gui.cpp:394
#define IDC_STATUSBAR
Definition: resource.h:14
#define IDS_STATUS_INSTALLED
Definition: resource.h:181
#define ID_SETTINGS
Definition: resource.h:77
#define LVCF_WIDTH
Definition: commctrl.h:2559
BOOL InitControls()
Definition: gui.cpp:950
#define LVSIL_SMALL
Definition: commctrl.h:2271
#define SW_SHOWNOACTIVATE
Definition: winuser.h:768
CUiCollection & Second()
Definition: rosui.h:555
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT uNewState
Definition: commctrl.h:3008
#define INT_MAX
Definition: limits.h:40
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
Definition: commctrl.h:985
#define ID_REGREMOVE
Definition: resource.h:79
#define IDS_LANGUAGE_SINGLE
Definition: resource.h:199
#define LVCF_TEXT
Definition: commctrl.h:2560
VOID ShowButtonCaption()
Definition: gui.cpp:369
#define IDS_APPTITLE
Definition: resource.h:3
#define IDS_AINFO_AVAILABLEVERSION
Definition: resource.h:156
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2239
VOID SetStatusBarText(LPCWSTR szText)
Definition: gui.cpp:1782
int GetSelectionMark()
Definition: rosctrls.h:156
static BOOL CALLBACK s_EnumAvailableAppProc(CAvailableApplicationInfo *Info, LPCWSTR szFolderPath)
Definition: gui.cpp:1574
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
BOOL CreateStatusBar()
Definition: gui.cpp:813
static VOID InsertLicenseInfo_RichEdit(CAvailableApplicationInfo *Info)
Definition: gui.cpp:111
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SW_HIDE
Definition: winuser.h:762
#define IDS_CAT_DEVEL
Definition: resource.h:165
#define DWORD
Definition: msvc.h:34
#define IDS_SELECT_ALL
Definition: resource.h:110
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
_In_ BOOLEAN Create
Definition: pstypes.h:511
#define LR_LOADFROMFILE
Definition: winuser.h:1082
#define IDS_APPS_COUNT
Definition: resource.h:90
#define LVS_REPORT
Definition: commctrl.h:2234
CMainWindow * g_MainWindow
Definition: gui.cpp:1765
BOOL bUpdating
Definition: gui.cpp:746
VOID NewRichEditText(LPCWSTR szText, DWORD flags)
Definition: gui.cpp:1792
#define _countof(array)
Definition: fontsub.cpp:30
#define IDS_AINFO_LICENSE
Definition: resource.h:154
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:472
GLuint GLuint GLsizei count
Definition: gl.h:1545
BOOL CreateTreeView()
Definition: gui.cpp:833
#define LVN_ITEMCHANGED
Definition: commctrl.h:3103
#define IDS_AINFO_URLSITE
Definition: resource.h:153
INT Height
Definition: winmain.h:17
void SetRedraw(BOOL redraw)
Definition: rosctrls.h:27
#define LVCFMT_RIGHT
Definition: commctrl.h:2571
INT m_MinFirst
Definition: rosui.h:531
LPARAM lParam
Definition: commctrl.h:2430
#define CALLBACK
Definition: compat.h:27
_In_ LPCSTR lpName
Definition: winbase.h:2729
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
ATL::CSimpleArray< CAvailableApplicationInfo > GetCheckedItems()
Definition: gui.cpp:607
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2706
LONG top
Definition: windef.h:292
HANDLE HWND
Definition: compat.h:13
WORD dmDriverExtra
Definition: wingdi.h:1599
const INT m_Width
Definition: gui.cpp:695
#define IDS_TOOLTIP_EXIT
Definition: resource.h:122
VOID RemoveAppFromRegistry(INT Index)
Definition: installed.cpp:136
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
#define LVCFMT_LEFT
Definition: commctrl.h:2570
#define LPNMTREEVIEW
Definition: commctrl.h:3615
~CSideTreeView()
Definition: gui.cpp:685
HTREEITEM AddCategory(HTREEITEM hRootItem, UINT TextIndex, UINT IconIndex)
Definition: gui.cpp:652
#define IDS_CAT_OFFICE
Definition: resource.h:174
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#define ZeroMemory
Definition: winbase.h:1635
#define CS_HREDRAW
Definition: winuser.h:648
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:668
#define IDI_CAT_DEVEL
Definition: resource.h:20
#define IDI_CATEGORY
Definition: resource.h:13
#define HDF_SORTUP
Definition: commctrl.h:709
#define CFE_LINK
Definition: richedit.h:411
BOOL CreateHSplitter()
Definition: gui.cpp:879
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define BTNS_AUTOSIZE
Definition: commctrl.h:976
#define ID_RESETDB
Definition: resource.h:80
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:291
DWORD GetIdealSize(BOOL useHeight, LPSIZE size)
Definition: rosctrls.h:368
DWORD dmBitsPerPel
Definition: wingdi.h:1625
#define IDS_SEARCH_TEXT
Definition: resource.h:86
#define IDS_CAT_VIDEO
Definition: resource.h:178
int32_t INT_PTR
Definition: typedefs.h:62
int GetItemCount()
Definition: rosctrls.h:121
#define WS_CLIPCHILDREN
Definition: pedump.c:619
CSideTreeView()
Definition: gui.cpp:639
CAvailableApplicationInfo * GetSelectedData()
Definition: gui.cpp:626
VOID FreeLogs()
Definition: misc.cpp:247
LONG right
Definition: windef.h:293
CAvailableApps * GetAvailableApps()
Definition: gui.cpp:1758
#define IDS_CAT_FINANCE
Definition: resource.h:169
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
const INT m_Height
Definition: gui.cpp:696
DWORD SetButtonStructSize()
Definition: rosctrls.h:271
#define ID_UNINSTALL
Definition: resource.h:71
DWORD m_dButtonsWidthMax
Definition: gui.cpp:212
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:56
static int Link(const char **args)
Definition: vfdcmd.c:2414
static BOOL CALLBACK s_EnumInstalledAppProc(INT ItemIndex, ATL::CStringW &m_szName, PINSTALLED_INFO Info)
Definition: gui.cpp:1542
DWORD WINAPI GetSysColor(_In_ int)
WPARAM wParam
Definition: combotst.c:138
ATL::CStringW szSearchPattern
Definition: winmain.cpp:21
#define IDS_AVAILABLEFORINST
Definition: resource.h:95
#define IDR_APPLICATIONMENU
Definition: resource.h:66
struct TraceInfo Info
struct tagNMHDR * LPNMHDR
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
#define IDI_UPDATE_DB
Definition: resource.h:14
#define ILC_COLOR4
Definition: commctrl.h:339
#define IDS_INSTALLED
Definition: resource.h:94
#define LVFI_PARAM
Definition: commctrl.h:2408
BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: gui.cpp:1020
VOID ColumnClick(LPNMLISTVIEW pnmv)
Definition: gui.cpp:419
UINT_PTR WPARAM
Definition: windef.h:207
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:893
DWORD SetExtendedListViewStyle(DWORD dw, DWORD dwMask=0)
Definition: rosctrls.h:47
#define ILC_COLOR32
Definition: commctrl.h:343
#define CFE_BOLD
Definition: richedit.h:406
BOOL IsSelectedNodeInstalled()
Definition: gui.cpp:1353
#define IDI_CAT_ENGINEER
Definition: resource.h:23
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:417
#define LVIF_TEXT
Definition: commctrl.h:2281
#define LVCF_SUBITEM
Definition: commctrl.h:2561
ATL::CSimpleArray< CAvailableApplicationInfo > GetSelected() const
Definition: available.cpp:427
BOOL bSearchEnabled
Definition: gui.cpp:745
void SaveSettings(void)
Definition: settings.c:113
VOID InitApplicationsList()
Definition: gui.cpp:757
LPWSTR pLink
Definition: gui.cpp:741
VOID FreeInstalledAppList()
Definition: gui.cpp:1517
VOID OnSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
Definition: gui.cpp:967
#define IDS_INSTALL
Definition: resource.h:9
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
#define BTNS_BUTTON
Definition: commctrl.h:970
HWND Create(HWND hwndParent)
Definition: gui.cpp:305
#define EN_KILLFOCUS
Definition: winuser.h:1986
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define IDS_MODIFY
Definition: resource.h:89
#define EN_SETFOCUS
Definition: winuser.h:1988
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
BOOL CreateSearchBar()
Definition: gui.cpp:894
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:769
DWORD AddButtons(int count, TBBUTTON *buttons)
Definition: rosctrls.h:312
BOOL DeleteAllItems()
Definition: rosctrls.h:126
INT Append(T *ptr)
Definition: rosui.h:79
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:372
#define IDI_CAT_OFFICE
Definition: resource.h:29
#define ListView_GetImageList(hwnd, iImageList)
Definition: commctrl.h:2268
CStatusBar * GetStatusBar()
Definition: gui.cpp:1743
static const WCHAR szText[]
Definition: dialog.c:139
#define ListView_SetColumnWidth(hwnd, iCol, cx)
Definition: commctrl.h:2620
CRichEdit * GetRichEdit()
Definition: gui.cpp:1753
#define IDI_CAT_VIDEO
Definition: resource.h:33
const INT m_iToolbarHeight
Definition: gui.cpp:211
LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
Definition: string.c:384
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
HIMAGELIST hImageTreeView
Definition: gui.cpp:636
LONG_PTR LPARAM
Definition: windef.h:208
#define IDS_STATUS_UPDATE_AVAILABLE
Definition: resource.h:184
UINT_PTR SetTimer(UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
Definition: atlwin.h:1190
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HTREEITEM AddItem(HTREEITEM hParent, ATL::CStringW &Text, INT Image, INT SelectedImage, LPARAM lParam)
Definition: gui.cpp:647
#define HDI_FORMAT
Definition: commctrl.h:690
BOOL Expand(HTREEITEM item, DWORD action)
Definition: rosctrls.h:579
LPARAM lParam
Definition: commctrl.h:2340
#define ILC_COLOR
Definition: commctrl.h:337
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:238
#define Header_GetItem(hwndHD, i, phdi)
Definition: commctrl.h:736
#define LISTVIEW_ICON_SIZE
Definition: gui.cpp:26
#define TTN_GETDISPINFO
Definition: commctrl.h:1850
#define TB_ENABLEBUTTON
Definition: commctrl.h:1014
#define CW_USEDEFAULT
Definition: winuser.h:225
BOOL KillTimer(UINT_PTR nIDEvent)
Definition: atlwin.h:908
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:764
VOID FreeCachedEntries()
Definition: available.cpp:249
#define WM_SIZING
Definition: winuser.h:1783
virtual VOID OnLink(ENLINK *Link)
Definition: gui.cpp:1326
#define IDS_UNINSTALL
Definition: resource.h:88
CAppsListView()
Definition: gui.cpp:397
BOOL GetCheckState(INT item)
Definition: gui.cpp:561
#define TB_GETEXTENDEDSTYLE
Definition: commctrl.h:1163
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2276
#define LVS_SORTASCENDING
Definition: commctrl.h:2240
INT nSelectedApps
Definition: gui.cpp:743
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
BOOL GetItem(LV_ITEM *pitem)
Definition: rosctrls.h:106
VOID SetSelected(INT item, BOOL value)
Definition: gui.cpp:575
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:19
UINT uOldState
Definition: commctrl.h:3009
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2279
DWORD AutoSize()
Definition: rosctrls.h:358
#define IDS_SELECTEDFORINST
Definition: resource.h:113
BOOL IsAvailableEnum(INT x)
Definition: defines.h:63
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
#define ID_ABOUT
Definition: charmap.c:18
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
#define LVNI_FOCUSED
Definition: commctrl.h:2395
switch(r->id)
Definition: btrfs.c:2691
#define IDS_CAT_INTERNET
Definition: resource.h:172
#define LVIS_STATEIMAGEMASK
Definition: commctrl.h:2298
HIMAGELIST SetImageList(HIMAGELIST himl)
Definition: rosctrls.h:404
INT m_MinSecond
Definition: rosui.h:532
void GetItemText(int iItem, int iSubItem, LPTSTR pszText, int cchTextMax)
Definition: rosctrls.h:208
BOOL CreateToolbar()
Definition: gui.cpp:823
HIMAGELIST SetImageList()
Definition: gui.cpp:674
static BOOL ShowAvailableAppInfo(INT Index)
Definition: gui.cpp:189
#define b
Definition: ke_i.h:79
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: gui.cpp:1702
#define WM_DESTROY
Definition: winuser.h:1591
PVOID GetLParam(INT Index)
Definition: gui.cpp:457
WCHAR szSelectAll[MAX_STR_LEN]
Definition: gui.cpp:217
#define IDS_APP_DESCRIPTION
Definition: resource.h:128
WCHAR szModifyBtn[MAX_STR_LEN]
Definition: gui.cpp:216
#define IDS_CAT_DRIVERS
Definition: resource.h:166
HWND Create(HWND hwndParent, HMENU hMenu)
Definition: rosctrls.h:442
#define IDI_CAT_OTHER
Definition: resource.h:30
CUiSplitPanel * m_HSplitter
Definition: gui.cpp:729
BOOL SelectItem(HTREEITEM item, DWORD action=TVGN_CARET)
Definition: rosctrls.h:584
HWND Create(HWND hwndParent)
Definition: rosui.h:790
#define LPTOOLTIPTEXT
Definition: commctrl.h:1862
#define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
Definition: commctrl.h:2663
#define CS_VREDRAW
Definition: winuser.h:653
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define IDS_TOOLTIP_MODIFY
Definition: resource.h:119
HMENU GetMenu() const
Definition: atlwin.h:636
#define LPRECT
Definition: msvc.h:30
INT ListViewAddItem(INT ItemIndex, INT IconIndex, LPWSTR lpName, LPARAM lParam)
Definition: gui.cpp:1787
HWND GetWindow()
Definition: rosui.h:454
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define _T(x)
Definition: vfdio.h:22
VOID OnCommand(WPARAM wParam, LPARAM lParam)
Definition: gui.cpp:1372
static const TBBUTTON Buttons[]
Definition: mplay32.c:41
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
#define BTNS_SEP
Definition: commctrl.h:971
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
VOID AddImageToImageList(HIMAGELIST hImageList, UINT ImageIndex)
Definition: gui.cpp:219
VOID ShowAboutDialog()
Definition: aboutdlg.cpp:22
BOOL m_DynamicFirst
Definition: rosui.h:530
#define IDS_CAT_OTHER
Definition: resource.h:175
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
VOID SetCheckState(INT item, BOOL fCheck)
Definition: gui.cpp:566
#define WM_SIZE
Definition: winuser.h:1593
#define IDS_STATUS_NOTINSTALLED
Definition: resource.h:182
#define IDS_TOOLTIP_REFRESH
Definition: resource.h:50
BOOL bHasCheckboxes
Definition: gui.cpp:392
BOOL EnumInstalledApplications(INT EnumType, BOOL IsUserKey, APPENUMPROC lpEnumProc)
Definition: installed.cpp:173
#define ILC_COLOR24
Definition: commctrl.h:342
#define TVN_SELCHANGED
Definition: commctrl.h:3707
#define WM_TIMER
Definition: winuser.h:1718
LPWSTR pszText
Definition: commctrl.h:2337
BOOL CreateLayout()
Definition: gui.cpp:905
#define MF_ENABLED
Definition: winuser.h:128
#define WM_CLOSE
Definition: winuser.h:1603
#define INDEXTOSTATEIMAGEMASK(i)
Definition: commctrl.h:2300
#define IDS_AINFO_LANGUAGES
Definition: resource.h:157
WORD dmSize
Definition: wingdi.h:1598
BOOL AddColumn(INT Index, ATL::CStringW &Text, INT Width, INT Format)
Definition: gui.cpp:483
#define IDI_CAT_TOOLS
Definition: resource.h:32
#define IDI_CAT_EDU
Definition: resource.h:22
HWND Create(HWND hwndParent)
Definition: gui.cpp:707
PCXSTR GetString() const
Definition: atlsimpstr.h:361
#define EM_SETSEL
Definition: winuser.h:1979
CUiCollection & First()
Definition: rosui.h:554
#define LVIF_IMAGE
Definition: commctrl.h:2282
unsigned int UINT
Definition: ndis.h:50
static const UCHAR Index[8]
Definition: usbohci.c:18
LPWSTR pszText
Definition: commctrl.h:2539
#define LVS_SINGLESEL
Definition: commctrl.h:2238
unsigned short WORD
Definition: ntddk_ex.h:93
#define HDF_SORTDOWN
Definition: commctrl.h:710
VOID GetWindowTextW(ATL::CStringW &szText)
Definition: rosui.h:501
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ID_COPY_LINK
Definition: resource.h:76
#define IDI_CAT_INTERNET
Definition: resource.h:27
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
#define SIZE_MINIMIZED
Definition: winuser.h:2460
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:961
BOOL m_Horizontal
Definition: rosui.h:529
#define IDS_LANGUAGE_AVAILABLE_TRANSLATION
Definition: resource.h:196
UINT GetItemState(int i, UINT mask)
Definition: rosctrls.h:173
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:505
#define WM_RBUTTONUP
Definition: winuser.h:1756
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
BOOL IsInstalledEnum(INT x)
Definition: defines.h:68
#define ID_CHECK_ALL
Definition: resource.h:81
#define TVE_EXPAND
Definition: commctrl.h:3395
GLbitfield flags
Definition: glext.h:7161
#define TVI_ROOT
Definition: commctrl.h:3340
#define DEFAULT_GUI_FONT
Definition: wingdi.h:908
CUiWindow< CSearchBar > * m_SearchBar
Definition: gui.cpp:738
INT CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
Definition: gui.cpp:524
UINT mask
Definition: commctrl.h:2332
#define IDI_MODIFY
Definition: resource.h:9
static const WCHAR IconIndex[]
Definition: install.c:51
#define IDS_CAT_LIBS
Definition: resource.h:173
CUiWindow< CRichEdit > * m_RichEdit
Definition: gui.cpp:736
void AddItem(DWORD, DWORD, DWORD, DWORD, int)
Definition: toolspage.c:25
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: winproc.cpp:317
VOID InsertRichEditText(LPCWSTR szText, DWORD flags)
Definition: gui.cpp:1797
int InsertItem(const LV_ITEM *pitem)
Definition: rosctrls.h:96
WCHAR szInstallBtn[MAX_STR_LEN]
Definition: gui.cpp:214
VOID DestroyImageList()
Definition: gui.cpp:679
static const WCHAR L[]
Definition: oid.c:1250
#define IDS_TOOLTIP_UNINSTALL
Definition: resource.h:118
static BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
Definition: gui.cpp:1534
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)
#define LVS_EX_CHECKBOXES
Definition: commctrl.h:2703
#define CFE_ITALIC
Definition: richedit.h:407
BOOL Enum(INT EnumType, AVAILENUMPROC lpEnumProc)
Definition: available.cpp:323
#define IDI_MAIN
Definition: resource.h:4
#define SB_SETTEXT
Definition: commctrl.h:1921
HWND Create()
Definition: gui.cpp:1726
#define COLOR_BTNFACE
Definition: winuser.h:918
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22
VOID HideButtonCaption()
Definition: gui.cpp:363
VOID UpdateStatusBarText()
Definition: gui.cpp:1616
#define ILC_MASK
Definition: commctrl.h:336
static VOID InsertVersionInfo_RichEdit(CAvailableApplicationInfo *Info)
Definition: gui.cpp:85
static VOID SetImageList(HWND hwnd)
Definition: mplay32.c:238
#define IDS_CAT_SCIENCE
Definition: resource.h:176
static LRESULT CALLBACK StartWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1529
VOID InsertText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:72
HWND m_hWnd
Definition: atlwin.h:268
#define IDS_CAT_GRAPHICS
Definition: resource.h:171
HWND Create(HWND hwndParent)
Definition: crichedit.h:95
#define IDS_LICENSE_FREEWARE
Definition: resource.h:192
BOOL GetItem(TV_ITEM *pitem)
Definition: rosctrls.h:525
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
VOID CreateSettingsDlg(HWND hwnd)
#define WM_COMMAND
Definition: winuser.h:1716
#define IDS_CAT_AUDIO
Definition: resource.h:164
CAppsListView * lvw
Definition: gui.cpp:386
BOOL FindItem(int iStart, const LV_FINDINFO *plvfi)
Definition: rosctrls.h:116
HWND hwndFrom
Definition: winuser.h:3110
uint32_t DWORD_PTR
Definition: typedefs.h:63
HWND CreateMainWindow()
Definition: gui.cpp:1767
#define NM_CLICK
Definition: commctrl.h:130
static BOOL DownloadListOfApplications(const ATL::CSimpleArray< CAvailableApplicationInfo > &AppsList, BOOL bIsModal=FALSE)
Definition: loaddlg.cpp:930
#define IDI_EXIT
Definition: resource.h:5
CSearchBar()
Definition: gui.cpp:698
GLsizei const GLfloat * value
Definition: glext.h:6069
static BOOL ForceUpdateAppsDB()
Definition: available.cpp:317
CUiAlignment m_VerticalAlignment
Definition: rosui.h:239
static VOID InsertTextAfterLoaded_RichEdit(UINT uStringID, const ATL::CStringW &szText, DWORD StringFlags, DWORD TextFlags)
Definition: gui.cpp:60
#define IDS_AINFO_SIZE
Definition: resource.h:152
#define ID_EXIT
Definition: resource.h:10
VOID CopyTextToClipboard(LPCWSTR lpszText)
Definition: misc.cpp:49
#define IDS_CAT_EDU
Definition: resource.h:167
BOOL AddColumn(INT Index, LPWSTR lpText, INT Width, INT Format)
Definition: gui.cpp:488
#define TVIF_HANDLE
Definition: commctrl.h:3242
#define IDS_CAT_ENGINEER
Definition: resource.h:168
CAvailableApps m_AvailableApps
Definition: gui.cpp:739
#define IDS_APPLICATIONS
Definition: resource.h:97
#define IDS_LICENSE_TRIAL
Definition: resource.h:193
#define IDS_LANGUAGE_AVAILABLE_PLACEHOLDER
Definition: resource.h:201
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:155
#define GWL_STYLE
Definition: winuser.h:846
#define LVNI_ALL
Definition: commctrl.h:2394
bool IsEmpty() const
Definition: atlsimpstr.h:379
BOOL CreateListView()
Definition: gui.cpp:843
VOID SetText(LPCWSTR lpszText)
Definition: rosctrls.h:437
#define SEARCH_TIMER_ID
Definition: gui.cpp:25
INSTALLED_INFO * PINSTALLED_INFO
Definition: installed.h:13
INT m_Pos
Definition: rosui.h:528
#define TV_ITEM
Definition: commctrl.h:3272
#define LVCF_FMT
Definition: commctrl.h:2558
HWND hListView
Definition: gui.cpp:29
HTREEITEM AddCategory(HTREEITEM hRootItem, UINT TextIndex, UINT IconIndex)
Definition: gui.cpp:775
#define ID_SEARCH
Definition: resource.h:82
VOID UpdateApplicationsList(INT EnumType)
Definition: gui.cpp:1627
HINSTANCE hInst
Definition: dxdiag.c:13
HWND Create(HWND hwndParent)
Definition: gui.cpp:545
#define IDI_CAT_LIBS
Definition: resource.h:28
static ATOM item
Definition: dde.c:856
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1265
HIMAGELIST InitImageList()
Definition: gui.cpp:237
void SetItemState(int i, UINT state, UINT mask)
Definition: rosctrls.h:178
#define NM_DBLCLK
Definition: commctrl.h:131
#define ID_INSTALL
Definition: resource.h:70
#define LVSCW_AUTOSIZE
Definition: commctrl.h:2616
#define IDS_TOOLTIP_UPDATE_DB
Definition: resource.h:123
#define IDS_LANGUAGE_MORE_PLACEHOLDER
Definition: resource.h:200
CMainToolbar * m_Toolbar
Definition: gui.cpp:731
struct tagNMLISTVIEW * LPNMLISTVIEW
HICON hIcon
Definition: msconfig.c:44
#define IDI_CAT_GRAPHICS
Definition: resource.h:26
#define NM_RCLICK
Definition: commctrl.h:133
#define EN_LINK
Definition: richedit.h:202
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_LBUTTONUP
Definition: winuser.h:1753
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
#define IDS_TOOLTIP_SETTINGS
Definition: resource.h:120
#define IDI_INSTALL
Definition: resource.h:6
static BOOL DownloadApplication(CAvailableApplicationInfo *pAppInfo, BOOL bIsModal=FALSE)
Definition: loaddlg.cpp:947
#define IDI_CHECK_ALL
Definition: resource.h:15
struct @1565 Msg[]
#define list
Definition: rosglue.h:35
#define INT
Definition: msvc.h:26
HRESULT GetString(REFGUID guidKey, [out, size_is(cchBufSize)] LPWSTR pwszValue, UINT32 cchBufSize, [in, out, ptr] UINT32 *pcchLength)
CAppsListView * m_ListView
Definition: gui.cpp:732
#define min(a, b)
Definition: monoChain.cc:55
#define IDI_CAT_FINANCE
Definition: resource.h:24
#define IDS_UPDATES
Definition: resource.h:96
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: winproc.cpp:385
#define IDI_CAT_DRIVERS
Definition: resource.h:21
#define IDR_LINKMENU
Definition: resource.h:65
#define MB_OK
Definition: winuser.h:784
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:197
BOOL GetApplicationString(HKEY hKey, LPCWSTR lpKeyName, LPWSTR szString)
Definition: installed.cpp:23
#define LVN_COLUMNCLICK
Definition: commctrl.h:3111
#define IDS_LANGUAGE_ENGLISH_TRANSLATION
Definition: resource.h:198
#define IDS_APP_NAME
Definition: resource.h:126
#define ID_OPEN_LINK
Definition: resource.h:75
#define IDS_LICENSE_OPENSOURCE
Definition: resource.h:191
CMainToolbar()
Definition: gui.cpp:265
CUiCollection & Children()
Definition: rosui.h:355
CAppsListView * GetListView()
Definition: gui.cpp:1748
#define WM_SETFONT
Definition: winuser.h:1632
#define MAX_STR_LEN
Definition: defines.h:33
CMainWindow()
Definition: gui.cpp:749
#define IDI_CAT_AUDIO
Definition: resource.h:19
UINT mask
Definition: commctrl.h:669
HWND Create(HWND hwndParent)
Definition: rosctrls.h:463
#define IDI_CAT_GAMES
Definition: resource.h:25
static VOID InsertLoadedTextNewl_RichEdit(UINT uStringID, DWORD StringFlags)
Definition: gui.cpp:73
#define IDC_ARROW
Definition: winuser.h:682
#define IDS_APP_INST_VERSION
Definition: resource.h:127
VOID CheckAll()
Definition: gui.cpp:598
#define ListView_SetCheckState(hwndLV, i, fCheck)
Definition: commctrl.h:2646
#define TVSIL_NORMAL
Definition: commctrl.h:3415
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define LVM_GETHEADER
Definition: commctrl.h:2622
#define IDS_CAT_TOOLS
Definition: resource.h:177
#define SendMessage
Definition: winuser.h:5709
#define LVIF_PARAM
Definition: commctrl.h:2283
#define TBSTATE_ENABLED
Definition: commctrl.h:946
#define WM_CREATE
Definition: winuser.h:1590
CAvailableApps * GetAvailableApps()
Definition: gui.cpp:1802
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2236
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
BOOL bSaveWndPos
Definition: winmain.h:7
#define HIWORD(l)
Definition: typedefs.h:246
VOID SetWelcomeText()
Definition: misc.cpp:75
#define TBSTYLE_EX_MIXEDBUTTONS
Definition: commctrl.h:984
#define ILC_COLOR8
Definition: commctrl.h:340
#define IDI_CAT_SCIENCE
Definition: resource.h:31
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
VOID InitCategoriesList()
Definition: gui.cpp:780
LONG bottom
Definition: windef.h:294
int InsertColumn(int iCol, LV_COLUMN *pcol)
Definition: rosctrls.h:52
INT SelectedEnumType
Definition: winmain.cpp:18
CAtlBaseModule _AtlBaseModule
Definition: atlbase.cpp:26
static VOID InsertLanguageInfo_RichEdit(CAvailableApplicationInfo *Info)
Definition: gui.cpp:134
HIMAGELIST SetImageList(HIMAGELIST himl, int iImageList)
Definition: rosctrls.h:91
#define LVS_NOSORTHEADER
Definition: commctrl.h:2257
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5585
#define TVIF_PARAM
Definition: commctrl.h:3240
#define GetWindowLongPtr
Definition: treelist.c:73
BOOL ShowInstalledAppInfo(INT Index)
Definition: installed.cpp:95
#define MF_GRAYED
Definition: winuser.h:129
INT AddItem(INT ItemIndex, INT IconIndex, LPWSTR lpText, LPARAM lParam)
Definition: gui.cpp:503
#define Header_SetItem(hwndHD, i, phdi)
Definition: commctrl.h:743
int Compare(_In_z_ PCXSTR psz) const
Definition: cstringt.h:605
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define LVIF_STATE
Definition: commctrl.h:2284
#define IDI_APPS
Definition: resource.h:11
LONG_PTR LRESULT
Definition: windef.h:209
CUiMargin m_Margin
Definition: rosui.h:236
BOOL CreateVSplitter()
Definition: gui.cpp:864
#define ID_HELP
Definition: resource.h:28
#define LVM_GETNEXTITEM
Definition: commctrl.h:2405
#define UINT
Definition: msvc.h:27
Arabic default style
Definition: afstyles.h:93
#define EM_GETSELTEXT
Definition: richedit.h:95
WCHAR szUninstallBtn[MAX_STR_LEN]
Definition: gui.cpp:215
#define ES_LEFT
Definition: pedump.c:664
#define WS_VISIBLE
Definition: pedump.c:620
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:151
BOOL CreateRichEdit()
Definition: gui.cpp:854
#define TREEVIEW_ICON_SIZE
Definition: gui.cpp:27
VOID SetText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:84
#define IDI_REFRESH
Definition: resource.h:10
VOID SetText(LPCWSTR lpszText)
Definition: gui.cpp:702
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define IDI_SETTINGS
Definition: resource.h:8
CUiPanel * m_ClientPanel
Definition: gui.cpp:727
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:403
#define IDS_CAT_GAMES
Definition: resource.h:170
#define TBSTYLE_LIST
Definition: commctrl.h:965
LPARAM lParam
Definition: combotst.c:139
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:477
#define IDI_SELECTEDFORINST
Definition: resource.h:16
#define SBT_NOBORDERS
Definition: commctrl.h:1943
#define ES_AUTOHSCROLL
Definition: pedump.c:672
#define LOWORD(l)
Definition: pedump.c:82
#define ID_MODIFY
Definition: resource.h:74
#define HeapFree(x, y, z)
Definition: compat.h:394
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
int fmt
Definition: commctrl.h:674
#define TBSTYLE_FLAT
Definition: commctrl.h:964
#define LVIS_FOCUSED
Definition: commctrl.h:2290
#define TB_SETEXTENDEDSTYLE
Definition: commctrl.h:1162
BOOL bHasAllChecked
Definition: gui.cpp:390
#define WM_NOTIFY
Definition: richedit.h:61
BOOL SortItems(PFNLVCOMPARE pfnCompare, PVOID lParam)
Definition: rosctrls.h:141
#define IDS_TOOLTIP_INSTALL
Definition: resource.h:117
VOID SetCheckboxesVisible(BOOL bIsVisible)
Definition: gui.cpp:405
char * Text
Definition: combotst.c:136
#define LPARAM
Definition: msvc.h:38
HTREEITEM GetSelection()
Definition: rosctrls.h:574
#define IDI_APPUPD
Definition: resource.h:12
BOOL UninstallApplication(INT Index, BOOL bModify)
Definition: installed.cpp:41
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char * Format
Definition: acpixf.h:1194
CSideTreeView * m_TreeView
Definition: gui.cpp:734
CUiWindow< CStatusBar > * m_StatusBar
Definition: gui.cpp:735
#define EN_CHANGE
Definition: winuser.h:1983