Leaked source code of windows server 2003
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.

76 lines
2.2 KiB

  1. // SmStart.h : Declaration of the CSmartStart
  2. #ifndef __SMARTSTART_H_
  3. #define __SMARTSTART_H_
  4. #include "resource.h" // main symbols
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CSmartStart
  7. class ATL_NO_VTABLE CSmartStart :
  8. public CComObjectRootEx<CComSingleThreadModel>,
  9. public CComCoClass<CSmartStart,&CLSID_SmartStart>,
  10. public CComControl<CSmartStart>,
  11. public IDispatchImpl<ISmartStart, &IID_ISmartStart, &LIBID_ICWHELPLib>,
  12. public IPersistStreamInitImpl<CSmartStart>,
  13. public IOleControlImpl<CSmartStart>,
  14. public IOleObjectImpl<CSmartStart>,
  15. public IOleInPlaceActiveObjectImpl<CSmartStart>,
  16. public IViewObjectExImpl<CSmartStart>,
  17. public IOleInPlaceObjectWindowlessImpl<CSmartStart>,
  18. public IObjectSafetyImpl<CSmartStart>
  19. {
  20. public:
  21. CSmartStart()
  22. {
  23. }
  24. DECLARE_REGISTRY_RESOURCEID(IDR_SMARTSTART)
  25. BEGIN_COM_MAP(CSmartStart)
  26. COM_INTERFACE_ENTRY(IDispatch)
  27. COM_INTERFACE_ENTRY(ISmartStart)
  28. COM_INTERFACE_ENTRY_IMPL_IID(IID_IViewObject, IViewObjectEx)
  29. COM_INTERFACE_ENTRY_IMPL_IID(IID_IViewObject2, IViewObjectEx)
  30. COM_INTERFACE_ENTRY_IMPL(IViewObjectEx)
  31. COM_INTERFACE_ENTRY_IMPL_IID(IID_IOleWindow, IOleInPlaceObjectWindowless)
  32. COM_INTERFACE_ENTRY_IMPL_IID(IID_IOleInPlaceObject, IOleInPlaceObjectWindowless)
  33. COM_INTERFACE_ENTRY_IMPL(IOleInPlaceObjectWindowless)
  34. COM_INTERFACE_ENTRY_IMPL(IOleInPlaceActiveObject)
  35. COM_INTERFACE_ENTRY_IMPL(IOleControl)
  36. COM_INTERFACE_ENTRY_IMPL(IOleObject)
  37. COM_INTERFACE_ENTRY_IMPL(IPersistStreamInit)
  38. COM_INTERFACE_ENTRY_IMPL(IObjectSafety)
  39. END_COM_MAP()
  40. BEGIN_PROPERTY_MAP(CSmartStart)
  41. // Example entries
  42. // PROP_ENTRY("Property Description", dispid, clsid)
  43. // PROP_PAGE(CLSID_StockColorPage)
  44. END_PROPERTY_MAP()
  45. BEGIN_MSG_MAP(CSmartStart)
  46. MESSAGE_HANDLER(WM_PAINT, OnPaint)
  47. MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)
  48. MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
  49. END_MSG_MAP()
  50. // IViewObjectEx
  51. STDMETHOD(GetViewStatus)(DWORD* pdwStatus)
  52. {
  53. ATLTRACE(_T("IViewObjectExImpl::GetViewStatus\n"));
  54. *pdwStatus = 0;
  55. return S_OK;
  56. }
  57. // ISmartStart
  58. public:
  59. STDMETHOD(IsInternetCapable)(/*[out, retval]*/ BOOL *pbRetVal);
  60. HRESULT OnDraw(ATL_DRAWINFO& di);
  61. };
  62. #endif //__SMARTSTART_H_