ReactOS  0.4.15-dev-4594-g505ac65
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 }
70 
72 {
73  UINT idButton = (UINT)lpttt->hdr.idFrom;
74 
75  switch (idButton)
76  {
77  case ID_EXIT:
78  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_EXIT);
79  break;
80 
81  case ID_INSTALL:
82  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_INSTALL);
83  break;
84 
85  case ID_UNINSTALL:
86  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UNINSTALL);
87  break;
88 
89  case ID_MODIFY:
90  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_MODIFY);
91  break;
92 
93  case ID_SETTINGS:
94  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_SETTINGS);
95  break;
96 
97  case ID_REFRESH:
98  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_REFRESH);
99  break;
100 
101  case ID_RESETDB:
102  lpttt->lpszText = MAKEINTRESOURCEW(IDS_TOOLTIP_UPDATE_DB);
103  break;
104  }
105 }
106 
108 {
109  /* Create buttons */
110  TBBUTTON Buttons[] =
111  { /* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */
116  { -1, 0, TBSTATE_ENABLED, BTNS_SEP, { 0 }, 0, 0 },
117  { 4, ID_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, { 0 }, 0, 0 },
118  { 5, ID_RESETDB, TBSTATE_ENABLED, BTNS_BUTTON | BTNS_AUTOSIZE, { 0 }, 0, 0 }
119  };
120 
125 
128  0, 0, 0, 0,
129  hwndParent,
130  0, hInst, NULL);
131 
132  if (!m_hWnd)
133  {
134  /* TODO: Show error message */
135  return FALSE;
136  }
137 
140 
141  /* Set image list */
142  HIMAGELIST hImageList = InitImageList();
143 
144  if (!hImageList)
145  {
146  /* TODO: Show error message */
147  return FALSE;
148  }
149 
150  ImageList_Destroy(SetImageList(hImageList));
151 
153 
154  /* Remember ideal width to use as a max width of buttons */
155  SIZE size;
158 
159  return m_hWnd;
160 }
161 
163 {
164  DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
166 }
167 
169 {
170  DWORD dCurrentExStyle = (DWORD)SendMessageW(TB_GETEXTENDEDSTYLE, 0, 0);
172 }
173 
175 {
176  return m_dButtonsWidthMax;
177 }
178 // **** CMainToolbar ****
179 
180 
181 // **** CSearchBar ****
182 
183 CSearchBar::CSearchBar() : m_Width(180), m_Height(22)
184 {
185 }
186 
188 {
190 }
191 
193 {
194  ATL::CStringW szBuf;
197  0, 0, m_Width, m_Height,
199  hInst, 0);
200 
202  szBuf.LoadStringW(IDS_SEARCH_TEXT);
203  SetWindowTextW(szBuf);
204  return m_hWnd;
205 }
206 // **** CSearchBar ****
207 
208 
209 // **** CComboBox ****
210 
211 CComboBox::CComboBox() : m_Width(80), m_Height(22)
212 {
213 }
214 
216 {
219  0, 0, m_Width, m_Height, hwndParent, NULL, 0,
220  NULL);
221 
223 
224  for (int i = 0; i < (int)_countof(m_TypeStringID); i++)
225  {
226  ATL::CStringW szBuf;
227  szBuf.LoadStringW(m_TypeStringID[i]);
229  }
230 
231  SendMessageW(CB_SETCURSEL, m_DefaultSelectType, 0); // select the first item
232 
233  return m_hWnd;
234 }
235 // **** CComboBox ****
236 
237 
238 // **** CAppRichEdit ****
239 
241  const ATL::CStringW &szText,
242  DWORD StringFlags,
243  DWORD TextFlags)
244 {
245  ATL::CStringW szLoadedText;
246  if (!szText.IsEmpty() && szLoadedText.LoadStringW(uStringID))
247  {
248  InsertText(szLoadedText, StringFlags);
249  InsertText(szText, TextFlags);
250  }
251 }
252 
254  DWORD StringFlags)
255 {
256  ATL::CStringW szLoadedText;
257  if (szLoadedText.LoadStringW(uStringID))
258  {
259  InsertText(L"\n", 0);
260  InsertText(szLoadedText, StringFlags);
261  InsertText(L"\n", 0);
262  }
263 }
264 
266 {
267  if (Info->IsInstalled())
268  {
269  if (Info->HasInstalledVersion())
270  {
271  if (Info->HasUpdate())
273  else
275 
276  LoadAndInsertText(IDS_AINFO_VERSION, Info->m_szInstalledVersion, CFE_BOLD, 0);
277  }
278  else
279  {
281  }
282  }
283  else
284  {
286  }
287 
289 }
290 
292 {
293  ATL::CStringW szLicense;
294  switch (Info->m_LicenseType)
295  {
296  case LICENSE_OPENSOURCE:
297  szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
298  break;
299  case LICENSE_FREEWARE:
300  szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
301  break;
302  case LICENSE_TRIAL:
303  szLicense.LoadStringW(IDS_LICENSE_TRIAL);
304  break;
305  default:
307  return;
308  }
309 
310  szLicense += L" (" + Info->m_szLicense + L")";
312 }
313 
315 {
316  if (!Info->HasLanguageInfo())
317  {
318  return;
319  }
320 
321  const INT nTranslations = Info->m_LanguageLCIDs.GetSize();
322  ATL::CStringW szLangInfo;
323  ATL::CStringW szLoadedTextAvailability;
324  ATL::CStringW szLoadedAInfoText;
325 
326  szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
327 
328  if (Info->HasNativeLanguage())
329  {
330  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
331  if (nTranslations > 1)
332  {
334  buf.LoadStringW(IDS_LANGUAGE_MORE_PLACEHOLDER);
335  szLangInfo.Format(buf, nTranslations - 1);
336  }
337  else
338  {
339  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
340  szLangInfo = L" (" + szLangInfo + L")";
341  }
342  }
343  else if (Info->HasEnglishLanguage())
344  {
345  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
346  if (nTranslations > 1)
347  {
350  szLangInfo.Format(buf, nTranslations - 1);
351  }
352  else
353  {
354  szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
355  szLangInfo = L" (" + szLangInfo + L")";
356  }
357  }
358  else
359  {
360  szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
361  }
362 
363  InsertText(szLoadedAInfoText, CFE_BOLD);
364  InsertText(szLoadedTextAvailability, NULL);
365  InsertText(szLangInfo, CFE_ITALIC);
366 }
367 
369 {
370  if (!Info) return FALSE;
371 
372  SetText(Info->m_szName, CFE_BOLD);
376 
382 
383  return TRUE;
384 }
385 
386 inline VOID CAppRichEdit::InsertTextWithString(UINT StringID, DWORD StringFlags, const ATL::CStringW &Text, DWORD TextFlags)
387 {
388  if (!Text.IsEmpty())
389  {
390  LoadAndInsertText(StringID, Text, StringFlags, TextFlags);
391  }
392 }
393 
395 {
396  if (!Info) return FALSE;
397 
398  SetText(Info->szDisplayName, CFE_BOLD);
399  InsertText(L"\n", 0);
400 
401  Info->EnsureDetailsLoaded();
402 
403  InsertTextWithString(IDS_INFO_VERSION, CFE_BOLD, Info->szDisplayVersion, 0);
408  InsertTextWithString(IDS_INFO_HELPPHONE, CFE_BOLD, Info->szHelpTelephone, 0);
415  InsertTextWithString(IDS_INFO_INSTLOCATION, CFE_BOLD, Info->szInstallLocation, 0);
416  InsertTextWithString(IDS_INFO_INSTALLSRC, CFE_BOLD, Info->szInstallSource, 0);
417  InsertTextWithString(IDS_INFO_UNINSTALLSTR, CFE_BOLD, Info->szUninstallString, 0);
419 
420  return TRUE;
421 }
422 
424 {
425  ATL::CStringW szText;
426 
427  szText.LoadStringW(IDS_WELCOME_TITLE);
428  SetText(szText, CFE_BOLD);
429 
430  szText.LoadStringW(IDS_WELCOME_TEXT);
431  InsertText(szText, 0);
432 
433  szText.LoadStringW(IDS_WELCOME_URL);
434  InsertText(szText, CFM_LINK);
435 }
436 // **** CAppRichEdit ****
437 
438 
440  pASYNCINET AsyncInet,
442  WPARAM wParam,
443  LPARAM lParam,
444  VOID *Extension
445 )
446 {
448  switch (Event)
449  {
450  case ASYNCINET_DATA:
453  break;
454  case ASYNCINET_COMPLETE:
455  CloseHandle(DownloadParam->hFile);
457  break;
458  case ASYNCINET_CANCELLED:
459  CloseHandle(DownloadParam->hFile);
461  break;
462  case ASYNCINET_ERROR:
463  CloseHandle(DownloadParam->hFile);
465  break;
466  default:
467  ATLASSERT(FALSE);
468  break;
469  }
470  return 0;
471 }
472 
473 
474 // **** CAppScrnshotPreview ****
475 
477 {
478  theResult = 0;
479  switch (Msg)
480  {
481  case WM_CREATE:
483  break;
484  case WM_SIZE:
485  {
487  {
489 
490  if (hBrokenImgIcon)
491  {
494  }
495  }
496  break;
497  }
499  {
502  AsyncInet = NULL;
503  switch (wParam)
504  {
505  case ERROR_SUCCESS:
506  if (ContentID == DownloadParam->ID)
507  {
508  DisplayFile(DownloadParam->DownloadFileName);
509  // send a message to trigger resizing
511  InvalidateRect(0, 0);
512  TempImagePath = DownloadParam->DownloadFileName; // record tmp file path in order to delete it when cleanup
513  }
514  else
515  {
516  // the picture downloaded is already outdated. delete it.
517  DeleteFileW(DownloadParam->DownloadFileName);
518  }
519  break;
520  case ERROR_CANCELLED:
521  DeleteFileW(DownloadParam->DownloadFileName);
522  break;
523  default:
524  DisplayFailed();
525  // send a message to trigger resizing
527  InvalidateRect(0, 0);
528  DeleteFileW(DownloadParam->DownloadFileName);
529  break;
530  }
531  delete DownloadParam;
532  break;
533  }
534  case WM_PAINT:
535  {
536  PAINTSTRUCT ps;
537  HDC hdc = BeginPaint(&ps);
538  CRect rect;
540 
541  PaintOnDC(hdc,
542  rect.Width(),
543  rect.Height(),
544  ps.fErase);
545 
546  EndPaint(&ps);
547  break;
548  }
549  case WM_PRINTCLIENT:
550  {
551  if (lParam & PRF_CHECKVISIBLE)
552  {
553  if (!IsWindowVisible()) break;
554  }
555  CRect rect;
557 
559  rect.Width(),
560  rect.Height(),
562  break;
563  }
564  case WM_ERASEBKGND:
565  {
566  return TRUE; // do not erase to avoid blinking
567  }
568  case WM_TIMER:
569  {
570  switch (wParam)
571  {
575  HDC hdc = GetDC();
576  CRect rect;
578 
579  PaintOnDC(hdc,
580  rect.Width(),
581  rect.Height(),
582  TRUE);
583  ReleaseDC(hdc);
584  }
585  break;
586  }
587  case WM_DESTROY:
588  {
592  break;
593  }
594  }
595  return FALSE;
596 }
597 
599 {
601  if (bLoadingTimerOn)
602  {
604  }
608 }
609 
611 {
615 }
616 
618 {
621  pImage = Bitmap::FromFile(lpszFileName, 0);
622  if (pImage->GetLastStatus() != Ok)
623  {
624  DisplayFailed();
625  return FALSE;
626  }
627  return TRUE;
628 }
629 
631 {
633 }
634 
636 {
637  // use an off screen dc to avoid blinking
641 
642  if (bDrawBkgnd)
643  {
644  HBRUSH hOldBrush = (HBRUSH)SelectObject(hdcMem, (HGDIOBJ)GetSysColorBrush(COLOR_BTNFACE));
645  PatBlt(hdcMem, 0, 0, width, height, PATCOPY);
646  SelectObject(hdcMem, hOldBrush);
647  }
648 
649  switch (ScrnshotPrevStauts)
650  {
651  case SCRNSHOT_PREV_EMPTY:
652  {
653 
654  }
655  break;
656 
658  {
659  Graphics graphics(hdcMem);
660  Color color(255, 0, 0);
661  SolidBrush dotBrush(Color(255, 100, 100, 100));
662 
664 
665  // Paint three dot
666  float DotWidth = GetLoadingDotWidth(width, height);
667  graphics.FillEllipse((Brush *)(&dotBrush),
668  (REAL)width / 2.0 - min(width, height) * 2.0 / 16.0 - DotWidth / 2.0,
670  DotWidth,
671  DotWidth);
672 
673  graphics.FillEllipse((Brush *)(&dotBrush),
674  (REAL)width / 2.0 - DotWidth / 2.0,
675  (REAL)height / 2.0 - GetFrameDotShift(LoadingAnimationFrame, width, height) - DotWidth / 2.0,
676  DotWidth,
677  DotWidth);
678 
679  graphics.FillEllipse((Brush *)(&dotBrush),
680  (REAL)width / 2.0 + min(width, height) * 2.0 / 16.0 - DotWidth / 2.0,
682  DotWidth,
683  DotWidth);
684  }
685  break;
686 
687  case SCRNSHOT_PREV_IMAGE:
688  {
689  if (pImage)
690  {
691  // always draw entire image inside the window.
692  Graphics graphics(hdcMem);
693  float ZoomRatio = min(((float)width / (float)pImage->GetWidth()), ((float)height / (float)pImage->GetHeight()));
694  float ZoomedImgWidth = ZoomRatio * (float)pImage->GetWidth();
695  float ZoomedImgHeight = ZoomRatio * (float)pImage->GetHeight();
696 
697  graphics.DrawImage(pImage,
698  ((float)width - ZoomedImgWidth) / 2.0, ((float)height - ZoomedImgHeight) / 2.0,
699  ZoomedImgWidth, ZoomedImgHeight);
700  }
701  }
702  break;
703 
705  {
707  (width - BrokenImgSize) / 2,
708  (height - BrokenImgSize) / 2,
712  NULL,
713  NULL,
714  DI_NORMAL | DI_COMPAT);
715  }
716  break;
717  }
718 
719  // copy the content form off-screen dc to hdc
720  BitBlt(hdc, 0, 0, width, height, hdcMem, 0, 0, SRCCOPY);
721  DeleteDC(hdcMem);
723 }
724 
726 {
727  return min(width, height) / 20.0;
728 }
729 
731 {
732  return min(width, height) *
733  (1.0 / 16.0) *
734  (2.0 / (2.0 - sqrt(3.0))) *
735  (max(sin((float)Frame * 2 * PI / (LOADING_ANIMATION_PERIOD * LOADING_ANIMATION_FPS)), sqrt(3.0) / 2.0) - sqrt(3.0) / 2.0);
736 }
737 
739 {
740  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
741  static ATL::CWndClassInfo wc =
742  {
743  {
744  sizeof(WNDCLASSEX),
745  csStyle,
747  0,
748  0,
749  NULL,
750  0,
752  (HBRUSH)(COLOR_BTNFACE + 1),
753  0,
754  L"RAppsScrnshotPreview",
755  NULL
756  },
757  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
758  };
759  return wc;
760 }
761 
763 {
764  RECT r = { 0,0,0,0 };
765 
766  return CWindowImpl::Create(hParent, r, L"", WS_CHILD | WS_VISIBLE);
767 }
768 
770 {
771  if (bLoadingTimerOn)
772  {
775  }
777  if (pImage)
778  {
779  delete pImage;
780  pImage = NULL;
781  }
782  if (AsyncInet)
783  {
785  }
786  if (!TempImagePath.IsEmpty())
787  {
790  }
791 }
792 
794 {
798 }
799 
801 {
804 
805  if (PathIsURLW(lpszLocation))
806  {
807  DisplayLoading();
808 
810  if (!DownloadParam) return FALSE;
811 
812  DownloadParam->hwndNotify = m_hWnd;
813  DownloadParam->ID = ID;
814  // generate a filename
816  PathAppendW(ScrnshotFolder.GetBuffer(MAX_PATH), L"screenshots");
817  ScrnshotFolder.ReleaseBuffer();
818 
819  if (!PathIsDirectoryW(ScrnshotFolder.GetString()))
820  {
821  CreateDirectoryW(ScrnshotFolder.GetString(), NULL);
822  }
823 
824  if (!GetTempFileNameW(ScrnshotFolder.GetString(), L"img",
825  0, DownloadParam->DownloadFileName.GetBuffer(MAX_PATH)))
826  {
827  DownloadParam->DownloadFileName.ReleaseBuffer();
828  delete DownloadParam;
829  DisplayFailed();
830  return FALSE;
831  }
832  DownloadParam->DownloadFileName.ReleaseBuffer();
833 
834  DownloadParam->hFile = CreateFileW(DownloadParam->DownloadFileName.GetString(),
836  if (DownloadParam->hFile == INVALID_HANDLE_VALUE)
837  {
838  delete DownloadParam;
839  DisplayFailed();
840  return FALSE;
841  }
842 
844  if (!AsyncInet)
845  {
846  CloseHandle(DownloadParam->hFile);
847  DeleteFileW(DownloadParam->DownloadFileName.GetBuffer());
848  delete DownloadParam;
849  DisplayFailed();
850  return FALSE;
851  }
852  return TRUE;
853  }
854  else
855  {
856  return DisplayFile(lpszLocation);
857  }
858 }
859 
860 int CAppScrnshotPreview::GetRequestedWidth(int Height) // calculate requested window width by given height
861 {
862  switch (ScrnshotPrevStauts)
863  {
864  case SCRNSHOT_PREV_EMPTY:
865  return 0;
867  return 200;
868  case SCRNSHOT_PREV_IMAGE:
869  if (pImage)
870  {
871  // return the width needed to display image inside the window.
872  // and always keep window w/h ratio inside [ 1/SCRNSHOT_MAX_ASPECT_RAT, SCRNSHOT_MAX_ASPECT_RAT ]
873  return (int)floor((float)Height *
875  }
876  return 0;
878  return 200;
879  default:
880  return 0;
881  }
882 }
883 
885 {
887 }
888 // **** CAppScrnshotPreview ****
889 
890 
891 // **** CAppInfoDisplay ****
892 
894 {
895  theResult = 0;
896  switch (message)
897  {
898  case WM_CREATE:
899  {
900  RichEdit = new CAppRichEdit();
901  RichEdit->Create(hwnd);
902 
905  break;
906  }
907  case WM_SIZE:
908  {
910  break;
911  }
913  {
914  ResizeChildren();
915  break;
916  }
917  case WM_COMMAND:
918  {
920  break;
921  }
922  case WM_NOTIFY:
923  {
924  NMHDR *NotifyHeader = (NMHDR *)lParam;
925  if (NotifyHeader->hwndFrom == RichEdit->m_hWnd)
926  {
927  switch (NotifyHeader->code)
928  {
929  case EN_LINK:
930  OnLink((ENLINK *)lParam);
931  break;
932  }
933  }
934  break;
935  }
936  }
937 
938  return FALSE;
939 }
940 
942 {
943  CRect rect;
945  ResizeChildren(rect.Width(), rect.Height());
946 }
947 
949 {
950  int ScrnshotWidth = ScrnshotPrev->GetRequestedWidth(Height);
951 
952  // make sure richedit always have room to display
953  ScrnshotWidth = min(ScrnshotWidth, Width - INFO_DISPLAY_PADDING - RICHEDIT_MIN_WIDTH);
954 
955  DWORD dwError = ERROR_SUCCESS;
956  HDWP hDwp = BeginDeferWindowPos(2);
957 
958  if (hDwp)
959  {
960  hDwp = ::DeferWindowPos(hDwp, ScrnshotPrev->m_hWnd, NULL,
961  0, 0, ScrnshotWidth, Height, 0);
962 
963  if (hDwp)
964  {
965  // hide the padding if scrnshot window width == 0
966  int RicheditPosX = ScrnshotWidth ? (ScrnshotWidth + INFO_DISPLAY_PADDING) : 0;
967 
968  hDwp = ::DeferWindowPos(hDwp, RichEdit->m_hWnd, NULL,
969  RicheditPosX, 0, Width - RicheditPosX, Height, 0);
970 
971  if (hDwp)
972  {
973  EndDeferWindowPos(hDwp);
974  }
975  else
976  {
977  dwError = GetLastError();
978  }
979  }
980  else
981  {
982  dwError = GetLastError();
983  }
984  }
985  else
986  {
987  dwError = GetLastError();
988  }
989 
990 
991 #if DBG
992  ATLASSERT(dwError == ERROR_SUCCESS);
993 #endif
994  UNREFERENCED_PARAMETER(dwError);
995 
996  UpdateWindow();
997 }
998 
1000 {
1001  switch (Link->msg)
1002  {
1003  case WM_LBUTTONUP:
1004  case WM_RBUTTONUP:
1005  {
1006  if (pLink) HeapFree(GetProcessHeap(), 0, pLink);
1007 
1009  (max(Link->chrg.cpMin, Link->chrg.cpMax) -
1010  min(Link->chrg.cpMin, Link->chrg.cpMax) + 1) * sizeof(WCHAR));
1011  if (!pLink)
1012  {
1013  /* TODO: Error message */
1014  return;
1015  }
1016 
1017  RichEdit->SendMessageW(EM_SETSEL, Link->chrg.cpMin, Link->chrg.cpMax);
1018  RichEdit->SendMessageW(EM_GETSELTEXT, 0, (LPARAM)pLink);
1019 
1020  ShowPopupMenuEx(m_hWnd, m_hWnd, IDR_LINKMENU, -1);
1021  }
1022  break;
1023  }
1024 }
1025 
1027 {
1028  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
1029  static ATL::CWndClassInfo wc =
1030  {
1031  {
1032  sizeof(WNDCLASSEX),
1033  csStyle,
1034  StartWindowProc,
1035  0,
1036  0,
1037  NULL,
1038  NULL,
1039  NULL,
1040  (HBRUSH)(COLOR_BTNFACE + 1),
1041  NULL,
1042  L"RAppsAppInfo",
1043  NULL
1044  },
1045  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
1046  };
1047  return wc;
1048 }
1049 
1051 {
1052  RECT r = { 0,0,0,0 };
1053 
1055 }
1056 
1058 {
1059  ATL::CStringW ScrnshotLocation;
1060  if (Info->RetrieveScrnshot(0, ScrnshotLocation))
1061  {
1062  ScrnshotPrev->DisplayImage(ScrnshotLocation);
1063  }
1064  else
1065  {
1067  }
1068  ResizeChildren();
1070 }
1071 
1073 {
1075  ResizeChildren();
1077 }
1078 
1080 {
1082  ResizeChildren();
1084 }
1085 
1087 {
1088  WORD wCommand = LOWORD(wParam);
1089 
1090  switch (wCommand)
1091  {
1092  case ID_OPEN_LINK:
1093 
1094  ShellExecuteW(m_hWnd, L"open", pLink, NULL, NULL, SW_SHOWNOACTIVATE);
1095  HeapFree(GetProcessHeap(), 0, pLink);
1096  pLink = NULL;
1097  break;
1098 
1099  case ID_COPY_LINK:
1101  HeapFree(GetProcessHeap(), 0, pLink);
1102  pLink = NULL;
1103  break;
1104 
1105  }
1106 }
1107 
1109 {
1110  delete RichEdit;
1111  delete ScrnshotPrev;
1112 }
1113 // **** CAppInfoDisplay ****
1114 
1115 
1116 // **** CAppsListView ****
1117 
1119 {
1120 }
1121 
1123 {
1124  if (m_hImageListView)
1125  {
1127  }
1128 }
1129 
1130 LRESULT
1132 {
1133  LRESULT lRes = this->DefWindowProc(uMsg, wParam, lParam);
1134  if (!m_Watermark.IsEmpty())
1135  {
1136  RECT rc;
1137  GetClientRect(&rc);
1142  GetSysColor(COLOR_GRAYTEXT), 1, 1);
1143  SelectFont(HDC(wParam), oldFont);
1144  }
1145  return lRes;
1146 }
1147 
1149 {
1150  m_Watermark = Text;
1151 }
1152 
1153 
1155 {
1156  if (bIsVisible)
1157  {
1158  SetExtendedListViewStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
1159  }
1160  else
1161  {
1162  SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
1163  }
1164 
1165  bHasCheckboxes = bIsVisible;
1166 }
1167 
1169 {
1170  HWND hHeader;
1171  HDITEMW hColumn;
1172  INT nHeaderID = pnmv->iSubItem;
1173 
1175  return;
1176 
1177  hHeader = (HWND)SendMessage(LVM_GETHEADER, 0, 0);
1178  ZeroMemory(&hColumn, sizeof(hColumn));
1179 
1180  /* If the sorting column changed, remove the sorting style from the old column */
1181  if ((nLastHeaderID != -1) && (nLastHeaderID != nHeaderID))
1182  {
1183  bIsAscending = TRUE; // also reset sorting method to ascending
1184  hColumn.mask = HDI_FORMAT;
1185  Header_GetItem(hHeader, nLastHeaderID, &hColumn);
1186  hColumn.fmt &= ~(HDF_SORTUP | HDF_SORTDOWN);
1187  Header_SetItem(hHeader, nLastHeaderID, &hColumn);
1188  }
1189 
1190  /* Set the sorting style to the new column */
1191  hColumn.mask = HDI_FORMAT;
1192  Header_GetItem(hHeader, nHeaderID, &hColumn);
1193 
1194  hColumn.fmt &= ~(HDF_SORTDOWN | HDF_SORTUP);
1195  hColumn.fmt |= (bIsAscending ? HDF_SORTUP : HDF_SORTDOWN);
1196  Header_SetItem(hHeader, nHeaderID, &hColumn);
1197 
1198  /* Sort the list, using the current values of nHeaderID and bIsAscending */
1199  SortContext ctx = { this, nHeaderID };
1200  SortItems(s_CompareFunc, &ctx);
1201 
1202  /* Save new values */
1203  nLastHeaderID = nHeaderID;
1205 }
1206 
1208 {
1209  return AddColumn(Index, const_cast<LPWSTR>(Text.GetString()), Width, Format);
1210 }
1211 
1213 {
1214  LVCOLUMNW Column;
1215 
1216  ZeroMemory(&Column, sizeof(Column));
1217 
1219  Column.iSubItem = Index;
1220  Column.pszText = lpText;
1221  Column.cx = Width;
1222  Column.fmt = Format;
1223 
1224  return SendMessage(LVM_INSERTCOLUMN, Index, (LPARAM)(&Column));
1225 }
1226 
1228 {
1230  return;
1231 }
1232 
1234 {
1235  LVITEMW Item;
1236 
1237  ZeroMemory(&Item, sizeof(Item));
1238 
1239  Item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE;
1240  Item.pszText = const_cast<LPWSTR>(lpText);
1241  Item.lParam = lParam;
1242  Item.iItem = ItemIndex;
1243  Item.iImage = IconIndex;
1244 
1245  if (IconIndex >= 0)
1246  {
1247  Item.iImage = IconIndex;
1248  Item.mask |= LVIF_IMAGE;
1249  }
1250  return InsertItem(&Item);
1251 }
1252 
1254 {
1255  return (HIMAGELIST)SendMessage(LVM_GETIMAGELIST, iImageList, 0);
1256 }
1257 
1259 {
1260  SortContext *ctx = ((SortContext *)lParamSort);
1261  return ctx->lvw->CompareFunc(lParam1, lParam2, ctx->iSubItem);
1262 }
1263 
1264 INT CAppsListView::CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
1265 {
1266  ATL::CStringW Item1, Item2;
1267  LVFINDINFOW IndexInfo;
1268  INT Index;
1269 
1270  IndexInfo.flags = LVFI_PARAM;
1271 
1272  IndexInfo.lParam = lParam1;
1273  Index = FindItem(-1, &IndexInfo);
1274  GetItemText(Index, iSubItem, Item1.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
1275  Item1.ReleaseBuffer();
1276 
1277  IndexInfo.lParam = lParam2;
1278  Index = FindItem(-1, &IndexInfo);
1279  GetItemText(Index, iSubItem, Item2.GetBuffer(MAX_STR_LEN), MAX_STR_LEN);
1280  Item2.ReleaseBuffer();
1281 
1282  return bIsAscending ? Item1.Compare(Item2) : Item2.Compare(Item1);
1283 }
1284 
1286 {
1287  RECT r = { 205, 28, 465, 250 };
1289 
1291 
1292  if (hwnd)
1293  {
1295  }
1296 
1300  0, 1);
1301 
1302  // currently, this two Imagelist is the same one.
1305 
1306 #pragma push_macro("SubclassWindow")
1307 #undef SubclassWindow
1308  m_hWnd = NULL;
1310 #pragma pop_macro("SubclassWindow")
1311 
1312  return hwnd;
1313 }
1314 
1316 {
1317  return (BOOL)(GetItemState(item, LVIS_STATEIMAGEMASK) >> 12) - 1;
1318 }
1319 
1321 {
1322  if (bHasCheckboxes)
1323  {
1324  SetItemState(item, INDEXTOSTATEIMAGEMASK((fCheck) ? 2 : 1), LVIS_STATEIMAGEMASK);
1325  }
1326 }
1327 
1329 {
1330  if (bHasCheckboxes)
1331  {
1332  if (CheckedItemCount == ItemCount)
1333  {
1334  // clear all
1335  SetCheckState(-1, FALSE);
1336  }
1337  else
1338  {
1339  // check all
1340  SetCheckState(-1, TRUE);
1341  }
1342  }
1343 }
1344 
1346 {
1347  INT item = GetSelectionMark();
1348  if (item == -1)
1349  {
1350  return (PVOID)0;
1351  }
1352  return (PVOID)GetItemData(item);
1353 }
1354 
1356 {
1357  if (!DeleteAllItems()) return FALSE;
1358  ApplicationViewType = AppType;
1359 
1360  bIsAscending = TRUE;
1361 
1362  ItemCount = 0;
1363  CheckedItemCount = 0;
1364 
1365  // delete old columns
1366  while (ColumnCount)
1367  {
1369  }
1370 
1372 
1373  // add new columns
1374  ATL::CStringW szText;
1375  switch (AppType)
1376  {
1378 
1379  /* Add columns to ListView */
1380  szText.LoadStringW(IDS_APP_NAME);
1381  AddColumn(ColumnCount++, szText, 250, LVCFMT_LEFT);
1382 
1383  szText.LoadStringW(IDS_APP_INST_VERSION);
1384  AddColumn(ColumnCount++, szText, 90, LVCFMT_RIGHT);
1385 
1386  szText.LoadStringW(IDS_APP_DESCRIPTION);
1387  AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
1388 
1389  // disable checkboxes
1391  break;
1392 
1394 
1395  /* Add columns to ListView */
1396  szText.LoadStringW(IDS_APP_NAME);
1397  AddColumn(ColumnCount++, szText, 250, LVCFMT_LEFT);
1398 
1399  szText.LoadStringW(IDS_APP_INST_VERSION);
1400  AddColumn(ColumnCount++, szText, 90, LVCFMT_RIGHT);
1401 
1402  szText.LoadStringW(IDS_APP_DESCRIPTION);
1403  AddColumn(ColumnCount++, szText, 300, LVCFMT_LEFT);
1404 
1405  // enable checkboxes
1407  break;
1408 
1409  case AppViewTypeEmpty:
1410  default:
1411  break;
1412  }
1413 
1414 
1415  return TRUE;
1416 }
1417 
1419 {
1420  return SendMessage(LVM_SETVIEW, (WPARAM)ViewMode, 0) == 1;
1421 }
1422 
1424 {
1426  {
1427  return FALSE;
1428  }
1429 
1430  /* Load icon from registry */
1431  HICON hIcon = NULL;
1432  ATL::CStringW szIconPath;
1433  if (InstAppInfo->RetrieveIcon(szIconPath))
1434  {
1435  PathParseIconLocationW((LPWSTR)szIconPath.GetString());
1436 
1437  /* Load only the 1st icon from the application executable,
1438  * because all apps provide the executables which have the main icon
1439  * as 1st in the index , so we don't need other icons here */
1441  szIconPath.GetString(),
1442  0);
1443  }
1444 
1445  if (!hIcon)
1446  {
1447  /* Load the default icon */
1449  }
1450 
1452  DestroyIcon(hIcon);
1453 
1454  int Index = AddItem(ItemCount, IconIndex, InstAppInfo->szDisplayName, (LPARAM)CallbackParam);
1455  SetItemText(Index, 1, InstAppInfo->szDisplayVersion.IsEmpty() ? L"---" : InstAppInfo->szDisplayVersion);
1456  SetItemText(Index, 2, InstAppInfo->szComments.IsEmpty() ? L"---" : InstAppInfo->szComments);
1457 
1458  ItemCount++;
1459  return TRUE;
1460 }
1461 
1463 {
1465  {
1466  return FALSE;
1467  }
1468 
1469  /* Load icon from file */
1470  HICON hIcon = NULL;
1471  ATL::CStringW szIconPath;
1472  if (AvlbAppInfo->RetrieveIcon(szIconPath))
1473  {
1475  szIconPath.GetString(),
1476  IMAGE_ICON,
1479  LR_LOADFROMFILE);
1480  }
1481 
1482  if (!hIcon || GetLastError() != ERROR_SUCCESS)
1483  {
1484  /* Load the default icon */
1486  }
1487 
1489  DestroyIcon(hIcon);
1490 
1491  int Index = AddItem(ItemCount, IconIndex, AvlbAppInfo->m_szName, (LPARAM)CallbackParam);
1492 
1493  if (InitCheckState)
1494  {
1496  }
1497 
1498  SetItemText(Index, 1, AvlbAppInfo->m_szVersion);
1499  SetItemText(Index, 2, AvlbAppInfo->m_szDesc);
1500 
1501  ItemCount++;
1502  return TRUE;
1503 }
1504 
1505 // this function is called when parent window receiving an notification about checkstate changing
1507 {
1508  if (bCheck)
1509  {
1510  CheckedItemCount++;
1511  }
1512  else
1513  {
1514  CheckedItemCount--;
1515  }
1516 }
1517 // **** CAppsListView ****
1518 
1519 
1520 // **** CApplicationView ****
1521 
1523 {
1524  theResult = 0;
1525  switch (message)
1526  {
1527  case WM_CREATE:
1528  {
1529  BOOL bSuccess = TRUE;
1530  m_Panel = new CUiPanel();
1533 
1534  bSuccess &= CreateToolbar();
1536  bSuccess &= CreateComboBox();
1538  bSuccess &= CreateListView();
1540 
1541  m_Toolbar->AutoSize();
1542 
1543  RECT rTop;
1544 
1545  ::GetWindowRect(m_Toolbar->m_hWnd, &rTop);
1546  m_HSplitter->m_Margin.top = rTop.bottom - rTop.top;
1547  if (!bSuccess)
1548  {
1549  return -1; // creation failure
1550  }
1551  }
1552  break;
1553 
1554  case WM_NOTIFY:
1555  {
1556  LPNMHDR pNotifyHeader = (LPNMHDR)lParam;
1557  if (pNotifyHeader->hwndFrom == m_ListView->GetWindow())
1558  {
1559  switch (pNotifyHeader->code)
1560  {
1561  case LVN_ITEMCHANGED:
1562  {
1564 
1565  /* Check if this is a valid item
1566  * (technically, it can be also an unselect) */
1567  INT ItemIndex = pnic->iItem;
1568  if (ItemIndex == -1 ||
1569  ItemIndex >= ListView_GetItemCount(pnic->hdr.hwndFrom))
1570  {
1571  break;
1572  }
1573 
1574  /* Check if the focus has been moved to another item */
1575  if ((pnic->uChanged & LVIF_STATE) &&
1576  (pnic->uNewState & LVIS_FOCUSED) &&
1577  !(pnic->uOldState & LVIS_FOCUSED))
1578  {
1579  ItemGetFocus((LPVOID)pnic->lParam);
1580  }
1581 
1582  /* Check if the item is checked/unchecked */
1583  if (pnic->uChanged & LVIF_STATE)
1584  {
1585  int iOldState = STATEIMAGETOINDEX(pnic->uOldState);
1586  int iNewState = STATEIMAGETOINDEX(pnic->uNewState);
1587 
1588  if (iOldState == STATEIMAGE_UNCHECKED && iNewState == STATEIMAGE_CHECKED)
1589  {
1590  // this item is just checked
1593  }
1594  else if (iOldState == STATEIMAGE_CHECKED && iNewState == STATEIMAGE_UNCHECKED)
1595  {
1596  // this item is just unchecked
1599  }
1600  }
1601  }
1602  break;
1603 
1604  case LVN_COLUMNCLICK:
1605  {
1607 
1608  m_ListView->ColumnClick(pnmv);
1609  }
1610  break;
1611 
1612  case NM_DBLCLK:
1613  {
1615  if (Item->iItem != -1)
1616  {
1617  /* this won't do anything if the program is already installed */
1618 
1620  {
1622  }
1623  }
1624  }
1625  break;
1626 
1627  case NM_RCLICK:
1628  {
1629  if (((LPNMLISTVIEW)lParam)->iItem != -1)
1630  {
1631  ShowPopupMenuEx(m_hWnd, m_hWnd, 0, ID_INSTALL);
1632  }
1633  }
1634  break;
1635  }
1636  }
1637  else if (pNotifyHeader->hwndFrom == m_Toolbar->GetWindow())
1638  {
1639  switch (pNotifyHeader->code)
1640  {
1641  case TTN_GETDISPINFO:
1643  break;
1644  }
1645  }
1646  }
1647  break;
1648 
1649  case WM_SYSCOLORCHANGE:
1650  {
1651  /* Forward WM_SYSCOLORCHANGE to common controls */
1652  m_ListView->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1654  m_Toolbar->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1655  m_ComboBox->SendMessageW(WM_SYSCOLORCHANGE, wParam, lParam);
1656  }
1657  break;
1658 
1659  case WM_SIZE:
1660  {
1661  OnSize(hwnd, wParam, lParam);
1662  break;
1663  }
1664 
1665  case WM_COMMAND:
1666  {
1668  }
1669  break;
1670  }
1671  return FALSE;
1672 }
1673 
1675 {
1676  m_Toolbar = new CMainToolbar();
1680 
1681  return m_Toolbar->Create(m_hWnd) != NULL;
1682 }
1683 
1685 {
1689  m_SearchBar->m_Margin.top = 4;
1691 
1692  return m_SearchBar->Create(m_Toolbar->m_hWnd) != NULL;
1693 }
1694 
1696 {
1700  m_ComboBox->m_Margin.top = 4;
1701 
1702  return m_ComboBox->Create(m_Toolbar->m_hWnd) != NULL;
1703 }
1704 
1706 {
1707  m_HSplitter = new CUiSplitPanel();
1712  m_HSplitter->m_Pos = INT_MAX; //set INT_MAX to use lowest possible position (m_MinSecond)
1713  m_HSplitter->m_MinFirst = 10;
1714  m_HSplitter->m_MinSecond = 140;
1716 
1717  return m_HSplitter->Create(m_hWnd) != NULL;
1718 }
1719 
1721 {
1722  m_ListView = new CAppsListView();
1726 
1727  return m_ListView->Create(m_hWnd) != NULL;
1728 }
1729 
1731 {
1732  m_AppsInfo = new CAppInfoDisplay();
1736 
1737  return m_AppsInfo->Create(m_hWnd) != NULL;
1738 }
1739 
1741 {
1742  CWindow::SetRedraw(bRedraw);
1743  m_ListView->SetRedraw(bRedraw);
1744 }
1745 
1747 {
1748  m_SearchBar->SetFocus();
1749 }
1750 
1752 {
1753  if (wParam == SIZE_MINIMIZED)
1754  return;
1755 
1756  /* Size tool bar */
1757  m_Toolbar->AutoSize();
1758 
1759  /* Automatically hide captions */
1760  DWORD dToolbarTreshold = m_Toolbar->GetMaxButtonsWidth();
1761  DWORD dSearchbarMargin = (LOWORD(lParam) - m_SearchBar->m_Width - m_ComboBox->m_Width - TOOLBAR_PADDING * 2);
1762 
1763  if (dSearchbarMargin > dToolbarTreshold)
1764  {
1766  }
1767  else if (dSearchbarMargin < dToolbarTreshold)
1768  {
1770 
1771  }
1772 
1773  RECT r = { 0, 0, LOWORD(lParam), HIWORD(lParam) };
1774  HDWP hdwp = NULL;
1776 
1777  hdwp = BeginDeferWindowPos(count);
1778  if (hdwp)
1779  {
1780  hdwp = m_Panel->OnParentSize(r, hdwp);
1781  if (hdwp)
1782  {
1783  EndDeferWindowPos(hdwp);
1784  }
1785  }
1786 
1788  hdwp = BeginDeferWindowPos(count);
1789  if (hdwp)
1790  {
1791  hdwp = m_SearchBar->OnParentSize(r, hdwp);
1792  if (hdwp)
1793  {
1794  EndDeferWindowPos(hdwp);
1795  }
1796  }
1797 
1800  hdwp = BeginDeferWindowPos(count);
1801  if (hdwp)
1802  {
1803  hdwp = m_ComboBox->OnParentSize(r, hdwp);
1804  if (hdwp)
1805  {
1806  EndDeferWindowPos(hdwp);
1807  }
1808  }
1809 }
1810 
1812 {
1813  if (lParam)
1814  {
1815  if ((HWND)lParam == m_SearchBar->GetWindow())
1816  {
1817  ATL::CStringW szBuf;
1818  switch (HIWORD(wParam))
1819  {
1820  case EN_SETFOCUS:
1821  {
1822  ATL::CStringW szWndText;
1823 
1824  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1825  m_SearchBar->GetWindowTextW(szWndText);
1826  if (szBuf == szWndText)
1827  {
1828  m_SearchBar->SetWindowTextW(L"");
1829  }
1830  }
1831  break;
1832 
1833  case EN_KILLFOCUS:
1834  {
1835  m_SearchBar->GetWindowTextW(szBuf);
1836  if (szBuf.IsEmpty())
1837  {
1838  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1839  m_SearchBar->SetWindowTextW(szBuf.GetString());
1840  }
1841  }
1842  break;
1843 
1844  case EN_CHANGE:
1845  {
1846  ATL::CStringW szWndText;
1847 
1848  szBuf.LoadStringW(IDS_SEARCH_TEXT);
1849  m_SearchBar->GetWindowTextW(szWndText);
1850  if (szBuf == szWndText)
1851  {
1852  szWndText = L"";
1853  m_MainWindow->SearchTextChanged(szWndText);
1854  }
1855  else
1856  {
1857  m_MainWindow->SearchTextChanged(szWndText);
1858  }
1859  }
1860  break;
1861  }
1862 
1863  return;
1864  }
1865  else if ((HWND)lParam == m_ComboBox->GetWindow())
1866  {
1867  int NotifyCode = HIWORD(wParam);
1868  switch (NotifyCode)
1869  {
1870  case CBN_SELCHANGE:
1871  int CurrSelection = m_ComboBox->SendMessageW(CB_GETCURSEL);
1872 
1873  int ViewModeList[] = { LV_VIEW_DETAILS, LV_VIEW_LIST, LV_VIEW_TILE };
1874  ATLASSERT(CurrSelection < (int)_countof(ViewModeList));
1875  if (!m_ListView->SetViewMode(ViewModeList[CurrSelection]))
1876  {
1877  MessageBoxW(L"View mode invalid or unimplemented");
1878  }
1879  break;
1880  }
1881 
1882  return;
1883  }
1884  else if ((HWND)lParam == m_Toolbar->GetWindow())
1885  {
1886  // the message is sent from Toolbar. fall down to continue process
1887  }
1888  else
1889  {
1890  return;
1891  }
1892  }
1893 
1894  // the LOWORD of wParam contains a Menu or Control ID
1895  WORD wCommand = LOWORD(wParam);
1896 
1897  switch (wCommand)
1898  {
1899  case ID_INSTALL:
1901  break;
1902 
1903  case ID_TOOLBAR_INSTALL:
1904  m_MainWindow->SendMessageW(WM_COMMAND, ID_INSTALL, 0);
1905  break;
1906 
1907  case ID_UNINSTALL:
1908  m_MainWindow->SendMessageW(WM_COMMAND, ID_UNINSTALL, 0);
1909  break;
1910 
1911  case ID_MODIFY:
1912  m_MainWindow->SendMessageW(WM_COMMAND, ID_MODIFY, 0);
1913  break;
1914 
1915  case ID_REGREMOVE:
1916  m_MainWindow->SendMessageW(WM_COMMAND, ID_REGREMOVE, 0);
1917  break;
1918 
1919  case ID_REFRESH:
1920  m_MainWindow->SendMessageW(WM_COMMAND, ID_REFRESH, 0);
1921  break;
1922 
1923  case ID_RESETDB:
1924  m_MainWindow->SendMessageW(WM_COMMAND, ID_RESETDB, 0);
1925  break;
1926  }
1927 }
1928 
1930  : m_MainWindow(MainWindow)
1931 {
1932 }
1933 
1935 {
1936  delete m_Toolbar;
1937  delete m_SearchBar;
1938  delete m_ListView;
1939  delete m_AppsInfo;
1940  delete m_HSplitter;
1941 }
1942 
1944 {
1945  DWORD csStyle = CS_VREDRAW | CS_HREDRAW;
1946  static ATL::CWndClassInfo wc =
1947  {
1948  {
1949  sizeof(WNDCLASSEX),
1950  csStyle,
1951  StartWindowProc,
1952  0,
1953  0,
1954  NULL,
1955  NULL,
1956  NULL,
1957  (HBRUSH)(COLOR_BTNFACE + 1),
1958  NULL,
1959  L"RAppsApplicationView",
1960  NULL
1961  },
1962  NULL, NULL, IDC_ARROW, TRUE, 0, _T("")
1963  };
1964  return wc;
1965 }
1966 
1968 {
1969  RECT r = { 0,0,0,0 };
1970 
1972 
1974 }
1975 
1977 {
1978  if (!m_ListView->SetDisplayAppType(AppType))
1979  {
1980  return FALSE;
1981  }
1982  ApplicationViewType = AppType;
1984 
1985  HMENU hMenu = ::GetMenu(m_hWnd);
1986  switch (AppType)
1987  {
1988  case AppViewTypeEmpty:
1989  default:
1994 
1995  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE);
1996  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE);
1997  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
1998  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE);
1999  break;
2000 
2006 
2007  // TODO: instead of disable these button, I would rather remove them.
2008  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE);
2009  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE);
2010  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
2011  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE);
2012  break;
2013 
2019 
2020  // TODO: instead of disable these button, I would rather remove them.
2021  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, FALSE);
2022  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, TRUE);
2023  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, FALSE);
2024  m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, FALSE);
2025  break;
2026  }
2027  return TRUE;
2028 }
2029 
2031 {
2033  {
2034  return FALSE;
2035  }
2036  return m_ListView->AddInstalledApplication(InstAppInfo, param);
2037 }
2038 
2040 {
2042  {
2043  return FALSE;
2044  }
2045  return m_ListView->AddAvailableApplication(AvlbAppInfo, InitCheckState, param);
2046 }
2047 
2049 {
2051 }
2052 
2054 {
2055  m_ListView->CheckAll();
2056  return;
2057 }
2058 
2060 {
2061  return m_ListView->GetFocusedItemData();
2062 }
2063 
2065 {
2066  return m_ListView->GetItemCount();
2067 }
2068 
2070 {
2071  m_Toolbar->AppendTabOrderWindow(Direction, TabOrderList);
2072  m_ComboBox->AppendTabOrderWindow(Direction, TabOrderList);
2073  m_SearchBar->AppendTabOrderWindow(Direction, TabOrderList);
2074  m_ListView->AppendTabOrderWindow(Direction, TabOrderList);
2075  m_AppsInfo->AppendTabOrderWindow(Direction, TabOrderList);
2076 
2077  return;
2078 }
2079 
2080 // this function is called when a item of listview get focus.
2081 // CallbackParam is the param passed to listview when adding the item (the one getting focus now).
2083 {
2084  switch (ApplicationViewType)
2085  {
2087  return m_AppsInfo->ShowInstalledAppInfo((CInstalledApplicationInfo *)CallbackParam);
2088 
2090  return m_AppsInfo->ShowAvailableAppInfo((CAvailableApplicationInfo *)CallbackParam);
2091 
2092  case AppViewTypeEmpty:
2093  default:
2095  return FALSE;
2096  }
2097 }
2098 
2099 // this function is called when a item of listview is checked/unchecked
2100 // CallbackParam is the param passed to listview when adding the item (the one getting focus now).
2102 {
2103  m_MainWindow->ItemCheckStateChanged(bChecked, CallbackParam);
2104  return TRUE;
2105 }
2106 // **** 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:1462
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
DWORD GetMaxButtonsWidth() const
Definition: appview.cpp:174
_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:337
#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:1131
#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:1613
VOID OnGetDispInfo(LPTOOLTIPTEXT lpttt)
Definition: appview.cpp:71
const UINT m_TypeStringID[3]
Definition: appview.h:331
#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:2039
HWND SetFocus()
Definition: atlwin.h:1164
#define ID_REFRESH
Definition: resource.h:16
#define CloseHandle
Definition: compat.h:598
#define IMAGE_ICON
Definition: winuser.h:212
INT nLastHeaderID
Definition: appview.h:219
BOOL ShowInstalledAppInfo(CInstalledApplicationInfo *Info)
Definition: appview.cpp:394
#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:2030
#define ERROR_SUCCESS
Definition: deptool.c:10
VOID SetWatermark(const CStringW &Text)
Definition: appview.cpp:1148
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:352
BOOL CreateComboBox()
Definition: appview.cpp:1695
#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:283
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
VOID ShowButtonCaption()
Definition: appview.cpp:168
#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:1506
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:2048
GLuint GLuint GLsizei count
Definition: gl.h:1545
void DeleteColumn(INT Index)
Definition: appview.cpp:1227
#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:893
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
VOID InsertLicenseInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:291
#define IDS_AINFO_URLSITE
Definition: resource.h:165
struct @1591 Msg[]
#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:738
BOOL WINAPI UpdateWindow(_In_ HWND)
PVOID GetFocusedItemData()
Definition: appview.cpp:1345
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
BOOL SetViewMode(DWORD ViewMode)
Definition: appview.cpp:1418
#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:274
const INT m_Width
Definition: appview.h:312
#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:590
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define ZeroMemory
Definition: winbase.h:1667
#define CS_HREDRAW
Definition: winuser.h:648
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
VOID SetWelcomeText()
Definition: appview.cpp:423
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
void EndPaint(LPPAINTSTRUCT lpPaint)
Definition: atlwin.h:495
#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:762
#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:1522
VOID SetStatus(SCRNSHOT_STATUS Status)
Definition: appview.cpp:630
#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:313
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:4296
#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:2069
static BOOLEAN bSuccess
Definition: drive.cpp:430
#define CB_GETCURSEL
Definition: winuser.h:1930
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:1976
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:1168
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:868
#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:1811
UINT code
Definition: winuser.h:3139
#define STATEIMAGETOINDEX(x)
Definition: appview.h:61
HWND Create(HWND hwndParent)
Definition: appview.cpp:1967
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:635
#define BTNS_BUTTON
Definition: commctrl.h:998
#define L(x)
Definition: ntvdm.h:50
HWND Create(HWND hwndParent)
Definition: appview.cpp:107
#define EN_KILLFOCUS
Definition: winuser.h:2012
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define IDS_MODIFY
Definition: resource.h:94
#define EN_SETFOCUS
Definition: winuser.h:2014
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:314
GLuint color
Definition: glext.h:6243
BOOL ItemGetFocus(LPVOID CallbackParam)
Definition: appview.cpp:2082
BOOL CreateHSplitter()
Definition: appview.cpp:1705
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:517
BOOL ShowInstalledAppInfo(CInstalledApplicationInfo *Info)
Definition: appview.cpp:1072
#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:1224
#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:507
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:1233
void SetRedraw(BOOL bRedraw)
Definition: appview.cpp:1740
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:942
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:1923
#define IDS_UNINSTALL
Definition: resource.h:93
BOOL GetCheckState(INT item)
Definition: appview.cpp:1315
#define TB_GETEXTENDEDSTYLE
Definition: commctrl.h:1191
#define LVS_SORTASCENDING
Definition: commctrl.h:2268
VOID ResizeChildren()
Definition: appview.cpp:941
VOID OnLink(ENLINK *Link)
Definition: appview.cpp:999
static HWND hwndParent
Definition: cryptui.c:300
float GetLoadingDotWidth(int width, int height)
Definition: appview.cpp:725
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:334
VOID InsertVersionInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:265
#define INFO_DISPLAY_PADDING
Definition: appview.h:32
#define EM_SETBKGNDCOLOR
Definition: richedit.h:100
switch(r->id)
Definition: btrfs.c:3015
#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:1258
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:1596
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:2101
#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:1355
#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:595
#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
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
static AvailableStrings m_Strings
Definition: available.h:112
#define PRF_ERASEBKGND
Definition: winuser.h:2506
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:1320
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:1598
#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:1729
float GetFrameDotShift(int Frame, int width, int height)
Definition: appview.cpp:730
CApplicationView(CMainWindow *MainWindow)
Definition: appview.cpp:1929
#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:1207
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:192
PCXSTR GetString() const
Definition: atlsimpstr.h:361
#define EM_SETSEL
Definition: winuser.h:2005
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:617
#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:186
#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:2486
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:989
#define PRF_CHECKVISIBLE
Definition: winuser.h:2503
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:1767
int m_Height
Definition: appview.h:338
CAppsListView * m_ListView
Definition: appview.h:353
#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:1607
BOOL CreateToolbar()
Definition: appview.cpp:1674
INT CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
Definition: appview.cpp:1264
void SetFocusOnSearchBar()
Definition: appview.cpp:1746
#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:1079
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
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:1751
VOID HideButtonCaption()
Definition: appview.cpp:162
#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:1943
static LRESULT CALLBACK StartWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1585
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:1948
#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:1727
ATL::CStringW m_szName
Definition: available.h:47
HWND hwndFrom
Definition: winuser.h:3137
#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:491
#define BROKENIMG_ICON_SIZE
Definition: appview.h:26
int ReleaseDC(HDC hDC)
Definition: atlwin.h:1040
#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:800
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:1253
#define IDS_AINFO_PACKAGE_NAME
Definition: resource.h:173
Status GetLastStatus()
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL CreateAppInfoDisplay()
Definition: appview.cpp:1730
#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:476
HINSTANCE hInst
Definition: dxdiag.c:13
HWND Create(HWND hwndParent)
Definition: appview.cpp:1285
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:769
#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:240
CMainWindow * m_MainWindow
Definition: appview.h:356
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:1684
#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:1050
#define EN_LINK
Definition: richedit.h:202
#define IDS_INFO_PRODUCTID
Definition: resource.h:150
CUiSplitPanel * m_HSplitter
Definition: appview.h:355
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_LBUTTONUP
Definition: winuser.h:1764
BOOL AddInstalledApplication(CInstalledApplicationInfo *InstAppInfo, LPVOID CallbackParam)
Definition: appview.cpp:1423
#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:1026
#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:215
BOOL CreateListView()
Definition: appview.cpp:1720
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:211
#define LVN_COLUMNCLICK
Definition: commctrl.h:3139
#define CBN_SELCHANGE
Definition: winuser.h:1966
#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:1637
int ScrnshotDownloadCallback(pASYNCINET AsyncInet, ASYNC_EVENT Event, WPARAM wParam, LPARAM lParam, VOID *Extension)
Definition: appview.cpp:439
#define MAX_STR_LEN
Definition: defines.h:34
#define LV_VIEW_LIST
Definition: commctrl.h:2843
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
#define CreateFileW
Definition: compat.h:600
BOOL ShowAvailableAppInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:368
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:1328
Status FillEllipse(const Brush *brush, const Rect &rect)
APPLICATION_VIEW_TYPE ApplicationViewType
Definition: appview.h:357
#define LVM_DELETECOLUMN
Definition: commctrl.h:2638
#define LVM_GETHEADER
Definition: commctrl.h:2650
#define SendMessage
Definition: winuser.h:5823
BOOL SearchTextChanged(ATL::CStringW &SearchText)
Definition: gui.cpp:824
#define LVIF_PARAM
Definition: commctrl.h:2311
BOOL ShowAvailableAppInfo(CAvailableApplicationInfo *Info)
Definition: appview.cpp:1057
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define WM_CREATE
Definition: winuser.h:1595
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2354
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:860
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:5795
#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:5699
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
CWindow GetParent() const
Definition: atlwin.h:666
CMainToolbar * m_Toolbar
Definition: appview.h:350
#define GetWindowLongPtr
Definition: treelist.c:73
LPARAM lParam
Definition: commctrl.h:3040
#define WM_ERASEBKGND
Definition: winuser.h:1612
#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:187
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
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:594
PVOID GetFocusedItemData()
Definition: appview.cpp:2059
HDC GetDC()
Definition: atlwin.h:513
#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:354
#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:386
CUiWindow< CComboBox > * m_ComboBox
Definition: appview.h:351
#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:924
#define IDS_INFO_INFOABOUT
Definition: resource.h:153
#define IDS_TOOLTIP_INSTALL
Definition: resource.h:129
VOID SetCheckboxesVisible(BOOL bIsVisible)
Definition: appview.cpp:1154
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:1086
CUiPanel * m_Panel
Definition: appview.h:349
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:1216
#define EN_CHANGE
Definition: winuser.h:2009