Figure 7   Implementing CAxHostWindow2T


 template <typename TFrameWindow>
 class ATL_NO_VTABLE CAxHostWindow2T : 
 public CAxHostWindow, 
 public IPersistPropertyBagImpl<CAxHostWindow2T>, 
         ...
 {
 public:
    ...
 public: //additional members, the user of the class can set
     CComPtr<IUnknown>            m_spUnkSimpleFrameSite;
     CComPtr<IOleContainer>       m_spOleContainer;    
     CComPtr<IDispatch>           m_spExtendedDispatch;
     TFrameWindow                 *m_pContainerFrame;
 
 }

Figure 8   CreateLicensedControl


 //CAxHostWindow2T::CreateLicensedControl...
 virtual HRESULT CreateLicensedControl(REFCLSID clsid,
     REFIID riid, void** ppvObj, bool &bIsItLicensed)
 {
     bIsItLicensed = false;
     CComPtr<IClassFactory2> spCF2;
     HRESULT hr = CoGetClassObject(clsid,CLSCTX_SERVER,0,
         IID_IClassFactory2,(void**)&spCF2);
     if(FAILED(hr)) return hr;
 
     bIsItLicensed = true;
     
     LICINFO licInfo;
     licInfo.cbLicInfo = sizeof(LICINFO);
     hr = spCF2->GetLicInfo(&licInfo);
 
     if(FAILED(hr)) 
     {
         ::MessageBox(NULL,_T("License Key for this component not 
             found"),_T("Licensing Error"),MB_OK);
         return hr;
     }
     BSTR strKey = 0;
     if(licInfo.fRuntimeKeyAvail) 
     {
         hr = spCF2->RequestLicKey(0,&strKey);
     }
     
     if(SUCCEEDED(hr) || licInfo.fLicVerified)
     {
         hr = spCF2->CreateInstanceLic(NULL,NULL,
             riid,strKey,ppvObj);
         if(strKey) { ::SysFreeString(strKey); }
         return hr;
     }
 
     ::MessageBox(NULL,_T("License Key for this component not found"),
         _T("Licensing Error"),MB_OK);
     
     return hr;
 }
 
 //CreateLicensedControl gets called from 
 //CAxHostWindow2T::CreateNormalizedObjectEx as shown below:
 
 virtual HRESULT CreateNormalizedObjectEx(LPCOLESTR lpszTricsData, 
                                          REFIID riid, void** ppvObj, 
                                          bool& bWasHTML)
 {
 ...
 //get the clsid from the lpszTricsData
     if (SUCCEEDED(hr))    // Aha, it was one of those two
     {
         //check if its a licensed control
         bool bLicensed = false;
         hr = CreateLicensedControl(clsid, riid, ppvObj, bLicensed);
         if(SUCCEEDED(hr) || ( bLicensed && FAILED(hr) ) )
             return hr; 
 
         //create the control in a normal way—it does not support licensing
         hr = CoCreateInstance(clsid,NULL,CLSCTX_SERVER, riid, ppvObj);
     }
 //If everything else fails, Create WebBrowser control
 ...
     return hr;
 }

Figure 10   CAxHostWindow::GetWindowContext


 STDMETHODIMP CAxHostWindow::GetWindowContext(IOleInPlaceFrame** ppFrame, 
     IOleInPlaceUIWindow** ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, 
     LPOLEINPLACEFRAMEINFO pFrameInfo)
 {
     HRESULT hr = S_OK;
     if (ppFrame == NULL || ppDoc == NULL || lprcPosRect == NULL || lprcClipRect 
         == NULL)
           hr = E_POINTER;
     ATLASSERT(SUCCEEDED(hr));
     if (SUCCEEDED(hr))
     {
         if (!m_spInPlaceFrame)
         {
             CComObject<CAxFrameWindow>* pFrameWindow;
             CComObject<CAxFrameWindow>::CreateInstance(&pFrameWindow);
             pFrameWindow->QueryInterface(IID_IOleInPlaceFrame, 
                 (void**) &m_spInPlaceFrame);
             ATLASSERT(m_spInPlaceFrame);
         }
         if (!m_spInPlaceUIWindow)
         {
             CComObject<CAxUIWindow>* pUIWindow;
             CComObject<CAxUIWindow>::CreateInstance(&pUIWindow);
             pUIWindow->QueryInterface(IID_IOleInPlaceUIWindow,
                 (void**) &m_spInPlaceUIWindow);
             ATLASSERT(m_spInPlaceUIWindow);
         }
         m_spInPlaceFrame.CopyTo(ppFrame);
         m_spInPlaceUIWindow.CopyTo(ppDoc);
         GetClientRect(lprcPosRect);
         GetClientRect(lprcClipRect);
 
         ACCEL ac = { 0,0,0 };
         HACCEL hac = CreateAcceleratorTable(&ac, 1);
         pFrameInfo->cb = sizeof(OLEINPLACEFRAMEINFO);
         pFrameInfo->fMDIApp = m_bMDIApp;
         pFrameInfo->hwndFrame = GetParent();
         pFrameInfo->haccel = hac;
         pFrameInfo->cAccelEntries = 1;
     }
     return hr;
 }

Figure 11   CAxHostWindow2T<>::GetWindowContext


 //CAxHostWindow2T<>::GetWindowContext...
 STDMETHODIMP GetWindowContext(IOleInPlaceFrame** ppFrame, 
     IOleInPlaceUIWindow** ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, 
     LPOLEINPLACEFRAMEINFO pFrameInfo)
 {
 if (    ppFrame == NULL || ppDoc == NULL || lprcPosRect == NULL || 
     lprcClipRect == NULL || !m_spInPlaceFrame ||
     m_spInPlaceUIWindow || !m_pContainerFrame)
         return E_POINTER;
                     
     m_spInPlaceFrame.CopyTo(ppFrame);
     m_spInPlaceUIWindow.CopyTo(ppDoc);
         
 GetClientRect(lprcPosRect);
     GetClientRect(lprcClipRect);
 
 //m_pContainerFrame is of the type TFrameWindow passed as a template arg of 
 //CAxHostWidnow2T—It is the Container's application Frame window. We let the
 //Frame window decide the accelerator table 
     pFrameInfo = m_pContainerFrame->GetInPlaceFrameInfo();
     
 return S_OK;
 }

Figure 12   Merged Property Pages


 //CAxHostWindow2T<>::ShowPropertyFrame...
 STDMETHODIMP ShowPropertyFrame()
 {
     HRESULT hr = E_FAIL;
                
     CComPtr<ISpecifyPropertyPages> spSpecifyPages;
     hr = QueryControl(IID_ISpecifyPropertyPages, (void**)&spSpecifyPages);
     if(FAILED(hr)) return hr;
         
     CAUUID pages;
     hr = spSpecifyPages->GetPages(&pages);
     if(FAILED(hr)) return hr;
 
     CComQIPtr<IOleObject> spObj(spSpecifyPages);
     CComPtr<IUnknown> spUnk = spSpecifyPages;
     if(!spObj || !spUnk)  return E_NOINTERFACE; 
             
     pages.cElems += 1;        
     pages.pElems = (GUID *)::CoTaskMemRealloc(pages.pElems, 
     pages.cElems * sizeof(CLSID));
     pages.pElems[pages.cElems—1] = CLSID_ExtPage;    
     LPOLESTR szTitle = NULL;
 
     spObj->GetUserType(USERCLASSTYPE_SHORT, &szTitle);
 
     RECT rcPos;    ::GetClientRect(m_hWnd,&rcPos);
 ...
 hr = OleCreatePropertyFrame(m_pContainerFrame->m_hWnd, rcPos.top, 
                             rcPos.left, szTitle,1, &spUnk.p, pages,
                             cElems, pages.pElems,LOCALE_USER_DEFAULT, 0, 0);
 
     CoTaskMemFree(szTitle);
     CoTaskMemFree(pages.pElems);
         
     return hr;
 }

Figure 14   Implementing the Extended Control


 class ATL_NO_VTABLE CExtendedDispatch : 
     public CComObjectRootEx<CComSingleThreadModel>,
     public CComCoClass<CExtendedDispatch, &CLSID_ExtendedDispatch>,
     public IDispatchImpl<IExtendedDispatch, &IID_IExtendedDispatch>,
     public IPersistPropertyBagImpl<CExtendedDispatch>,
 public IPersistStreamInitImpl<CExtendedDispatch>,
    ...
 {
 public:
 ...
 BEGIN_COM_MAP(CExtendedDispatch)
     COM_INTERFACE_ENTRY(IPersistPropertyBag)    
     COM_INTERFACE_ENTRY(IPersistStreamInit)    
     COM_INTERFACE_ENTRY2(IDispatch,IExtendedDispatch)
     COM_INTERFACE_ENTRY(IExtendedDispatch)
 ...
 END_COM_MAP()
 
 BEGIN_PROP_MAP(CExtendedDispatch)
     PROP_ENTRY("Name", DISPID_Name, CLSID_ExtPage)
     ...
 END_PROP_MAP()
 ...
 };

Figure 15   CAxWindowHandle::AxCreateControl2


 HRESULT CAxWindowHandle::AxCreateControl2(LPCOLESTR lpszName, 
     HWND hWnd, IStream* pStream, 
     IUnknown** ppUnkContainer, 
     IUnknown** ppUnkControl, 
     REFIID iidSink, IUnknown* punkSink)
 {
     AtlAxWinInit();
     ...
     HRESULT hr = m_pSiteObject->CreateInstance(&m_pSiteObject);
     if(FAILED(hr)) return hr;
     m_pSiteObject->AddRef();
     
     hr = InitializeSite();
 
     CComPtr<IAxWinHostWindow> pAxWindow;
     spUnkContainer->QueryInterface(&pAxWindow);
     CComBSTR bstrName(lpszName);
     hr = pAxWindow->CreateControlEx(bstrName, hWnd, pStream,  
                                     &spUnkControl, iidSink, punkSink);
 
 ...
     SubclassControl();
 }

Figure 16   CAxWindowHandle::OnContextMenu


 LRESULT CAxWindowHandle::OnContextMenu(UINT , WPARAM , LPARAM lParam, BOOL& )
 {
     if(m_pSiteObject->m_bUserMode)//Sorry,no verb menus at RunTime!
        return 0L;
 
     CComPtr<IOleObject> spObj;
     QueryControl(&spObj);
     if(!spObj) return E_NOINTERFACE;
 
     //CContextMenu is a tiny wrapper class for popping up context menus 
     CContextMenu cm,cmVerb;
     cm.Load(_Module.GetModuleInstance(),IDR_TOOLMENU); 
 
     HMENU hMenu = NULL;
     BOOL b = ::OleUIAddVerbMenu(spObj.p,
                                 NULL,
                                 cm.GetMenu(),
                                 0, //pos
                                 ID_MIN_VERB,
                                 ID_MAX_VERB,
                                 TRUE,
                                 ID_CONVERT,
                                 &hMenu);
         
     if(b && hMenu)
     {
         cmVerb = hMenu;
         cmVerb.Delete(ID_CONVERT);
         cmVerb.Delete(cmVerb.ItemCount()-1,MF_BYPOSITION);
         cmVerb.Insert(cmVerb.ItemCount(),IDR_TOOLMENU+1, _T("Delete Control"));
         cmVerb.Insert(cmVerb.ItemCount(),IDR_TOOLMENU+2, _T("View Events"));
             
 POINT pt = {LOWORD(lParam), HIWORD(lParam) };
 ...
             
         cmVerb.Track(pt.x ,pt.y,m_hWnd);
         cmVerb.Destroy();
     }
     cm.Destroy();
     return 0L;
 }

Figure 19   Form Object


 class ATL_NO_VTABLE CForm : 
     public CComObjectRootEx<CComSingleThreadModel>,
     ...
     public CComCompositeControl<CForm>,
 ...
     public IOleInPlaceFrame,
     public IOleContainer,
     ...    
 {
 public:
 ...
 BEGIN_COM_MAP(CForm)
     COM_INTERFACE_ENTRY(IForm)
 ...
     COM_INTERFACE_ENTRY(IViewObjectEx)
     COM_INTERFACE_ENTRY(IViewObject2)
     COM_INTERFACE_ENTRY(IViewObject)
 ...
     COM_INTERFACE_ENTRY(IOleInPlaceFrame)
     COM_INTERFACE_ENTRY(IOleInPlaceUIWindow)
     COM_INTERFACE_ENTRY2(IOleWindow,IOleInPlaceFrame)
     COM_INTERFACE_ENTRY(IOleContainer)
 ...
 END_COM_MAP()
 ...
 };

Figure 20   CForm::EnumObjects


 STDMETHODIMP CForm::EnumObjects(DWORD /*grfFlags*/, IEnumUnknown** ppenum)
 {
     if (!ppenum){ return E_POINTER; }
 
     *ppenum = NULL;
     
     HRESULT hr = E_FAIL;
 
     typedef CComEnumOnSTL<IEnumUnknown, &IID_IEnumUnknown, IUnknown*,
         _CopyIUnknownFromCAxWindowHandle, 
         list<CAxWindowHandle*> > CComEnumUnknownOnList;
 
     CComObject<CComEnumUnknownOnList>* pe = 0;
     hr = pe->CreateInstance(&pe);
     if(FAILED(hr)) return hr;
 
     pe->AddRef();
 
     hr = pe->Init(this->GetUnknown(), m_listSites);
         
     if( SUCCEEDED(hr) ) 
     {
         hr = pe->QueryInterface(ppenum);
     }
     pe->Release();
 
     return hr;
 }

Figure 21   CForm::CreateAndEmbedControlOnForm


 HRESULT CForm::CreateAndEmbedControlOnForm(const POINT &pt)
 {
     CAxWindowHandle *pSiteNode = new CAxWindowHandle(m_pData);
     if(!pSiteNode){ return E_OUTOFMEMORY; }
 
     RECT rc = {pt.x,pt.y,300,300};
     
     USES_CONVERSION;                          
     
 ...//checks if SimpleFrame control for setting the appropriate //parent
 ...
     pSiteNode->Create(hWndParent, rc, 
         OLE2T(m_bstrDroppedCtrlCLSID), 
         WS_CHILD | WS_OVERLAPPED|WS_VISIBLE | WS_CLIPCHILDREN 
        |WS_CLIPSIBLINGS |WS_BORDER|
         WS_THICKFRAME,0);
     
     
     CComPtr<IUnknown> spUnk;
     HRESULT hr = pSiteNode->QueryControl(&spUnk);
 
     if(FAILED(hr))
     {
         pSiteNode->DestroyWindow();
         pSiteNode->m_hWnd =0;
         delete pSiteNode; pSiteNode = 0;
         return 0L;
     }
     
 m_listSites.push_back(pSiteNode);
 ...
     ...
     ...
     return hr;
 }

Figure 22   CEventMap::Init


 HRESULT CEventMap::Init()
 {
     if(!m_spObjUnk) return E_POINTER;
     if(m_spTypeInfo) return S_FALSE; 
 
     HRESULT hr = GetEventTypeInfo(&m_spTypeInfo);
     if(FAILED(hr)) return hr; 
     
     LPTYPEATTR     pTA = 0;
     hr = m_spTypeInfo->GetTypeAttr(&pTA);
     if(FAILED(hr)){ m_spTypeInfo.Release(); return hr; }
     
     //Set the no of event functions
     m_nEvents = pTA->cFuncs;
     m_spTypeInfo->ReleaseTypeAttr(pTA);
 
     m_pEventInfo = new EventInfo[m_nEvents];
     if(!m_pEventInfo) 
         { m_nEvents = 0; m_spTypeInfo.Release(); return E_OUTOFMEMORY; }
 
     for(UINT n = 0; n < m_nEvents; n++)
     {
         LPFUNCDESC pFD = 0;
         m_pEventInfo[n].m_dispID = 0;
                 
         hr = m_spTypeInfo->GetFuncDesc(n,&pFD);
         if(FAILED(hr)) continue;
 
         m_pEventInfo[n].m_dispID = pFD->memid;
         
         UINT cNames = 0;
         hr = m_spTypeInfo->GetNames(pFD->memid,
              &m_pEventInfo[n].m_strEventName,1,&cNames);
 
         m_spTypeInfo->ReleaseFuncDesc(pFD);
     }
     return hr;    
 }

Figure 24   Event Dialog


 STDMETHODIMP CEventMap::Invoke(DISPID dispidMember, REFIID riid,LCID lcid, 
     WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult,
     EXCEPINFO* pexcepinfo, UINT* puArgErr)
 {
     if( riid != IID_NULL ) return DISP_E_UNKNOWNINTERFACE;
     if(!pdispparams ) return E_POINTER;
 
     for( UINT n=0; n < m_nEvents; n++ )
     {
         if( dispidMember != m_pEventInfo[n].m_dispID ) continue;
 
         // get the IOleContainer
         CComPtr<IOleObject> spObj;
         HRESULT hr = m_spObjUnk->QueryInterface(&spObj);
         if( FAILED(hr) ) continue;
 
         CComPtr<IOleClientSite> spClientSite;
         hr = spObj->GetClientSite(&spClientSite);
         if( FAILED(hr) ) continue;
 
         CComPtr<IOleContainer> spContainer;
         hr = spClientSite->GetContainer(&spContainer);
         if( FAILED(hr) ) continue;
 
         CComPtr<IOleInPlaceFrame> spFrame;
         hr = spContainer->QueryInterface(&spFrame);
         if( FAILED(hr) ) continue;
 
         CComBSTR str(L"Event : ");
         str +=m_pEventInfo[n].m_strEventName;
         spFrame->SetStatusText(str);
         return S_OK;
     }
     return S_OK;
 }

Figure 25   Modifications to ATLCON


 HRESULT CBrowseTabContainer::EnumerateControlsAndFillCombo(
     IOleContainer *pOleContainer, BSTR *pstr)
 {
         if(!pOleContainer){ return E_POINTER; }
     ...    
     CComPtr<IEnumUnknown>    spEnumUnk;
     HRESULT hr = pOleContainer->EnumObjects(OLECONTF_EMBEDDINGS 
         |OLECONTF_OTHERS,&spEnumUnk);
     if(FAILED(hr)) {  return hr; }
 
     m_wndControlCombo.ResetContent();
     CComPtr<IUnknown> spUnk;
             
     while (spEnumUnk->Next(1,&spUnk,NULL) == S_OK) 
     {
         CComQIPtr<IOleObject> spOleObject(spUnk);
         if(!spOleObject) return E_NOINTERFACE;
 
         CComPtr<IOleClientSite> spClientSite;
         hr = (spOleObject->GetClientSite(&spClientSite)
         if(FAILED(hr)) return hr;
 
         CComQIPtr<IOleControlSite>spControlSite(spClientSite);
         if(! spControlSite) return E_NOINTERFACE;
 
         CComPtr<IDispatch> spExtendedDispatch;    
         hr = spControlSite->GetExtendedControl(&spExtendedDispatch);
         if(FAILED(hr)) return hr;
         
         CComVariant var(VT_BSTR);
         CComDispatchDriverdisp(spExtendedDispatch.p);
         hr = disp.GetPropertyByName(L"Name",&var);
         
         USES_CONVERSION;
         m_wndControlCombo.AddString(OLE2T(var.bstrVal));
         ...
         spUnk.Release();
     }
         ...
     return hr;
 }

Figure 28   Saving Native and Extended Properties


 HRESULT CForm::DoBinarySave()
 {
     m_nMaxControls = 0;
     HRESULT hr = E_UNEXPECTED;
 
     if(!m_spStream)
     {
         hr = CreateStream();
         if(FAILED(hr)) return hr;
     }
     else
     {
         LARGE_INTEGER l = {0,0};
         hr = m_spStream->Seek(l, STREAM_SEEK_SET, NULL);
         if(FAILED(hr)) return hr;
     }
 
     
     //Save all the properties of all the embeddings
     for(itAxWindowImpl it = m_listSites.begin();
         it ! = m_listSites.end();it++)
     {    
         CComPtr<IPersistStreamInit> spPersistStreamInit;
         hr = (*it)->QueryControl(&spPersistStreamInit);
         if(FAILED(hr)) continue;
     
         CLSID clsid ;
         spPersistStreamInit->GetClassID(&clsid);
 
         //write the header for each control first
         m_spStream->Write(&clsid, sizeof(CLSID), 0);
         ...
         if(FAILED(hr)) continue;
         
         //now, save the control's native properties
         hr = spPersistStreamInit->Save(m_spStream,TRUE);
 
         //Get IPersistStreamInit of the Extended control
         CComPtr<IPersistStreamInit> spExtendedPSI;
         if((*it)->m_pExtendedDispatchObj)
         {
             hr=(*it)->m_pExtendedDispatchObj->QueryInterface(&spExtendedPSI);
         }
 
         //Save Extended Properties
         if(spExtendedPSI)
         {
             hr = spExtendedPSI->Save(m_spStream,TRUE);
         }
     }
     //This will Free all the embeddings
     Close();
     return hr;
 }

Figure 29   CForm::PreTranslateAccelerator


 BOOL CForm::PreTranslateAccelerator(LPMSG pMsg, HRESULT& hRet)
 {
     hRet = S_OK;
     if ((pMsg->message < WM_KEYFIRST||pMsg->message > WM_KEYLAST) &&
        (pMsg->message < WM_MOUSEFIRST||pMsg->message > WM_MOUSELAST))
         return FALSE;
 
     // find a direct child of the 
     //dialog from the window that has focus
     
     HWND hWndCtl = ::GetFocus();
     if (IsChild(hWndCtl) && ::GetParent(hWndCtl) != m_hWnd)
     {
         do
         {
             hWndCtl = ::GetParent(hWndCtl);
         }
         while (::GetParent(hWndCtl) != m_hWnd);
     }
 
     // give controls a chance to translate this message
     if (::SendMessage(hWndCtl, WM_FORWARDMSG, 0, (LPARAM)pMsg) == 1)
         return TRUE;
 
     // special handling for keyboard messages
     switch(pMsg->message)
     {
     case WM_CHAR:
         if(::SendMessage(pMsg->hwnd, WM_GETDLGCODE, 0, 0L) == 0)
         return FALSE;    // let the container process this
         break;
     case WM_KEYDOWN:
         switch(LOWORD(pMsg->wParam))
         {
         case VK_EXECUTE:
         case VK_RETURN:
         case VK_ESCAPE:
         case VK_CANCEL:
         // we don't want to handle these, let the container do it
             return FALSE;
         }
         break;
     }
     return IsDialogMessage(pMsg);
 }

Figure 30   _tWinMain


 extern "C" int WINAPI _tWinMain(HINSTANCE hInstance,HINSTANCE, 
     LPTSTR lpCmdLine, int nCmdShow)
 {    
     ...
      ::OleInitialize(0);
      AtlAxWinInit();
 ...
     ::InitCommonControlsEx(&iccx);
 
 ... 
     //load the menu
 
     //create the container app-frame
     CContainerFrame wndFrame;
         
     wndFrame.GetWndClassInfo().m_wc.hIcon = 
         ::LoadIcon(_Module.GetResourceInstance(),
         MAKEINTRESOURCE(IDI_FORM));
 
     wndFrame.Create(GetDesktopWindow(), CWindow::rcDefault, 
         _T("VBLite [Design]"), 0, 0, (UINT)hMenu);
 
     wndFrame.ShowWindow(SW_SHOWMAXIMIZED);
     wndFrame.UpdateWindow();
 
 ...
     MSG msg;
     while (::GetMessage(&msg, 0, 0, 0))
     {
         if( !wndFrame.IsModeless()  && 
             wndFrame.PreTranslateAccelerator(&msg,hr) ){ continue; }
 
         ::TranslateMessage(&msg);
         ::DispatchMessage(&msg);
     }
     _Module.RevokeClassObjects();
      ...
      
     ::OleUninitialize();
     ...
 }

Figure 31   PropertyBag Properties


 <Form1 clsid="{AECB25D6-4581-11D2-8A38-00C04FA3FB82}">
 <Name vt="8">Form1</Name><PositionX vt="3">229</PositionX>
 <PositionY vt="3">159</PositionY>
 <SizeX vt="3">500</SizeX><SizeY vt="3">500</SizeY><_cx vt="19">13018</_cx>
 <_cy vt="19">12515</_cy><ControlBox vt="11">0</ControlBox>
 <Control clsid="{8E27C92B-1264-101C-8A2F-040224009C02}">
 <Name vt="8">Calendar1</Name><PositionX vt="3">48</PositionX>
 <PositionY vt="3">32</PositionY><SizeX vt="3">299</SizeX><SizeY vt="3">146</SizeY>
 <_Version vt="3">524288</_Version><_ExtentX vt="3">7620</_ExtentX>
 <_ExtentY vt="3">5080</_ExtentY><_StockProps vt="3">1</_StockProps>
 <BackColor vt="3">-2147483633</BackColor><Year vt="2">1999</Year>
 <Month vt="2">11</Month><Day vt="2">18</Day><DayLength vt="2">1</DayLength>
 <MonthLength vt="2">2</MonthLength><DayFontColor vt="3">0</DayFontColor>
 <FirstDay vt="2">1</FirstDay><GridCellEffect vt="3">1</GridCellEffect>
 <GridFontColor vt="3">10485760</GridFontColor>
 <GridLinesColor vt="3">-2147483632</GridLinesColor>
 <ShowDateSelectors vt="11">-1</ShowDateSelectors><ShowDays vt="11">-1</ShowDays>
 <ShowHorizontalGrid vt="11">-1</ShowHorizontalGrid>
 <ShowTitle vt="11">-1</ShowTitle><ShowVerticalGrid vt="11">-1</ShowVerticalGrid>
 <TitleFontColor vt="3">10485760</TitleFontColor>
 <ValueIsNull vt="11">0</ValueIsNull>
 <DayFont vt="13" clsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}">
 <Name vt="8">Arial</Name><Size vt="6">8.25</Size><Charset vt="2">0</Charset>
 <Weight vt="2">700</Weight><Underline vt="11">0</Underline>
 <Italic vt="11">0</Italic><Strikethrough vt="11">0</Strikethrough></DayFont>
 <GridFont vt="13" clsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}">
 <Name vt="8">Arial</Name><Size vt="6">8.25</Size><Charset vt="2">0</Charset>
 <Weight vt="2">400</Weight><Underline vt="11">0</Underline>
 <Italic vt="11">0</Italic><Strikethrough vt="11">0</Strikethrough></GridFont>
 <TitleFont vt="13" clsid="{0BE35203-8F91-11CE-9DE3-00AA004BB851}">
 <Name vt="8">Arial</Name><Size vt="6">12</Size><Charset vt="2">0</Charset>
 <Weight vt="2">700</Weight><Underline vt="11">0</Underline>
 <Italic vt="11">0</Italic><Strikethrough vt="11">0</Strikethrough></TitleFont></Control>
 <Control clsid="{6262D3A0-531B-11CF-91F6-C2863C385E30}">
 <Name vt="8">MSFlexGrid1</Name><PositionX vt="3">102</PositionX>
 <PositionY vt="3">233</PositionY><SizeX vt="3">319</SizeX><SizeY vt="3">184</SizeY>
 <_ExtentX vt="3">8229</_ExtentX><_ExtentY vt="3">4657</_ExtentY>
 <_Version vt="3">393216</_Version><Rows vt="3">10</Rows><Cols vt="3">20</Cols>
 <FixedRows vt="3">1</FixedRows><FixedCols vt="3">1</FixedCols>
 <RowHeightMin vt="3">0</RowHeightMin><BackColor vt="3">-2147483643</BackColor>
 <ForeColor vt="3">-2147483640</ForeColor>
 <BackColorFixed vt="3">-2147483633</BackColorFixed>
 <ForeColorFixed vt="3">-2147483630</ForeColorFixed>
 <BackColorSel vt="3">-2147483635</BackColorSel>
 <ForeColorSel vt="3">-2147483634</ForeColorSel><BackColorBkg vt="3">8421504</BackColorBkg>
 <GridColor vt="3">12632256</GridColor><GridColorFixed vt="3">0</GridColorFixed>
 <WordWrap vt="11">0</WordWrap><Redraw vt="11">-1</Redraw><AllowBigSelection vt="11">-1</AllowBigSelection>
 <ScrollTrack vt="11">0</ScrollTrack><Enabled vt="11">-1</Enabled>
 <RightToLeft vt="11">0</RightToLeft><TextStyle vt="2">0</TextStyle>
 <TextStyleFixed vt="2">0</TextStyleFixed><FocusRect vt="2">1</FocusRect>
 <HighLight vt="2">1</HighLight><FillStyle vt="2">0</FillStyle>
 <GridLines vt="2">1</GridLines><GridLinesFixed vt="2">2</GridLinesFixed>
 <ScrollBars vt="2">3</ScrollBars><SelectionMode vt="2">0</SelectionMode>
 <MergeCells vt="2">0</MergeCells><AllowUserResizing vt="2">0</AllowUserResizing>
 <PictureType vt="2">0</PictureType><BorderStyle vt="2">1</BorderStyle>
 <Appearance vt="2">1</Appearance><MousePointer vt="2">0</MousePointer>
 <GridLineWidth vt="2">1</GridLineWidth><FormatString vt="8"></FormatString>
 <OLEDropMode vt="2">0</OLEDropMode></Control></Form1>