Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.2 KiB

  1. // HMSnapinAbout.cpp: implementation of the CHMSnapinAbout class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "snapin.h"
  6. #include "HMSnapinAbout.h"
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[]=__FILE__;
  10. #define new DEBUG_NEW
  11. #endif
  12. IMPLEMENT_DYNCREATE(CHMSnapinAbout,CSnapinAbout)
  13. //////////////////////////////////////////////////////////////////////
  14. // Construction/Destruction
  15. //////////////////////////////////////////////////////////////////////
  16. CHMSnapinAbout::CHMSnapinAbout()
  17. {
  18. }
  19. CHMSnapinAbout::~CHMSnapinAbout()
  20. {
  21. }
  22. //////////////////////////////////////////////////////////////////////
  23. // Overrideable Members
  24. //////////////////////////////////////////////////////////////////////
  25. HRESULT CHMSnapinAbout::OnGetStaticFolderImage(HBITMAP __RPC_FAR * hSmallImage,HBITMAP __RPC_FAR * hSmallImageOpen,HBITMAP __RPC_FAR * hLargeImage,COLORREF __RPC_FAR * cMask)
  26. {
  27. TRACEX(_T("CHMSnapinAbout::OnGetStaticFolderImage\n"));
  28. TRACEARGn(hSmallImage);
  29. TRACEARGn(hSmallImageOpen);
  30. TRACEARGn(hLargeImage);
  31. TRACEARGn(cMask);
  32. CBitmap bitmap;
  33. bitmap.LoadBitmap(IDB_BITMAP_HEALTHMON_SMALL);
  34. *hSmallImage = bitmap;
  35. bitmap.Detach();
  36. bitmap.LoadBitmap(IDB_BITMAP_HEALTHMON_SMALL);
  37. *hSmallImageOpen = bitmap;
  38. bitmap.Detach();
  39. bitmap.LoadBitmap(IDB_BITMAP_HEALTHMON_LARGE);
  40. *hLargeImage = bitmap;
  41. bitmap.Detach();
  42. *cMask = RGB(255,0,255);
  43. return S_OK;
  44. }
  45. void CHMSnapinAbout::OnGetSnapinDescription(CString& sDescription)
  46. {
  47. TRACEX(_T("CHMSnapinAbout::OnGetSnapinDescription\n"));
  48. TRACEARGs(sDescription);
  49. }
  50. HRESULT CHMSnapinAbout::OnGetSnapinImage(HICON __RPC_FAR *hAppIcon)
  51. {
  52. TRACEX(_T("CHMSnapinAbout::OnGetSnapinImage\n"));
  53. TRACEARGn(hAppIcon);
  54. *hAppIcon = AfxGetApp()->LoadIcon(IDI_ICON_HEALTHMON);
  55. return S_OK;
  56. }
  57. // {80F85332-AB10-11D2-BD62-0000F87A3912}
  58. IMPLEMENT_OLECREATE_EX(CHMSnapinAbout, "SnapIn.SnapinAbout", 0x80f85332, 0xab10, 0x11d2, 0xbd, 0x62, 0x0, 0x0, 0xf8, 0x7a, 0x39, 0x12)
  59. BOOL CHMSnapinAbout::CHMSnapinAboutFactory::UpdateRegistry(BOOL bRegister)
  60. {
  61. if (bRegister)
  62. return AfxOleRegisterServerClass(m_clsid, m_lpszProgID, m_lpszProgID, m_lpszProgID, OAT_DISPATCH_OBJECT);
  63. else
  64. return AfxOleUnregisterClass(m_clsid, m_lpszProgID);
  65. }