ReactOS  0.4.15-dev-5608-gafb953a
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  */
7 
8 #include "rapps.h"
9 #include "appview.h"
10 #include "gui.h"
11 #include <windowsx.h>
12 
13 
14  // **** CMainToolbar ****
15 
17 {
18  HICON hImage;
19 
20  if (!(hImage = (HICON)LoadImageW(hInst,
21  MAKEINTRESOURCE(ImageIndex),
22  IMAGE_ICON,
25  0)))
26  {
27  /* TODO: Error message */
28  }
29 
30  ImageList_AddIcon(hImageList, hImage);
31  DeleteObject(hImage);
32 }
33 
35 {
36  HIMAGELIST hImageList;
37 
38  /* Create the toolbar icon image list */
39  hImageList = ImageList_Create(m_iToolbarHeight,//GetSystemMetrics(SM_CXSMICON),
40  m_iToolbarHeight,//GetSystemMetrics(SM_CYSMICON),
42  1, 1);
43  if (!hImageList)
44  {
45  /* TODO: Error message */
46  return NULL;
47  }
48 
49  AddImageToImageList(hImageList, IDI_INSTALL);
51  AddImageToImageList(hImageList, IDI_MODIFY);
53  AddImageToImageList(hImageList, IDI_REFRESH);
55  AddImageToImageList(hImageList, IDI_SETTINGS);
56  AddImageToImageList(hImageList, IDI_EXIT);
57 
58  return hImageList;
59 }
60 
62  : m_iToolbarHeight(24)
63  , m_dButtonsWidthMax(0)
64 {
65  memset(szInstallBtn, 0, sizeof(szInstallBtn));
67  memset(szModifyBtn, 0, sizeof(szModifyBtn));
68  memset(szSelectAll, 0, sizeof(szSelectAll));
69  memset(szRefreshBtn, 0, sizeof(szRefreshBtn));
70  memset(szUpdateDbBtn, 0, sizeof(szUpdateDbBtn));
71 }
72 
74 {
75  UINT idButton = (UINT)lpttt->hdr.idFrom;
76 
77  switch (idButton)
78  {
79  case ID_EXIT:
80  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_EXIT);
81  break;
82 
83  case ID_INSTALL:
84  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_INSTALL);
85  break;
86 
87  case ID_UNINSTALL:
88  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UNINSTALL);
89  break;
90 
91  case ID_MODIFY:
92  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_MODIFY);
93  break;
94 
95  case ID_SETTINGS:
96  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_SETTINGS);
97  break;
98 
99  case ID_REFRESH:
100  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_REFRESH);
101  break;
102 
103  case ID_RESETDB:
104  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UPDATE_DB);
105  break;
106  }
107 }
108 
110 {
111  /* Create buttons */
112  TBBUTTON Buttons[] =
113  { /* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */
118  { -1, 0, TBSTATE_ENABLED, BTNS_SEP, { 0 }, 0, 0 },
121  };
122 
129 
132  0, 0, 0, 0,
133  hwndParent,
134  0, hInst, NULL);
135 
136  if (!m_hWnd)
137  {
138  /* TODO: Show error message */
139  return FALSE;
140  }
141 
144 
145  /* Set image list */
146  HIMAGELIST hImageList = InitImageList();
147 
148  if (!hImageList)
149  {
150  /* TODO: Show error message */
151  return FALSE;
152  }
153 
154  ImageList_Destroy(SetImageList(hImageList));
155 
157 
158  /* Remember ideal width to use as a max width of buttons */
159  SIZE size;
162 
163  return m_hWnd;
164 }
165 
167 {
168  DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
170 }
171 
173 {
174  DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
176 }
177 
179 {
180  return m_dButtonsWidthMax;
181 }
182 // **** CMainToolbar ****
183 
184 
185 // **** CSearchBar ****
186 
187 CSearchBar::CSearchBar() : m_Width(180), m_Height(22)
188 {
189 }
190 
192 {
194 }
195 
197 {
198  ATL::CStringW szBuf;
201  0, 0, m_Width, m_Height,
203  hInst, 0);
204 
206  szBuf.LoadStringW(IDS_SEARCH_TEXT);
207  SetWindowTextW(szBuf);
208  return m_hWnd;
209 }
210 // **** CSearchBar ****
211 
212 
213 // **** CComboBox ****
214 
215 CComboBox::CComboBox() : m_Width(80), m_Height(22)
216 {
217 }
218 
220 {
223  0, 0, m_Width, m_Height, hwndParent, NULL, 0,
224  NULL);
225 
227 
228  for (int i = 0; i < (int)_countof(m_TypeStringID); i++)
229  {
230  ATL::CStringW szBuf;
231  szBuf.LoadStringW(m_TypeStringID[i]);
233  }
234 
235  SendMessageW(CB_SETCURSEL, m_DefaultSelectType, 0); // select the first item
236 
237  return m_hWnd;
238 }
239 // **** CComboBox ****
240 
241 
242 // **** CAppRichEdit ****
243 
245  const ATL::CStringW &szText,
246  DWORD StringFlags,
247  DWORD TextFlags)
248 {
249  ATL::CStringW szLoadedText;
250  if (!szText.IsEmpty() && szLoadedText.LoadStringW(uStringID))
251  {
252  InsertText(szLoadedText, StringFlags);
253  InsertText(szText, TextFlags);
254  }
255 }
256 
258  DWORD StringFlags)
259 {
260  ATL::CStringW szLoadedText;
261  if (szLoadedText.LoadStringW(uStringID))
262  {
263  InsertText(L"\n", 0);
264  InsertText(szLoadedText, StringFlags);
265  InsertText(L"\n", 0);
266  }
267 }
268 
270 {
271  if (Info->IsInstalled())
272  {
273  if (Info->HasInstalledVersion())
274  {
275  if (Info->HasUpdate())
277  else
279 
280  LoadAndInsertText(IDS_AINFO_VERSION, Info->m_szInstalledVersion, CFE_BOLD, 0);
281  }
282  else
283  {
285  }
286  }
287  else
288  {
290  }
291 
293 }
294 
296 {
297  ATL::CStringW szLicense;
298  switch (Info->m_LicenseType)
299  {
300  case LICENSE_OPENSOURCE:
301  szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
302  break;
303  case LICENSE_FREEWARE:
304  szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
305  break;
306  case LICENSE_TRIAL:
307  szLicense.LoadStringW(IDS_LICENSE_TRIAL);
308  break;
309  default:
311  return;
312  }
313 
314  szLicense += L" (" + Info->m_szLicense + L")";
316 }
317 
319 {
320  if (!Info->HasLanguageInfo())
321  {
322  return;
323  }
324 
325  const INT nTranslations = Info->m_LanguageLCIDs.GetSize();
326  ATL::CStringW szLangInfo;
327  ATL::CStringW szLoadedTextAvailability;
328  ATL::CStringW szLoadedAInfoText;
329 
330  szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
331 
332  if (Info->HasNativeLanguage())
333  {
334  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
335  if (nTranslations > 1)
336  {
338  buf.LoadStringW(IDS_LANGUAGE_MORE_PLACEHOLDER);
339  szLangInfo.Format(buf, nTranslations - 1);
340  }
341  else
342  {
343  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
344  szLangInfo = L" (" + szLangInfo + L")";
345  }
346  }
347  else if (Info->HasEnglishLanguage())
348  {
349  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
350  if (nTranslations > 1)
351  {
354  szLangInfo.Format(buf, nTranslations - 1);
355  }
356  else
357  {
358  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
359  szLangInfo = L" (" + szLangInfo + L")";
360  }
361  }
362  else
363  {
364  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
365  }
366 
367  InsertText(szLoadedAInfoText, CFE_BOLD);
368  InsertText(szLoadedTextAvailability, NULL);
369  InsertText(szLangInfo, CFE_ITALIC);
370 }
371 
373 {
374  if (!Info) return FALSE;
375 
376  SetText(Info->m_szName, CFE_BOLD);
380 
386 
387  return TRUE;
388 }
389 
390 inline VOID CAppRichEdit::InsertTextWithString(UINT StringID, DWORD StringFlags, const ATL::CStringW &Text, DWORD TextFlags)
391 {
392  if (!Text.IsEmpty())
393  {
394  LoadAndInsertText(StringID, Text, StringFlags, TextFlags);
395  }
396 }
397 
399 {
400  if (!Info) return FALSE;
401 
402  SetText(Info->szDisplayName, CFE_BOLD);
403  InsertText(L"\n", 0);
404 
405  Info->EnsureDetailsLoaded();
406 
407  InsertTextWithString(IDS_INFO_VERSION, CFE_BOLD, Info->szDisplayVersion, 0);
412  InsertTextWithString(IDS_INFO_HELPPHONE, CFE_BOLD, Info->szHelpTelephone, 0);
419  InsertTextWithString(IDS_INFO_INSTLOCATION, CFE_BOLD, Info->szInstallLocation, 0);
420  InsertTextWithString(IDS_INFO_INSTALLSRC, CFE_BOLD, Info->szInstallSource, 0);
421  InsertTextWithString(IDS_INFO_UNINSTALLSTR, CFE_BOLD, Info->szUninstallString, 0);
423 
424  return TRUE;
425 }
426 
428 {
429  ATL::CStringW szText;
430 
431  szText.LoadStringW(IDS_WELCOME_TITLE);
432  SetText(szText, CFE_BOLD);
433 
434  szText.LoadStringW(IDS_WELCOME_TEXT);
435  InsertText(szText, 0);
436 
437  szText.LoadStringW(IDS_WELCOME_URL);
438  InsertText(szText, CFM_LINK);
439 }
440 // **** CAppRichEdit ****
441 
442 
444  pASYNCINET AsyncInet,
446  WPARAM wParam,
447  LPARAM lParam,
448  VOID *Extension
449 )
450 {
452  switch (Event)
453  {
454  case ASYNCINET_DATA:
457  break;
458  case ASYNCINET_COMPLETE:
459  CloseHandle(DownloadParam->hFile);
461  break;
462  case ASYNCINET_CANCELLED:
463  CloseHandle(DownloadParam->hFile);
465  break;
466  case ASYNCINET_ERROR:
467  CloseHandle(DownloadParam->hFile);
469  break;
470  default:
471  ATLASSERT(FALSE);
472  break;
473  }
474  return 0;
475 }
476 
477 
478 // **** CAppScrnshotPreview ****
479 
481 {
482  theResult = 0;
483  switch (Msg)
484  {
485  case WM_CREATE:
487  break;
488  case WM_SIZE:
489  {
491  {
493 
494  if (hBrokenImgIcon)
495  {
498  }
499  }
500  break;
501  }
503  {
506  AsyncInet = NULL;
507  switch (wParam)
508  {
509  case ERROR_SUCCESS:
510  if (ContentID == DownloadParam->ID)
511  {
512  DisplayFile(DownloadParam->DownloadFileName);
513  // send a message to trigger resizing
515  InvalidateRect(0, 0);
516  TempImagePath = DownloadParam->DownloadFileName; // record tmp file path in order to delete it when cleanup
517  }
518  else
519  {
520  // the picture downloaded is already outdated. delete it.
521  DeleteFileW(DownloadParam->DownloadFileName);
522  }
523  break;
524  case ERROR_CANCELLED:
525  DeleteFileW(DownloadParam->DownloadFileName);
526  break;
527  default:
528  DisplayFailed();
529  // send a message to trigger resizing
531  InvalidateRect(0, 0);
532  DeleteFileW(DownloadParam->DownloadFileName);
533  break;
534  }
535  delete DownloadParam;
536  break;
537  }
538  case WM_PAINT:
539  {
540  PAINTSTRUCT ps;
541  HDC hdc = BeginPaint(&ps);
542  CRect rect;
544 
545  PaintOnDC(hdc,
546  rect.Width(),
547  rect.Height(),
548  ps.fErase);
549 
550  EndPaint(&ps);
551  break;
552  }
553  case WM_PRINTCLIENT:
554  {
555  if (lParam & PRF_CHECKVISIBLE)
556  {
557  if (!IsWindowVisible()) break;
558  }
559  CRect rect;
561 
563  rect.Width(),
564  rect.Height(),
566  break;
567  }
568  case WM_ERASEBKGND:
569  {
570  return TRUE; // do not erase to avoid blinking
571  }
572  case WM_TIMER:
573  {
574  switch (wParam)
575  {
579  HDC hdc = GetDC();
580  CRect rect;
582 
583  PaintOnDC(hdc,
584  rect.Width(),
585  rect.Height(),
586  TRUE);
587  ReleaseDC(hdc);
588  }
589  break;
590  }
591  case WM_DESTROY:
592  {
596  break;
597  }
598  }
599  return FALSE;
600 }
601 
603 {
605  if (bLoadingTimerOn)
606  {
608  }
612 }
613 
615 {
619 }
620 
622 {
625  pImage = Bitmap::FromFile(lpszFileName, 0);
626  if (pImage->GetLastStatus() != Ok)
627  {
628  DisplayFailed();
629  return FALSE;
630  }
631  return TRUE;
632 }
633 
635 {
637 }
638 
640 {
641  // use an off screen dc to avoid blinking
645 
646  if (bDrawBkgnd)
647  {
648  HBRUSH hOldBrush = (HBRUSH)SelectObject(hdcMem, (HGDIOBJ)GetSysColorBrush(COLOR_BTNFACE));
649  PatBlt(hdcMem, 0, 0, width, height, PATCOPY);
650  SelectObject(hdcMem, hOldBrush);
651  }
652 
653  switch (ScrnshotPrevStauts)
654  {
655  case SCRNSHOT_PREV_EMPTY:
656  {
657 
658  }
659  break;
660 
662  {
663  Graphics graphics(hdcMem);
664  Color color(255, 0, 0);
665  SolidBrush dotBrush(Color(255, 100, 100, 100));
666 
668 
669  // Paint three dot
670  float DotWidth = GetLoadingDotWidth(width, height);
671  graphics.FillEllipse((Brush *)(&dotBrush),
672  (REAL)width / 2.0 - min(width, height) * 2.0 / 16.0 - DotWidth / 2.0,
674  DotWidth,
675  DotWidth);
676 
677  graphics.FillEllipse((Brush *)(&dotBrush),
678  (REAL)width / 2.0 - DotWidth / 2.0,
679  (REAL)height / 2.0 - GetFrameDotShift(LoadingAnimationFrame, width, height) - DotWidth / 2.0,
680  DotWidth,
681  DotWidth);
682 
683  graphics.FillEllipse((Brush *)(&dotBrush),
684  (REAL)width / 2.0 + min(width, height) * 2.0 / 16.0 - DotWidth / 2.0,
686  DotWidth,
687  DotWidth);
688  }
689  break;
690 
691  case SCRNSHOT_PREV_IMAGE:
692  {
693  if (pImage)
694  {
695  // always draw entire image inside the window.
696  Graphics graphics(hdcMem);
697  float ZoomRatio = min(((float)width / (float)pImage->GetWidth()), ((float)height / (float)pImage->GetHeight()));
698  float ZoomedImgWidth = ZoomRatio * (float)pImage->GetWidth();
699  float ZoomedImgHeight = ZoomRatio * (float)pImage->GetHeight();
700 
701  graphics.DrawImage(pImage,
702  ((float)width - ZoomedImgWidth) / 2.0, ((float)height - ZoomedImgHeight) / 2.0,
703  ZoomedImgWidth, ZoomedImgHeight);
704  }
705  }
706  break;
707 
709  {
711  (width - BrokenImgSize) / 2,
712  (height - BrokenImgSize) / 2,
716  NULL,
717  NULL,
718  DI_NORMAL | DI_COMPAT);
719  }
720  break;
721  }
722 
723  // copy the content form off-screen dc to hdc
724  BitBlt(hdc, 0, 0, width, height, hdcMem, 0, 0, SRCCOPY);
725  DeleteDC(hdcMem);
727 }
728 
730 {
731  return min(width, height) / 20.0;
732 }
733 
735 {
736  return min(width, height) *
737  (1.0 / 16.0) *
738  (2.0 / (2.0 - sqrt(3.0))) *
739  (max(sin((float)Frame * 2 * PI / (LOADING_ANIMATION_PERIOD * LOADING_ANIMATION_FPS)), sqrt(3.0) / 2.0) - sqrt(3.0) / 2.0);
740 }
741 
743 {
744  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
745  static ATL::CWndClassInfo wc =
746  {
747  {
748  sizeof(WNDCLASSEX),
749  csStyle,
751  0,
752  0,
753  NULL,
754  0,
756  (HBRUSH)(COLOR_BTNFACE + 1),
757  0,
758  L"RAppsScrnshotPreview",
759  NULL
760  },
761  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
762  };
763  return wc;
764 }
765 
767 {
768  RECT r = { 0,0,0,0 };
769 
770  return CWindowImpl::Create(hParent, r, L"", WS_CHILD | WS_VISIBLE);
771 }
772 
774 {
775  if (bLoadingTimerOn)
776  {
779  }
781  if (pImage)
782  {
783  delete pImage;
784  pImage = NULL;
785  }
786  if (AsyncInet)
787  {
789  }
790  if (!TempImagePath.IsEmpty())
791  {
794  }
795 }
796 
798 {
802 }
803 
805 {
808 
809  if (PathIsURLW(lpszLocation))
810  {
811  DisplayLoading();
812 
814  if (!DownloadParam) return FALSE;
815 
816  DownloadParam->hwndNotify = m_hWnd;
817  DownloadParam->ID = ID;
818  // generate a filename
820  PathAppendW(ScrnshotFolder.GetBuffer(MAX_PATH), L"screenshots");
821  ScrnshotFolder.ReleaseBuffer();
822 
823  if (!PathIsDirectoryW(ScrnshotFolder.GetString()))
824  {
825  CreateDirectoryW(ScrnshotFolder.GetString(), NULL);
826  }
827 
828  if (!GetTempFileNameW(ScrnshotFolder.GetString(), L"img",
829  0, DownloadParam->DownloadFileName.GetBuffer(MAX_PATH)))
830  {
831  DownloadParam->DownloadFileName.ReleaseBuffer();
832  delete DownloadParam;
833  DisplayFailed();
834  return FALSE;
835  }
836  DownloadParam->DownloadFileName.ReleaseBuffer();
837 
838  DownloadParam->hFile = CreateFileW(DownloadParam->DownloadFileName.GetString(),
840  if (DownloadParam->hFile == INVALID_HANDLE_VALUE)
841  {
842  delete DownloadParam;
843  DisplayFailed();
844  return FALSE;
845  }
846 
848  if (!AsyncInet)
849  {
850  CloseHandle(DownloadParam->hFile);
851  DeleteFileW(DownloadParam->DownloadFileName.GetBuffer());
852  delete DownloadParam;
853  DisplayFailed();
854  return FALSE;
855  }
856  return TRUE;
857  }
858  else
859  {
860  return DisplayFile(lpszLocation);
861  }
862 }
863 
864 int CAppScrnshotPreview::GetRequestedWidth(int Height) // calculate requested window width by given height
865 {
866  switch (ScrnshotPrevStauts)
867  {
868  case SCRNSHOT_PREV_EMPTY:
869  return 0;
871  return 200;
872  case SCRNSHOT_PREV_IMAGE:
873  if (pImage)
874  {
875  // return the width needed to display image inside the window.
876  // and always keep window w/h ratio inside [ 1/SCRNSHOT_MAX_ASPECT_RAT, SCRNSHOT_MAX_ASPECT_RAT ]
877  return (int)floor((float)Height *
879  }
880  return 0;
882  return 200;
883  default:
884  return 0;
885  }
886 }
887 
889 {
891 }
892 // **** CAppScrnshotPreview ****
893 
894 
895 // **** CAppInfoDisplay ****
896 
898 {
899  theResult = 0;
900  switch (message)
901  {
902  case WM_CREATE:
903  {
904  RichEdit = new CAppRichEdit();
905  RichEdit->Create(hwnd);
906 
909  break;
910  }
911  case WM_SIZE:
912  {
914  break;
915  }
917  {
918  ResizeChildren();
919  break;
920  }
921  case WM_COMMAND:
922  {
924  break;
925  }
926  case WM_NOTIFY:
927  {
928  NMHDR *NotifyHeader = (NMHDR *)lParam;
929  if (NotifyHeader->hwndFrom == RichEdit->m_hWnd)
930  {
931  switch (NotifyHeader->code)
932  {
933  case EN_LINK:
934  OnLink((ENLINK *)lParam);
935  break;
936  }
937  }
938  break;
939  }
940  }
941 
942  return FALSE;
943 }
944 
946 {
947  CRect rect;
949  ResizeChildren(rect.Width(), rect.Height());
950 }
951 
953 {
954  int ScrnshotWidth = ScrnshotPrev->GetRequestedWidth(Height);
955 
956  // make sure richedit always have room to display
957  ScrnshotWidth = min(ScrnshotWidth, Width - INFO_DISPLAY_PADDING - RICHEDIT_MIN_WIDTH);
958 
959  DWORD dwError = ERROR_SUCCESS;
960  HDWP hDwp = BeginDeferWindowPos(2);
961 
962  if (hDwp)
963  {
964  hDwp = ::DeferWindowPos(hDwp, ScrnshotPrev->m_hWnd, NULL,
965  0, 0, ScrnshotWidth, Height, 0);
966 
967  if (hDwp)
968  {
969  // hide the padding if scrnshot window width == 0
970  int RicheditPosX = ScrnshotWidth ? (ScrnshotWidth + INFO_DISPLAY_PADDING) : 0;
971 
972  hDwp = ::DeferWindowPos(hDwp, RichEdit->m_hWnd, NULL,
973  RicheditPosX, 0, Width - RicheditPosX, Height, 0);
974 
975  if (hDwp)
976  {
977  EndDeferWindowPos(hDwp);
978  }
979  else
980  {
981  dwError = GetLastError();
982  }
983  }
984  else
985  {
986  dwError = GetLastError();
987  }
988  }
989  else
990  {
991  dwError = GetLastError();
992  }
993 
994 
995 #if DBG
996  ATLASSERT(dwError == ERROR_SUCCESS);
997 #endif
998  UNREFERENCED_PARAMETER(dwError);
999 
1000  UpdateWindow();
1001 }
1002 
1004 {
1005  switch (Link->msg)
1006  {
1007  case WM_LBUTTONUP:
1008  case WM_RBUTTONUP:
1009  {
1010  if (pLink) HeapFree(GetProcessHeap(), 0, pLink);
1011 
1013  (max(Link->chrg.cpMin, Link->chrg.cpMax) -
1014  min(Link->chrg.cpMin, Link->chrg.cpMax) + 1) * sizeof(WCHAR));
1015  if (!pLink)
1016  {
1017  /* TODO: Error message */
1018  return;
1019  }
1020 
1021  RichEdit->SendMessageW(EM_SETSEL, Link->chrg.cpMin, Link->chrg.cpMax);
1022  RichEdit->SendMessageW(EM_GETSELTEXT, 0, (LPARAM)pLink);
1023 
1024  ShowPopupMenuEx(m_hWnd, m_hWnd, IDR_LINKMENU, -1);
1025  }
1026  break;
1027  }
1028 }
1029 
1031 {
1032  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
1033  static ATL::CWndClassInfo wc =
1034  {
1035  {
1036  sizeof(WNDCLASSEX),
1037  csStyle,
1038  StartWindowProc,
1039  0,
1040  0,
1041  NULL,
1042  NULL,
1043  NULL,
1044  (HBRUSH)(COLOR_BTNFACE + 1),
1045  NULL,
1046  L"RAppsAppInfo",
1047  NULL
1048  },
1049  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
1050  };
1051  return wc;
1052 }
1053 
1055 {
1056  RECT r = { 0,0,0,0 };
1057 
1059 }
1060 
1062 {
1063  ATL::CStringW ScrnshotLocation;
1064  if (Info->RetrieveScrnshot(0, ScrnshotLocation))
1065  {
1066  ScrnshotPrev->DisplayImage(ScrnshotLocation);
1067  }
1068  else
1069  {
1071  }
1072  ResizeChildren();
1074 }
1075 
1077 {
1079  ResizeChildren();
1081 }
1082 
1084 {
1086  ResizeChildren();
1088 }
1089 
1091 {
1092  WORD wCommand = LOWORD(wParam);
1093 
1094  switch (wCommand)
1095  {
1096  case ID_OPEN_LINK:
1097 
1098  ShellExecuteW(m_hWnd, L"open", pLink, NULL, NULL, SW_SHOWNOACTIVATE);
1099  HeapFree(GetProcessHeap(), 0, pLink);
1100  pLink = NULL;
1101  break;
1102 
1103  case ID_COPY_LINK:
1105  HeapFree(GetProcessHeap(), 0, pLink);
1106  pLink = NULL;
1107  break;
1108 
1109  }
1110 }
1111 
1113 {
1114  delete RichEdit;
1115  delete ScrnshotPrev;
1116 }
1117 // **** CAppInfoDisplay ****
1118 
1119 
1120 // **** CAppsListView ****
1121 
1123 {
1124 }
1125 
1127 {
1128  if (m_hImageListView)
1129  {
1131  }
1132 }
1133 
1134 LRESULT
1136 {
1137  LRESULT lRes = this->DefWindowProc(uMsg, wParam, lParam);
1138  if (!m_Watermark.IsEmpty())
1139  {
1140  RECT rc;
1141  GetClientRect(&rc);
1146  GetSysColor(COLOR_GRAYTEXT), 1, 1);
1147  SelectFont(HDC(wParam), oldFont);
1148  }
1149  return lRes;
1150 }
1151 
1153 {
1154  m_Watermark = Text;
1155 }
1156 
1157 
1159 {
1160  if (bIsVisible)
1161  {
1162  SetExtendedListViewStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
1163  }
1164  else
1165  {
1166  SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
1167  }
1168 
1169  bHasCheckboxes = bIsVisible;
1170 }
1171 
1173 {
1174  HWND hHeader;
1175  HDITEMW hColumn;
1176  INT nHeaderID = pnmv->iSubItem;
1177 
1179  return;
1180 
1181  hHeader = (HWND)SendMessage(LVM_GETHEADER, 0, 0);
1182  ZeroMemory(&hColumn, sizeof(hColumn));
1183 
1184  /* If the sorting column changed, remove the sorting style from the old column */
1185  if ((nLastHeaderID != -1) && (nLastHeaderID != nHeaderID))
1186  {
1187  bIsAscending = TRUE; // also reset sorting method to ascending
1188  hColumn.mask = HDI_FORMAT;
1189  Header_GetItem(hHeader, nLastHeaderID, &hColumn);
1190  hColumn.fmt &= ~(HDF_SORTUP | HDF_SORTDOWN);
1191  Header_SetItem(hHeader, nLastHeaderID, &hColumn);
1192  }
1193 
1194  /* Set the sorting style to the new column */
1195  hColumn.mask = HDI_FORMAT;
1196  Header_GetItem(hHeader, nHeaderID, &hColumn);
1197 
1198  hColumn.fmt &= ~(HDF_SORTDOWN | HDF_SORTUP);
1199  hColumn.fmt |= (bIsAscending ? HDF_SORTUP : HDF_SORTDOWN);
1200  Header_SetItem(hHeader, nHeaderID, &hColumn);
1201 
1202  /* Sort the list, using the current values of nHeaderID and bIsAscending */
1203  SortContext ctx = { this, nHeaderID };
1204  SortItems(s_CompareFunc, &ctx);
1205 
1206  /* Save new values */
1207  nLastHeaderID = nHeaderID;
1209 }
1210 
1212 {
1213  return AddColumn(Index, const_cast<LPWSTR>(Text.GetString()), Width, Format);
1214 }
1215 
1217 {
1218  LVCOLUMNW Column;
1219 
1220  ZeroMemory(&Column, sizeof(Column));
1221 
1223  Column.iSubItem = Index;
1224  Column.pszText = lpText;
1225  Column.cx = Width;
1226  Column.fmt = Format;
1227 
1228  return SendMessage(LVM_INSERTCOLUMN, Index, (LPARAM)(&Column));
1229 }
1230 
1232 {
1234  return;
1235 }
1236 
1238 {
1239  LVITEMW Item;
1240 
1241  ZeroMemory(&Item, sizeof(Item));
1242 
1243  Item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE;
1244  Item.pszText = const_cast<LPWSTR>(lpText);
1245  Item.lParam = lParam;
1246  Item.iItem = ItemIndex;
1247  Item.iImage = IconIndex;
1248 
1249  if (IconIndex >= 0)
1250  {
1251  Item.iImage = IconIndex;
1252  Item.mask |= LVIF_IMAGE;
1253  }
1254  return InsertItem(&Item);
1255 }
1256 
1258 {
1259  return (HIMAGELIST)SendMessage(LVM_GETIMAGELIST, iImageList, 0);
1260 }
1261 
1263 {
1264  SortContext *ctx = ((SortContext *)lParamSort);
1265  return ctx->lvw->CompareFunc(lParam1, lParam2, ctx->iSubItem);
1266 }
1267 
1268 INT CAppsListView::CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
1269 {
1270  ATL::CStringW Item1, Item2;
1271  LVFINDINFOW IndexInfo;
1272  INT Index;
1273 
1274  IndexInfo.flags = LVFI_PARAM;
1275 
1276  IndexInfo.lParam = lParam1;
1277  Index = FindItem(-1, &IndexInfo);
1278  GetItemText(Index, iSubItem, Item1.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
1279  Item1.ReleaseBuffer();
1280 
1281  IndexInfo.lParam = lParam2;
1282  Index = FindItem(-1, &IndexInfo);
1283  GetItemText(Index, iSubItem, Item2.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
1284  Item2.ReleaseBuffer();
1285 
1286  return bIsAscending ? Item1.Compare(Item2) : Item2.Compare(Item1);
1287 }
1288 
1290 {
1291  RECT r = { 205, 28, 465, 250 };
1293 
1295 
1296  if (hwnd)
1297  {
1299  }
1300 
1304  0, 1);
1305 
1306  // currently, this two Imagelist is the same one.
1309 
1310 #pragma push_macro("SubclassWindow")
1311 #undef SubclassWindow
1312  m_hWnd = NULL;
1314 #pragma pop_macro("SubclassWindow")
1315 
1316  return hwnd;
1317 }
1318 
1320 {
1321  return (BOOL)(GetItemState(item, LVIS_STATEIMAGEMASK) >> 12) - 1;
1322 }
1323 
1325 {
1326  if (bHasCheckboxes)
1327  {
1328  SetItemState(item, INDEXTOSTATEIMAGEMASK((fCheck) ? 2 : 1), LVIS_STATEIMAGEMASK);
1329  }
1330 }
1331 
1333 {
1334  if (bHasCheckboxes)
1335  {
1336  if (CheckedItemCount == ItemCount)
1337  {
1338  // clear all
1339  SetCheckState(-1, FALSE);
1340  }
1341  else
1342  {
1343  // check all
1344  SetCheckState(-1, TRUE);
1345  }
1346  }
1347 }
1348 
1350 {
1351  INT item = GetSelectionMark();
1352  if (item == -1)
1353  {
1354  return (PVOID)0;
1355  }
1356  return (PVOID)GetItemData(item);
1357 }
1358 
1360 {
1361  if (!DeleteAllItems()) return FALSE;
1362  ApplicationViewType = AppType;
1363 
1364  bIsAscending = TRUE;
1365 
1366  ItemCount = 0;
1367  CheckedItemCount = 0;
1368 
1369  // delete old columns
1370  while (ColumnCount)
1371  {
1373  }
1374 
1376 
1377  // add new columns
1378  ATL::CStringW szText;
1379  switch (AppType)
1380  {
1382 
1383  /* Add columns to ListView */
1384  szText.LoadStringW(IDS_APP_NAME);
1385  AddColumn(ColumnCount++, szText, 250, LVCFMT_LEFT);
1386 
1387  szText.LoadStringW(IDS_APP_INST_VERSION);
1388  AddColumn(ColumnCount++, szText, 90, LVCFMT_RIGHT);
1389 
1390  szText.LoadStringW(IDS_APP_DESCRIPTION);
1391  AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
1392 
1393  // disable checkboxes
1395  break;
1396 
1398 
1399  /* Add columns to ListView */
1400  szText.LoadStringW(IDS_APP_NAME);
1401  AddColumn(ColumnCount++, szText, 250, LVCFMT_LEFT);
1402 
1403  szText.LoadStringW(IDS_APP_INST_VERSION);
1404  AddColumn(ColumnCount++, szText, 90, LVCFMT_RIGHT);
1405 
1406  szText.LoadStringW(IDS_APP_DESCRIPTION);
1407  AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
1408 
1409  // enable checkboxes
1411  break;
1412 
1413  case AppViewTypeEmpty:
1414  default:
1415  break;
1416  }
1417 
1418 
1419  return TRUE;
1420 }
1421 
1423 {
1424  return SendMessage(LVM_SETVIEW, (WPARAM)ViewMode, 0) == 1;
1425 }
1426 
1428 {
1430  {
1431  return FALSE;
1432  }
1433 
1434  /* Load icon from registry */
1435  HICON hIcon = NULL;
1436  ATL::CStringW szIconPath;
1437  if (InstAppInfo->RetrieveIcon(szIconPath))
1438  {
1439  PathParseIconLocationW((LPWSTR)szIconPath.GetString());
1440 
1441  /* Load only the 1st icon from the application executable,
1442  * because all apps provide the executables which have the main icon
1443  * as 1st in the index , so we don't need other icons here */
1445  szIconPath.GetString(),
1446  0);
1447  }
1448 
1449  if (!hIcon)
1450  {
1451  /* Load the default icon */
1453  }
1454 
1456  DestroyIcon(hIcon);
1457 
1458  int Index = AddItem(ItemCount, IconIndex, InstAppInfo->szDisplayName, (LPARAM)CallbackParam);
1459  SetItemText(Index, 1, InstAppInfo->szDisplayVersion.IsEmpty() ? L"---" : InstAppInfo->szDisplayVersion);
1460  SetItemText(Index, 2, InstAppInfo->szComments.IsEmpty() ? L"---" : InstAppInfo->szComments);
1461 
1462  ItemCount++;
1463  return TRUE;
1464 }
1465 
1467 {
1469  {
1470  return FALSE;
1471  }
1472 
1473  /* Load icon from file */
1474  HICON hIcon = NULL;
1475  ATL::CStringW szIconPath;
1476  if (AvlbAppInfo->RetrieveIcon(szIconPath))
1477  {
1479  szIconPath.GetString(),
1480  IMAGE_ICON,
1483  LR_LOADFROMFILE);
1484  }
1485 
1486  if (!hIcon || GetLastError() != ERROR_SUCCESS)
1487  {
1488  /* Load the default icon */
1490  }
1491 
1493  DestroyIcon(hIcon);
1494 
1495  int Index = AddItem(ItemCount, IconIndex, AvlbAppInfo->m_szName, (LPARAM)CallbackParam);
1496 
1497  if (InitCheckState)
1498  {
1500  }
1501 
1502  SetItemText(Index, 1, AvlbAppInfo->m_szVersion);
1503  SetItemText(Index, 2, AvlbAppInfo->m_szDesc);
1504 
1505  ItemCount++;
1506  return TRUE;
1507 }
1508 
1509 // this function is called when parent window receiving an notification about checkstate changing
1511 {
1512  if (bCheck)
1513  {
1514  CheckedItemCount++;
1515  }
1516  else
1517  {
1518  CheckedItemCount--;
1519  }
1520 }
1521 // **** CAppsListView ****
1522 
1523 
1524 // **** CApplicationView ****
1525 
1527 {
1528  theResult = 0;
1529  switch (message)
1530  {
1531  case WM_CREATE:
1532  {
1533  BOOL bSuccess = TRUE;
1534  m_Panel = new CUiPanel();
1537 
1538  bSuccess &= CreateToolbar();
1540  bSuccess &= CreateComboBox();
1542  bSuccess &= CreateListView();
1544 
1545  m_Toolbar->AutoSize();
1546 
1547  RECT rTop;
1548 
1549  ::GetWindowRect(m_Toolbar->m_hWnd, &rTop);
1550  m_HSplitter->m_Margin.top = rTop.bottom - rTop.top;
1551  if (!bSuccess)
1552  {
1553  return -1; // creation failure
1554  }
1555  }
1556  break;
1557 
1558  case WM_NOTIFY:
1559  {
1560  LPNMHDR pNotifyHeader = (LPNMHDR)lParam;
1561  if (pNotifyHeader->hwndFrom == m_ListView->GetWindow())
1562  {
1563  switch (pNotifyHeader->code)
1564  {
1565  case LVN_ITEMCHANGED:
1566  {
1568 
1569  /* Check if this is a valid item
1570  * (technically, it can be also an unselect) */
1571  INT ItemIndex = pnic->iItem;
1572  if (ItemIndex == -1 ||
1573  ItemIndex >= ListView_GetItemCount(pnic->hdr.hwndFrom))
1574  {
1575  break;
1576  }
1577 
1578  /* Check if the focus has been moved to another item */
1579  if ((pnic->uChanged & LVIF_STATE) &&
1580  (pnic->uNewState & LVIS_FOCUSED) &&
1581  !(pnic->uOldState & LVIS_FOCUSED))
1582  {
1583  ItemGetFocus((LPVOID)pnic->lParam);
1584  }
1585 
1586  /* Check if the item is checked/unchecked */
1587  if (pnic->uChanged & LVIF_STATE)
1588  {
1589  int iOldState = STATEIMAGETOINDEX(pnic->uOldState);
1590  int iNewState = STATEIMAGETOINDEX(pnic->uNewState);
1591 
1592  if (iOldState == STATEIMAGE_UNCHECKED && iNewState == STATEIMAGE_CHECKED)
1593  {
1594  // this item is just checked
1597  }
1598  else if (iOldState == STATEIMAGE_CHECKED && iNewState == STATEIMAGE_UNCHECKED)
1599  {
1600  // this item is just unchecked
1603  }
1604  }
1605  }
1606  break;
1607 
1608  case LVN_COLUMNCLICK:
1609  {
1611 
1612  m_ListView->ColumnClick(pnmv);
1613  }
1614  break;
1615 
1616  case NM_DBLCLK:
1617  {
1619  if (Item->iItem != -1)
1620  {
1621  /* this won't do anything if the program is already installed */
1622 
1624  {
1626  }
1627  }
1628  }
1629  break;
1630 
1631  case NM_RCLICK:
1632  {
1633  if (((LPNMLISTVIEW)lParam)->iItem != -1)
1634  {
1635  ShowPopupMenuEx(m_hWnd, m_hWnd, 0, ID_INSTALL);
1636  }
1637  }
1638  break;
1639  }
1640  }
1641  else if (pNotifyHeader->hwndFrom == m_Toolbar->GetWindow())
1642  {
1643  switch (pNotifyHeader->code)
1644  {
1645  case TTN_GETDISPINFO:
1647  break;
1648  }
1649  }
1650  }
1651  break;
1652 
1653  case WM_SYSCOLORCHANGE:
1654  {
1655  /* Forward WM_SYSCOLORCHANGE to common controls */
1656  m_ListView->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1658  m_Toolbar->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1659  m_ComboBox->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1660  }
1661  break;
1662 
1663  case WM_SIZE:
1664  {
1665  OnSize(hwnd, wParam, lParam);
1666  break;
1667  }
1668 
1669  case WM_COMMAND:
1670  {
1672  }
1673  break;
1674  }
1675  return FALSE;
1676 }
1677 
1679 {
1680  m_Toolbar = new CMainToolbar();
1684 
1685  return m_Toolbar->Create(m_hWnd) != NULL;
1686 }
1687 
1689 {
1693  m_SearchBar->m_Margin.top = 4;
1695 
1696  return m_SearchBar->Create(m_Toolbar->m_hWnd) != NULL;
1697 }
1698 
1700 {
1704  m_ComboBox->m_Margin.top = 4;
1705 
1706  return m_ComboBox->Create(m_Toolbar->m_hWnd) != NULL;
1707 }
1708 
1710 {
1711  m_HSplitter = new CUiSplitPanel();
1716  m_HSplitter->m_Pos = INT_MAX; //set INT_MAX to use lowest possible position (m_MinSecond)
1717  m_HSplitter->m_MinFirst = 10;
1718  m_HSplitter->m_MinSecond = 140;
1720 
1721  return m_HSplitter->Create(m_hWnd) != NULL;
1722 }
1723 
1725 {
1726  m_ListView = new CAppsListView();
1730 
1731  return m_ListView->Create(m_hWnd) != NULL;
1732 }
1733 
1735 {
1736  m_AppsInfo = new CAppInfoDisplay();
1740 
1741  return m_AppsInfo->Create(m_hWnd) != NULL;
1742 }
1743 
1745 {
1746  CWindow::SetRedraw(bRedraw);
1747  m_ListView->SetRedraw(bRedraw);
1748 }
1749 
1751 {
1752  m_SearchBar->SetFocus();
1753 }
1754 
1756 {
1757  if (wParam == SIZE_MINIMIZED)
1758  return;
1759 
1760  /* Size tool bar */
1761  m_Toolbar->AutoSize();
1762 
1763  /* Automatically hide captions */
1764  DWORD dToolbarTreshold = m_Toolbar->GetMaxButtonsWidth();
1765  DWORD dSearchbarMargin = (LOWORD(lParam) - m_SearchBar->m_Width - m_ComboBox->m_Width - TOOLBAR_PADDING * 2);
1766 
1767  if (dSearchbarMargin > dToolbarTreshold)
1768  {
1770  }
1771  else if (dSearchbarMargin < dToolbarTreshold)
1772  {
1774 
1775  }
1776 
1777  RECT r = { 0, 0, LOWORD(lParam), HIWORD(lParam) };
1778  HDWP hdwp = NULL;
1780 
1781  hdwp = BeginDeferWindowPos(count);
1782  if (hdwp)
1783  {
1784  hdwp = m_Panel->OnParentSize(r, hdwp);
1785  if (hdwp)
1786  {
1787  EndDeferWindowPos(hdwp);
1788  }
1789  }
1790 
1792  hdwp = BeginDeferWindowPos(count);
1793  if (hdwp)
1794  {
1795  hdwp = m_SearchBar->OnParentSize(r, hdwp);
1796  if (hdwp)
1797  {
1798  EndDeferWindowPos(hdwp);
1799  }
1800  }
1801 
1804  hdwp = BeginDeferWindowPos(count);
1805  if (hdwp)
1806  {
1807  hdwp = m_ComboBox->OnParentSize(r, hdwp);
1808  if (hdwp)
1809  {
1810  EndDeferWindowPos(hdwp);
1811  }
1812  }
1813 }
1814 
1816 {
1817  if (lParam)
1818  {
1819  if ((HWND)lParam == m_SearchBar->GetWindow())
1820  {
1821  ATL::CStringW szBuf;
1822  switch (HIWORD(wParam))
1823  {
1824  case EN_SETFOCUS:
1825  {
1826  ATL::CStringW szWndText;
1827 
1828  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1829  m_SearchBar->GetWindowTextW(szWndText);
1830  if (szBuf == szWndText)
1831  {
1832  m_SearchBar->SetWindowTextW(L"");
1833  }
1834  }
1835  break;
1836 
1837  case EN_KILLFOCUS:
1838  {
1839  m_SearchBar->GetWindowTextW(szBuf);
1840  if (szBuf.IsEmpty())
1841  {
1842  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1843  m_SearchBar->SetWindowTextW(szBuf.GetString());
1844  }
1845  }
1846  break;
1847 
1848  case EN_CHANGE:
1849  {
1850  ATL::CStringW szWndText;
1851 
1852  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1853  m_SearchBar->GetWindowTextW(szWndText);
1854  if (szBuf == szWndText)
1855  {
1856  szWndText = L"";
1857  m_MainWindow->SearchTextChanged(szWndText);
1858  }
1859  else
1860  {
1861  m_MainWindow->SearchTextChanged(szWndText);
1862  }
1863  }
1864  break;
1865  }
1866 
1867  return;
1868  }
1869  else if ((HWND)lParam == m_ComboBox->GetWindow())
1870  {
1871  int NotifyCode = HIWORD(wParam);
1872  switch (NotifyCode)
1873  {
1874  case CBN_SELCHANGE:
1875  int CurrSelection = m_ComboBox->SendMessageW(CB_GETCURSEL);
1876 
1877  int ViewModeList[] = { LV_VIEW_DETAILS, LV_VIEW_LIST, LV_VIEW_TILE };
1878  ATLASSERT(CurrSelection < (int)_countof(ViewModeList));
1879  if (!m_ListView->SetViewMode(ViewModeList[CurrSelection]))
1880  {
1881  MessageBoxW(L"View mode invalid or unimplemented");
1882  }
1883  break;
1884  }
1885 
1886  return;
1887  }
1888  else if ((HWND)lParam == m_Toolbar->GetWindow())
1889  {
1890  // the message is sent from Toolbar. fall down to continue process
1891  }
1892  else
1893  {
1894  return;
1895  }
1896  }
1897 
1898  // the LOWORD of wParam contains a Menu or Control ID
1899  WORD wCommand = LOWORD(wParam);
1900 
1901  switch (wCommand)
1902  {
1903  case ID_INSTALL:
1905  break;
1906 
1907  case ID_TOOLBAR_INSTALL:
1908  m_MainWindow->SendMessageW(WM_COMMAND, ID_INSTALL, 0);
1909  break;
1910 
1911  case ID_UNINSTALL:
1912  m_MainWindow->SendMessageW(WM_COMMAND, ID_UNINSTALL, 0);
1913  break;
1914 
1915  case ID_MODIFY:
1916  m_MainWindow->SendMessageW(WM_COMMAND, ID_MODIFY, 0);
1917  break;
1918 
1919  case ID_REGREMOVE:
1920  m_MainWindow->SendMessageW(WM_COMMAND, ID_REGREMOVE, 0);
1921  break;
1922 
1923  case ID_REFRESH:
1924  m_MainWindow->SendMessageW(WM_COMMAND, ID_REFRESH, 0);
1925  break;
1926 
1927  case ID_RESETDB:
1928  m_MainWindow->SendMessageW(WM_COMMAND, ID_RESETDB, 0);
1929  break;
1930  }
1931 }
1932 
1934  : m_MainWindow(MainWindow)
1935 {
1936 }
1937 
1939 {
1940  delete m_Toolbar;
1941  delete m_SearchBar;
1942  delete m_ListView;
1943  delete m_AppsInfo;
1944  delete m_HSplitter;
1945 }
1946 
1948 {
1949  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
1950  static ATL::CWndClassInfo wc =
1951  {
1952  {
1953  sizeof(WNDCLASSEX),
1954  csStyle,
1955  StartWindowProc,
1956  0,
1957  0,
1958  NULL,
1959  NULL,
1960  NULL,
1961  (HBRUSH)(COLOR_BTNFACE + 1),
1962  NULL,
1963  L"RAppsApplicationView",
1964  NULL
1965  },
1966  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
1967  };
1968  return wc;
1969 }
1970 
1972 {
1973  RECT r = { 0,0,0,0 };
1974 
1976 
1978 }
1979 
1981 {
1982  if (!m_ListView->SetDisplayAppType(AppType))
1983  {
1984  return FALSE;
1985  }
1986  ApplicationViewType = AppType;
1988 
1989  HMENU hMenu = ::GetMenu(m_hWnd);
1990  switch (AppType)
1991  {
1992  case AppViewTypeEmpty:
1993  default:
1998 
1999  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE);
2000  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE);
2001  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
2002  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE);
2003  break;
2004 
2010 
2011  // TODO: instead of disable these button, I would rather remove them.
2012  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE);
2013  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE);
2014  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
2015  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE);
2016  break;
2017 
2023 
2024  // TODO: instead of disable these button, I would rather remove them.
2025  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, FALSE);
2026  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, TRUE);
2027  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, FALSE);
2028  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, FALSE);
2029  break;
2030  }
2031  return TRUE;
2032 }
2033 
2035 {
2037  {
2038  return FALSE;
2039  }
2040  return m_ListView->AddInstalledApplication(InstAppInfo, param);
2041 }
2042 
2044 {
2046  {
2047  return FALSE;
2048  }
2049  return m_ListView->AddAvailableApplication(AvlbAppInfo, InitCheckState, param);
2050 }
2051 
2053 {
2055 }
2056 
2058 {
2059  m_ListView->CheckAll();
2060  return;
2061 }
2062 
2064 {
2065  return m_ListView->GetFocusedItemData();
2066 }
2067 
2069 {
2070  return m_ListView->GetItemCount();
2071 }
2072 
2074 {
2075  m_Toolbar->AppendTabOrderWindow(Direction, TabOrderList);
2076  m_ComboBox->AppendTabOrderWindow(Direction, TabOrderList);
2077  m_SearchBar->AppendTabOrderWindow(Direction, TabOrderList);
2078  m_ListView->AppendTabOrderWindow(Direction, TabOrderList);
2079  m_AppsInfo->AppendTabOrderWindow(Direction, TabOrderList);
2080 
2081  return;
2082 }
2083 
2084 // this function is called when a item of listview get focus.
2085 // CallbackParam is the param passed to listview when adding the item (the one getting focus now).
2087 {
2088  switch (ApplicationViewType)
2089  {
2091  return m_AppsInfo->ShowInstalledAppInfo((CInstalledApplicationInfo *)CallbackParam);
2092 
2094  return m_AppsInfo->ShowAvailableAppInfo((CAvailableApplicationInfo *)CallbackParam);
2095 
2096  case AppViewTypeEmpty:
2097  default:
2099  return FALSE;
2100  }
2101 }
2102 
2103 // this function is called when a item of listview is checked/unchecked
2104 // CallbackParam is the param passed to listview when adding the item (the one getting focus now).
2106 {
2107  m_MainWindow->ItemCheckStateChanged(bChecked, CallbackParam);
2108  return TRUE;
2109 }
2110 // **** CApplicationView ****
BOOL bIsAscending
Definition: appview.h:212
HGDIOBJ WINAPI GetStockObject(_In_ int)
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
#define IDS_AINFO_VERSION
Definition: resource.h:162
int GetLength() const
Definition: atlsimpstr.h:356
BOOL AddAvailableApplication(CAvailableApplicationInfo *AvlbAppInfo, BOOL InitCheckState, LPVOID CallbackParam)
Definition: appview.cpp:1466
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
DWORD GetMaxButtonsWidth() const
Definition: appview.cpp:178
_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:949
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
#define IDS_INFO_INSTALLDATE
Definition: resource.h:159
struct __ScrnshotDownloadParam ScrnshotDownloadParam
ASYNC_EVENT
Definition: asyncinet.h:5
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1722
int m_Width
Definition: appview.h:339
#define IDI_UNINSTALL
Definition: resource.h:7
#define IDS_INFO_PUBLISHER
Definition: resource.h:145
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: appview.cpp:1135
#define MAKEINTRESOURCE
Definition: winuser.h:591
GLint GLint GLsizei width
Definition: gl.h:1546
pASYNCINET AsyncInet
Definition: appview.h:133
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1616
VOID OnGetDispInfo(LPTOOLTIPTEXT lpttt)
Definition: appview.cpp:73
const UINT m_TypeStringID[3]
Definition: appview.h:333
#define max(a, b)
Definition: svc.c:63
Definition: tftpd.h:59
static HICON
Definition: imagelist.c:84
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL AddAvailableApplication(CAvailableApplicationInfo *AvlbAppInfo, BOOL InitCheckState, LPVOID param)
Definition: appview.cpp:2043
HWND SetFocus()
Definition: atlwin.h:1192
#define ID_REFRESH
Definition: resource.h:16
#define CloseHandle
Definition: compat.h:739
#define IMAGE_ICON
Definition: winuser.h:212
INT nLastHeaderID
Definition: appview.h:219
BOOL ShowInstalledAppInfo(CInstalledApplicationInfo *Info)
Definition: appview.cpp:398
#define IDS_STATUS_INSTALLED
Definition: resource.h:195
#define ID_SETTINGS
Definition: resource.h:81
#define LVCF_WIDTH
Definition: commctrl.h:2587
static Bitmap * FromFile(const WCHAR *filename, BOOL useEmbeddedColorManagement)
#define LVSIL_SMALL
Definition: commctrl.h:2299
#define SW_SHOWNOACTIVATE
Definition: winuser.h:768
_In_ ULONG NotifyCode
Definition: winddi.h:4265
CUiCollection & Second()
Definition: rosui.h:568
BOOL AddInstalledApplication(CInstalledApplicationInfo *InstAppInfo, LPVOID param)
Definition: appview.cpp:2034
#define ERROR_SUCCESS
Definition: deptool.c:10
VOID SetWatermark(const CStringW &Text)
Definition: appview.cpp:1152
UINT uNewState
Definition: commctrl.h:3036
#define INT_MAX
Definition: limits.h:40
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
Definition: commctrl.h:1013
CUiWindow< CSearchBar > * m_SearchBar
Definition: appview.h:354
BOOL CreateComboBox()
Definition: appview.cpp:1699
#define ID_REGREMOVE
Definition: resource.h:83
#define IDS_LANGUAGE_SINGLE
Definition: resource.h:213
#define LVCF_TEXT
Definition: commctrl.h:2588
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION Direction
#define GetStockFont(i)
Definition: windowsx.h:308
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
VOID ShowButtonCaption()
Definition: appview.cpp:172
#define LVM_GETIMAGELIST
Definition: commctrl.h:2295
#define IDS_AINFO_AVAILABLEVERSION
Definition: resource.h:168
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2267
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
CAppScrnshotPreview * ScrnshotPrev
Definition: appview.h:187
#define IDS_SELECT_ALL
Definition: resource.h:116
VOID ItemCheckStateNotify(int iItem, BOOL bCheck)
Definition: appview.cpp:1510
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define LISTVIEW_ICON_SIZE
Definition: appview.h:23
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:124
#define LR_LOADFROMFILE
Definition: winuser.h:1086
_In_ BOOLEAN Create
Definition: pstypes.h:527
SCRNSHOT_STATUS ScrnshotPrevStauts
Definition: appview.h:127
#define LVS_REPORT
Definition: commctrl.h:2262
#define IDS_AINFO_LICENSE
Definition: resource.h:166
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:476
VOID SetWatermark(const CStringW &Text)
Definition: appview.cpp:2052
GLuint GLuint GLsizei count
Definition: gl.h:1545
void DeleteColumn(INT Index)
Definition: appview.cpp:1231
#define IDS_INFO_INSTALLSRC
Definition: resource.h:156
BOOL ProcessWindowMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: appview.cpp:897
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
VOID InsertLicenseInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:295
#define IDS_AINFO_URLSITE
Definition: resource.h:165
#define LVCFMT_RIGHT
Definition: commctrl.h:2599
INT m_MinFirst
Definition: rosui.h:544
static HDC
Definition: imagelist.c:92
LPARAM lParam
Definition: commctrl.h:2458
#define CALLBACK
Definition: compat.h:35
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: appview.cpp:742
BOOL WINAPI UpdateWindow(_In_ HWND)
PVOID GetFocusedItemData()
Definition: appview.cpp:1349
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
BOOL SetViewMode(DWORD ViewMode)
Definition: appview.cpp:1422
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2734
LONG top
Definition: windef.h:307
#define DI_COMPAT
Definition: wingdi.h:68
HANDLE HWND
Definition: compat.h:19
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
const INT m_Width
Definition: appview.h:314
#define IDS_TOOLTIP_EXIT
Definition: resource.h:134
#define IDS_INFO_README
Definition: resource.h:148
#define IDS_WELCOME_TITLE
Definition: resource.h:96
#define IDS_WELCOME_TEXT
Definition: resource.h:97
#define LVCFMT_LEFT
Definition: commctrl.h:2598
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define ZeroMemory
Definition: winbase.h:1670
#define CS_HREDRAW
Definition: winuser.h:648
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
VOID SetWelcomeText()
Definition: appview.cpp:427
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:753
#define HDF_SORTUP
Definition: commctrl.h:724
#define STATEIMAGE_UNCHECKED
Definition: appview.h:65
#define CFE_LINK
Definition: richedit.h:411
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define BTNS_AUTOSIZE
Definition: commctrl.h:1004
UINT_PTR WPARAM
Definition: windef.h:207
HTREEITEM InsertItem(HWND hTree, LPCWSTR szName, HTREEITEM hParent, HTREEITEM hInsertAfter)
Definition: treeview.c:95
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
void EndPaint(LPPAINTSTRUCT lpPaint)
Definition: atlwin.h:523
#define ID_RESETDB
Definition: resource.h:84
#define WS_CHILD
Definition: pedump.c:617
_In_ HFONT _Out_ PUINT Height
Definition: font.h:124
HWND Create(HWND hParent)
Definition: appview.cpp:766
#define TIMER_LOADING_ANIMATION
Definition: appview.h:52
DWORD GetIdealSize(BOOL useHeight, LPSIZE size)
Definition: rosctrls.h:388
#define IDS_SEARCH_TEXT
Definition: resource.h:91
int32_t INT_PTR
Definition: typedefs.h:64
BOOL ProcessWindowMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: appview.cpp:1526
VOID SetStatus(SCRNSHOT_STATUS Status)
Definition: appview.cpp:634
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define ID_TOOLBAR_INSTALL
Definition: resource.h:87
LONG right
Definition: windef.h:308
#define DT_NOPREFIX
Definition: winuser.h:537
Status SetSmoothingMode(SmoothingMode smoothingMode)
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: appview.h:315
DWORD SetButtonStructSize()
Definition: rosctrls.h:286
#define ID_UNINSTALL
Definition: resource.h:75
DWORD m_dButtonsWidthMax
Definition: appview.h:282
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4306
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:58
VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: appview.cpp:2073
static BOOLEAN bSuccess
Definition: drive.cpp:433
#define CB_GETCURSEL
Definition: winuser.h:1933
static int Link(const char **args)
Definition: vfdcmd.c:2414
DWORD WINAPI GetSysColor(_In_ int)
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
#define LVS_SHAREIMAGELISTS
Definition: commctrl.h:2270
#define IDR_APPLICATIONMENU
Definition: resource.h:70
struct tagNMHDR * LPNMHDR
#define ImageList_RemoveAll(himl)
Definition: commctrl.h:556
struct Color Color
#define IDI_UPDATE_DB
Definition: resource.h:14
#define WM_PRINTCLIENT
Definition: richedit.h:70
UINT GetHeight()
#define LVFI_PARAM
Definition: commctrl.h:2436
BOOL SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
Definition: appview.cpp:1980
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
Definition: url.c:2432
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex)
Definition: shell32_main.c:875
VOID ColumnClick(LPNMLISTVIEW pnmv)
Definition: appview.cpp:1172
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
#define CFE_BOLD
Definition: richedit.h:406
BOOL InvalidateRect(LPCRECT lpRect, BOOL bErase=TRUE)
Definition: atlwin.h:896
#define IDS_INFO_COMMENTS
Definition: resource.h:154
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:421
#define LVIF_TEXT
Definition: commctrl.h:2309
#define LVCF_SUBITEM
Definition: commctrl.h:2589
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
#define LVM_INSERTCOLUMN
Definition: commctrl.h:2634
VOID OnCommand(WPARAM wParam, LPARAM lParam)
Definition: appview.cpp:1815
UINT code
Definition: winuser.h:3149
#define STATEIMAGETOINDEX(x)
Definition: appview.h:61
HWND Create(HWND hwndParent)
Definition: appview.cpp:1971
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
ATL::CStringW m_szDesc
Definition: available.h:51
#define IDS_INSTALL
Definition: resource.h:9
VOID PaintOnDC(HDC hdc, int width, int height, BOOL bDrawBkgnd)
Definition: appview.cpp:639
#define BTNS_BUTTON
Definition: commctrl.h:998
#define L(x)
Definition: ntvdm.h:50
HWND Create(HWND hwndParent)
Definition: appview.cpp:109
#define EN_KILLFOCUS
Definition: winuser.h:2015
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define IDS_MODIFY
Definition: resource.h:94
#define EN_SETFOCUS
Definition: winuser.h:2017
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
DWORD AddButtons(int count, TBBUTTON *buttons)
Definition: rosctrls.h:332
INT Append(T *ptr)
Definition: rosui.h:79
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:372
#define RICHEDIT_MIN_WIDTH
Definition: appview.h:35
#define FALSE
Definition: types.h:117
const INT m_iToolbarHeight
Definition: appview.h:281
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
VOID InsertLanguageInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:318
GLuint color
Definition: glext.h:6243
BOOL ItemGetFocus(LPVOID CallbackParam)
Definition: appview.cpp:2086
BOOL CreateHSplitter()
Definition: appview.cpp:1709
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
BOOL ShowInstalledAppInfo(CInstalledApplicationInfo *Info)
Definition: appview.cpp:1076
#define IDS_STATUS_UPDATE_AVAILABLE
Definition: resource.h:198
UINT_PTR SetTimer(UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
Definition: atlwin.h:1252
#define GENERIC_WRITE
Definition: nt_native.h:90
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define HDI_FORMAT
Definition: commctrl.h:705
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:535
CUiAlignment m_HorizontalAlignment
Definition: rosui.h:242
#define Header_GetItem(hwndHD, i, phdi)
Definition: commctrl.h:751
INT AddItem(INT ItemIndex, INT IconIndex, LPCWSTR lpText, LPARAM lParam)
Definition: appview.cpp:1237
void SetRedraw(BOOL bRedraw)
Definition: appview.cpp:1744
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
#define TTN_GETDISPINFO
Definition: commctrl.h:1878
#define TB_ENABLEBUTTON
Definition: commctrl.h:1042
BOOL KillTimer(UINT_PTR nIDEvent)
Definition: atlwin.h:970
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
#define CB_ADDSTRING
Definition: winuser.h:1926
#define IDS_UNINSTALL
Definition: resource.h:93
BOOL GetCheckState(INT item)
Definition: appview.cpp:1319
#define TB_GETEXTENDEDSTYLE
Definition: commctrl.h:1191
#define LVS_SORTASCENDING
Definition: commctrl.h:2268
VOID ResizeChildren()
Definition: appview.cpp:945
VOID OnLink(ENLINK *Link)
Definition: appview.cpp:1003
static HWND hwndParent
Definition: cryptui.c:300
float GetLoadingDotWidth(int width, int height)
Definition: appview.cpp:729
UINT uOldState
Definition: commctrl.h:3037
LONG_PTR LPARAM
Definition: windef.h:208
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
DWORD AutoSize()
Definition: rosctrls.h:378
#define IDS_INFO_CONTACT
Definition: resource.h:151
const int m_DefaultSelectType
Definition: appview.h:336
VOID InsertVersionInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:269
#define INFO_DISPLAY_PADDING
Definition: appview.h:32
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
switch(r->id)
Definition: btrfs.c:3046
#define LVIS_STATEIMAGEMASK
Definition: commctrl.h:2326
HIMAGELIST SetImageList(HIMAGELIST himl)
Definition: rosctrls.h:424
#define DT_VCENTER
Definition: winuser.h:543
INT m_MinSecond
Definition: rosui.h:545
#define WC_COMBOBOX
Definition: commctrl.h:4718
#define CBS_HASSTRINGS
Definition: winuser.h:285
static INT CALLBACK s_CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: appview.cpp:1262
SCRNSHOT_STATUS
Definition: appview.h:44
struct tagNMITEMACTIVATE * LPNMITEMACTIVATE
#define DefWindowProc
Definition: ros2win.h:31
BOOL InstallApplication(CAvailableApplicationInfo *Info)
Definition: gui.cpp:793
#define WM_DESTROY
Definition: winuser.h:1599
WCHAR szSelectAll[MAX_STR_LEN]
Definition: appview.h:287
#define IDS_APP_DESCRIPTION
Definition: resource.h:140
WCHAR szModifyBtn[MAX_STR_LEN]
Definition: appview.h:286
virtual VOID AppendTabOrderWindow(int Direction, ATL::CSimpleArray< HWND > &TabOrderList)
Definition: rosui.h:500
BOOL ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
Definition: appview.cpp:2105
#define LOADING_ANIMATION_PERIOD
Definition: appview.h:54
Status
Definition: gdiplustypes.h:24
HWND Create(HWND hwndParent)
Definition: rosui.h:803
BOOL SetDisplayAppType(APPLICATION_VIEW_TYPE AppType)
Definition: appview.cpp:1359
#define LPTOOLTIPTEXT
Definition: commctrl.h:1890
#define CS_VREDRAW
Definition: winuser.h:653
#define IDS_TOOLTIP_MODIFY
Definition: resource.h:131
int64_t LONGLONG
Definition: typedefs.h:68
LPWSTR pLink
Definition: appview.h:173
#define LV_VIEW_DETAILS
Definition: commctrl.h:2841
INT ColumnCount
Definition: appview.h:217
HWND GetWindow()
Definition: rosui.h:458
#define _T(x)
Definition: vfdio.h:22
static const TBBUTTON Buttons[]
Definition: mplay32.c:41
GLsizeiptr size
Definition: glext.h:5919
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WS_OVERLAPPED
Definition: pedump.c:615
#define GetProcessHeap()
Definition: compat.h:736
#define BTNS_SEP
Definition: commctrl.h:999
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
VOID AddImageToImageList(HIMAGELIST hImageList, UINT ImageIndex)
Definition: appview.cpp:16
#define PI
Definition: appview.h:58
BOOL m_DynamicFirst
Definition: rosui.h:543
static AvailableStrings m_Strings
Definition: available.h:112
#define PRF_ERASEBKGND
Definition: winuser.h:2516
HDC BeginPaint(LPPAINTSTRUCT lpPaint)
Definition: atlwin.h:297
__wchar_t WCHAR
Definition: xmlstorage.h:180
INT GetSystemColorDepth()
Definition: misc.cpp:367
VOID SetCheckState(INT item, BOOL fCheck)
Definition: appview.cpp:1324
HIMAGELIST m_hImageListView
Definition: appview.h:223
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:1997
#define WM_SIZE
Definition: winuser.h:1601
#define IDS_STATUS_NOTINSTALLED
Definition: resource.h:196
#define WM_RAPPS_DOWNLOAD_COMPLETE
Definition: appview.h:41
#define IDS_TOOLTIP_REFRESH
Definition: resource.h:48
BOOL bHasCheckboxes
Definition: appview.h:213
Status DrawImage(Image *image, const Point *destPoints, INT count)
_In_ WDFCOLLECTION _In_ ULONG Index
INT ItemCount
Definition: appview.h:215
ATL::CStringW m_szVersion
Definition: available.h:49
#define TOOLBAR_PADDING
Definition: appview.h:38
#define _countof(array)
Definition: sndvol32.h:68
#define WM_TIMER
Definition: winuser.h:1732
float GetFrameDotShift(int Frame, int width, int height)
Definition: appview.cpp:734
CApplicationView(CMainWindow *MainWindow)
Definition: appview.cpp:1933
#define MF_ENABLED
Definition: winuser.h:128
#define INDEXTOSTATEIMAGEMASK(i)
Definition: commctrl.h:2328
#define IDS_AINFO_LANGUAGES
Definition: resource.h:169
BOOL AddColumn(INT Index, ATL::CStringW &Text, INT Width, INT Format)
Definition: appview.cpp:1211
GLfloat param
Definition: glext.h:5796
#define MAX_PATH
Definition: compat.h:34
CStringW m_Watermark
Definition: appview.h:224
HWND Create(HWND hwndParent)
Definition: appview.cpp:196
PCXSTR GetString() const
Definition: atlsimpstr.h:361
#define EM_SETSEL
Definition: winuser.h:2008
CUiCollection & First()
Definition: rosui.h:567
#define LVIF_IMAGE
Definition: commctrl.h:2310
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
Definition: filename.c:84
LPWSTR pszText
Definition: commctrl.h:2567
BOOL DisplayFile(LPCWSTR lpszFileName)
Definition: appview.cpp:621
#define LVS_SINGLESEL
Definition: commctrl.h:2266
unsigned short WORD
Definition: ntddk_ex.h:93
#define HDF_SORTDOWN
Definition: commctrl.h:725
VOID GetWindowTextW(ATL::CStringW &szText)
Definition: rosui.h:514
unsigned long DWORD
Definition: ntddk_ex.h:95
#define InterlockedIncrement64(a)
Definition: btrfs_drv.h:143
#define ID_COPY_LINK
Definition: resource.h:80
BOOL RetrieveIcon(ATL::CStringW &IconLocation)
Definition: installed.cpp:199
#define IDS_INFO_VERSION
Definition: resource.h:143
LONGLONG ContentID
Definition: appview.h:134
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
#define SIZE_MINIMIZED
Definition: winuser.h:2496
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:989
#define PRF_CHECKVISIBLE
Definition: winuser.h:2513
BOOL m_Horizontal
Definition: rosui.h:542
#define IDS_LANGUAGE_AVAILABLE_TRANSLATION
Definition: resource.h:210
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:540
#define WM_RBUTTONUP
Definition: winuser.h:1770
int m_Height
Definition: appview.h:340
CAppsListView * m_ListView
Definition: appview.h:355
#define ID_CHECK_ALL
Definition: resource.h:85
#define DEFAULT_GUI_FONT
Definition: wingdi.h:909
pASYNCINET AsyncInetDownload(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, LPCWSTR lpszUrl, BOOL bAllowCache, ASYNCINET_CALLBACK Callback, VOID *Extension)
Definition: asyncinet.cpp:33
#define WM_PAINT
Definition: winuser.h:1610
BOOL CreateToolbar()
Definition: appview.cpp:1678
INT CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
Definition: appview.cpp:1268
WCHAR szRefreshBtn[MAX_STR_LEN]
Definition: appview.h:288
void SetFocusOnSearchBar()
Definition: appview.cpp:1750
#define IDI_MODIFY
Definition: resource.h:9
BOOL AsyncInetCancel(pASYNCINET AsyncInet)
Definition: asyncinet.cpp:126
static const WCHAR IconIndex[]
Definition: install.c:52
#define STATEIMAGE_CHECKED
Definition: appview.h:66
APPLICATION_VIEW_TYPE ApplicationViewType
Definition: appview.h:221
VOID SetWelcomeText()
Definition: appview.cpp:1083
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
WCHAR szUpdateDbBtn[MAX_STR_LEN]
Definition: appview.h:289
WCHAR szInstallBtn[MAX_STR_LEN]
Definition: appview.h:284
#define COLOR_GRAYTEXT
Definition: winuser.h:926
#define IDS_TOOLTIP_UNINSTALL
Definition: resource.h:130
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:2731
HDC hdc
Definition: main.c:9
#define CFE_ITALIC
Definition: richedit.h:407
#define IDI_MAIN
Definition: resource.h:4
#define SB_SETTEXT
Definition: commctrl.h:1949
#define COLOR_BTNFACE
Definition: winuser.h:922
ATL::CStringW TempImagePath
Definition: appview.h:135
VOID OnSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
Definition: appview.cpp:1755
VOID HideButtonCaption()
Definition: appview.cpp:166
#define ILC_MASK
Definition: commctrl.h:351
#define DI_NORMAL
Definition: wingdi.h:72
static VOID SetImageList(HWND hwnd)
Definition: mplay32.c:238
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: appview.cpp:1947
static LRESULT CALLBACK StartWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1613
VOID InsertText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:72
HWND m_hWnd
Definition: atlwin.h:267
#define LVSIL_NORMAL
Definition: commctrl.h:2298
HWND Create(HWND hwndParent)
Definition: crichedit.h:95
#define IDS_LICENSE_FREEWARE
Definition: resource.h:206
#define CB_SETCURSEL
Definition: winuser.h:1951
#define ID
Definition: ruserpass.c:36
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define CFM_LINK
Definition: richedit.h:337
#define WM_COMMAND
Definition: winuser.h:1730
ATL::CStringW m_szName
Definition: available.h:47
HWND hwndFrom
Definition: winuser.h:3147
#define IDI_EXIT
Definition: resource.h:5
UINT GetWidth()
#define IDS_INFO_UNINSTALLSTR
Definition: resource.h:157
CUiAlignment m_VerticalAlignment
Definition: rosui.h:243
#define LV_VIEW_TILE
Definition: commctrl.h:2844
int LoadingAnimationFrame
Definition: appview.h:131
#define IDS_AINFO_SIZE
Definition: resource.h:164
#define ID_EXIT
Definition: resource.h:10
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
VOID CopyTextToClipboard(LPCWSTR lpszText)
Definition: misc.cpp:18
#define SelectFont(hdc, hfont)
Definition: windowsx.h:516
#define BROKENIMG_ICON_SIZE
Definition: appview.h:26
int ReleaseDC(HDC hDC)
Definition: atlwin.h:1068
#define PATCOPY
Definition: wingdi.h:335
#define IDS_LICENSE_TRIAL
Definition: resource.h:207
#define IDS_LANGUAGE_AVAILABLE_PLACEHOLDER
Definition: resource.h:215
BOOL DisplayImage(LPCWSTR lpszLocation)
Definition: appview.cpp:804
int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
Definition: path.c:1092
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:167
#define IDS_INFO_UPDATEINFO
Definition: resource.h:152
#define GWL_STYLE
Definition: winuser.h:846
bool IsEmpty() const
Definition: atlsimpstr.h:379
HIMAGELIST GetImageList(int iImageList)
Definition: appview.cpp:1257
#define IDS_AINFO_PACKAGE_NAME
Definition: resource.h:173
Status GetLastStatus()
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL CreateAppInfoDisplay()
Definition: appview.cpp:1734
#define DT_SINGLELINE
Definition: winuser.h:540
INT m_Pos
Definition: rosui.h:541
#define LVCF_FMT
Definition: commctrl.h:2586
#define CREATE_ALWAYS
Definition: disk.h:72
BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT &theResult, DWORD dwMapId)
Definition: appview.cpp:480
HINSTANCE hInst
Definition: dxdiag.c:13
HWND Create(HWND hwndParent)
Definition: appview.cpp:1289
static ATOM item
Definition: dde.c:856
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
VOID AsyncInetRelease(pASYNCINET AsyncInet)
Definition: asyncinet.cpp:184
HIMAGELIST InitImageList()
Definition: appview.cpp:34
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 ERROR_CANCELLED
Definition: winerror.h:726
#define INTERNET_OPEN_TYPE_PRECONFIG
Definition: wininet.h:521
#define NM_DBLCLK
Definition: commctrl.h:131
VOID PreviousDisplayCleanup()
Definition: appview.cpp:773
#define ID_INSTALL
Definition: resource.h:74
BOOL WINAPI DeleteDC(_In_ HDC)
VOID LoadAndInsertText(UINT uStringID, const ATL::CStringW &szText, DWORD StringFlags, DWORD TextFlags)
Definition: appview.cpp:244
CMainWindow * m_MainWindow
Definition: appview.h:358
static float(__cdecl *square_half_float)(float x
#define IDS_LANGUAGE_MORE_PLACEHOLDER
Definition: resource.h:214
#define IDS_TOOLTIP_UPDATE_DB
Definition: resource.h:135
struct tagNMLISTVIEW * LPNMLISTVIEW
HICON hIcon
Definition: msconfig.c:44
BOOL CreateSearchBar()
Definition: appview.cpp:1688
#define LVM_SETVIEW
Definition: commctrl.h:2846
#define NM_RCLICK
Definition: commctrl.h:133
#define IDS_WELCOME_URL
Definition: resource.h:98
HWND Create(HWND hwndParent)
Definition: appview.cpp:1054
#define EN_LINK
Definition: richedit.h:202
#define IDS_INFO_PRODUCTID
Definition: resource.h:150
CUiSplitPanel * m_HSplitter
Definition: appview.h:357
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_LBUTTONUP
Definition: winuser.h:1767
BOOL AddInstalledApplication(CInstalledApplicationInfo *InstAppInfo, LPVOID CallbackParam)
Definition: appview.cpp:1427
#define IDS_TOOLTIP_SETTINGS
Definition: resource.h:132
#define IDI_INSTALL
Definition: resource.h:6
BOOL RetrieveIcon(ATL::CStringW &IconLocation) const
Definition: available.cpp:285
static ATL::CWndClassInfo & GetWndClassInfo()
Definition: appview.cpp:1030
#define IDI_CHECK_ALL
Definition: resource.h:15
#define IDS_INFO_HELPPHONE
Definition: resource.h:147
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define IDR_LINKMENU
Definition: resource.h:69
HWND Create(HWND hwndParent)
Definition: appview.cpp:219
BOOL CreateListView()
Definition: appview.cpp:1724
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:211
#define LVN_COLUMNCLICK
Definition: commctrl.h:3139
#define CBN_SELCHANGE
Definition: winuser.h:1969
#define IDS_LANGUAGE_ENGLISH_TRANSLATION
Definition: resource.h:212
#define IDS_APP_NAME
Definition: resource.h:138
#define ID_OPEN_LINK
Definition: resource.h:79
ATL::CStringW szAppsPath
Definition: available.h:33
#define IDS_LICENSE_OPENSOURCE
Definition: resource.h:205
CUiCollection & Children()
Definition: rosui.h:359
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
#define WM_SETFONT
Definition: winuser.h:1640
int ScrnshotDownloadCallback(pASYNCINET AsyncInet, ASYNC_EVENT Event, WPARAM wParam, LPARAM lParam, VOID *Extension)
Definition: appview.cpp:443
#define MAX_STR_LEN
Definition: defines.h:34
#define LV_VIEW_LIST
Definition: commctrl.h:2843
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define CreateFileW
Definition: compat.h:741
BOOL ShowAvailableAppInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:372
CAppRichEdit * RichEdit
Definition: appview.h:186
UINT mask
Definition: commctrl.h:684
#define IDC_ARROW
Definition: winuser.h:682
#define IDS_APP_INST_VERSION
Definition: resource.h:139
CONST void * LPCVOID
Definition: windef.h:191
VOID CheckAll()
Definition: appview.cpp:1332
Status FillEllipse(const Brush *brush, const Rect &rect)
APPLICATION_VIEW_TYPE ApplicationViewType
Definition: appview.h:359
#define LVM_DELETECOLUMN
Definition: commctrl.h:2638
#define LVM_GETHEADER
Definition: commctrl.h:2650
#define SendMessage
Definition: winuser.h:5833
BOOL SearchTextChanged(ATL::CStringW &SearchText)
Definition: gui.cpp:824
#define LVIF_PARAM
Definition: commctrl.h:2311
BOOL ShowAvailableAppInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:1061
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define WM_CREATE
Definition: winuser.h:1598
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2346
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define IDS_INFO_MODIFYPATH
Definition: resource.h:158
#define HIWORD(l)
Definition: typedefs.h:247
#define IDS_INFO_INSTLOCATION
Definition: resource.h:155
#define WM_RAPPS_RESIZE_CHILDREN
Definition: appview.h:42
#define TBSTYLE_EX_MIXEDBUTTONS
Definition: commctrl.h:1012
int GetRequestedWidth(int Height)
Definition: appview.cpp:864
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
LONG bottom
Definition: windef.h:309
#define DT_CENTER
Definition: winuser.h:527
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define LoadImage
Definition: winuser.h:5805
#define LVS_NOSORTHEADER
Definition: commctrl.h:2285
VOID ShowPopupMenuEx(HWND hwnd, HWND hwndOwner, UINT MenuID, UINT DefaultItem)
Definition: misc.cpp:44
HICON hBrokenImgIcon
Definition: appview.h:129
static HBITMAP
Definition: button.c:44
#define IDS_INFO_HELPLINK
Definition: resource.h:146
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5709
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
CWindow GetParent() const
Definition: atlwin.h:694
CMainToolbar * m_Toolbar
Definition: appview.h:352
#define GetWindowLongPtr
Definition: treelist.c:73
LPARAM lParam
Definition: commctrl.h:3040
#define WM_ERASEBKGND
Definition: winuser.h:1615
#define MF_GRAYED
Definition: winuser.h:129
#define Header_SetItem(hwndHD, i, phdi)
Definition: commctrl.h:758
int Compare(_In_z_ PCXSTR psz) const
Definition: cstringt.h:690
#define IDS_INFO_REGOWNER
Definition: resource.h:149
APPLICATION_VIEW_TYPE
Definition: appview.h:70
WCHAR * LPWSTR
Definition: xmlstorage.h:184
float REAL
Definition: types.h:41
#define LVIF_STATE
Definition: commctrl.h:2312
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
LONG_PTR LRESULT
Definition: windef.h:209
CUiMargin m_Margin
Definition: rosui.h:240
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
#define SCRNSHOT_MAX_ASPECT_RAT
Definition: appview.h:29
Arabic default style
Definition: afstyles.h:93
#define EM_GETSELTEXT
Definition: richedit.h:95
WCHAR szUninstallBtn[MAX_STR_LEN]
Definition: appview.h:285
#define ES_LEFT
Definition: pedump.c:664
#define WS_VISIBLE
Definition: pedump.c:620
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:163
VOID SetText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:84
#define memset(x, y, z)
Definition: compat.h:39
#define IDI_REFRESH
Definition: resource.h:10
HMENU WINAPI GetMenu(_In_ HWND)
VOID SetText(LPCWSTR lpszText)
Definition: appview.cpp:191
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define IDI_BROKEN_IMAGE
Definition: resource.h:17
#define IDI_SETTINGS
Definition: resource.h:8
struct @1595 Msg[]
virtual DWORD_PTR CountSizableChildren()
Definition: rosui.h:407
#define TBSTYLE_LIST
Definition: commctrl.h:993
static HBITMAP hBitmap
Definition: timezone.c:26
LPARAM lParam
Definition: combotst.c:139
virtual HDWP OnParentSize(RECT parentRect, HDWP hDwp)
Definition: rosui.h:481
#define SBT_NOBORDERS
Definition: commctrl.h:1971
#define ES_AUTOHSCROLL
Definition: pedump.c:672
#define LOWORD(l)
Definition: pedump.c:82
#define ID_MODIFY
Definition: resource.h:78
_Inout_opt_ PUNICODE_STRING Extension
Definition: fltkernel.h:1092
INT CheckedItemCount
Definition: appview.h:216
#define LOADING_ANIMATION_FPS
Definition: appview.h:55
#define HeapFree(x, y, z)
Definition: compat.h:735
PVOID GetFocusedItemData()
Definition: appview.cpp:2063
HDC GetDC()
Definition: atlwin.h:541
#define SRCCOPY
Definition: wingdi.h:333
int fmt
Definition: commctrl.h:689
#define TBSTYLE_FLAT
Definition: commctrl.h:992
CAppInfoDisplay * m_AppsInfo
Definition: appview.h:356
#define LVIS_FOCUSED
Definition: commctrl.h:2318
#define TB_SETEXTENDEDSTYLE
Definition: commctrl.h:1190
HDC hdcMem
Definition: welcome.c:104
VOID InsertTextWithString(UINT StringID, DWORD StringFlags, const ATL::CStringW &Text, DWORD TextFlags)
Definition: appview.cpp:390
CUiWindow< CComboBox > * m_ComboBox
Definition: appview.h:353
#define WM_NOTIFY
Definition: richedit.h:61
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
BOOL IsWindowVisible() const
Definition: atlwin.h:952
#define IDS_INFO_INFOABOUT
Definition: resource.h:153
#define IDS_TOOLTIP_INSTALL
Definition: resource.h:129
VOID SetCheckboxesVisible(BOOL bIsVisible)
Definition: appview.cpp:1158
char * Text
Definition: combotst.c:136
BOOL ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam)
Definition: gui.cpp:763
VOID OnCommand(WPARAM wParam, LPARAM lParam)
Definition: appview.cpp:1090
CUiPanel * m_Panel
Definition: appview.h:351
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
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:1220
#define EN_CHANGE
Definition: winuser.h:2012