Remove xfa_test for delivery
authorBo Xu <bo_xu@foxitsoftware.com>
Tue, 4 Nov 2014 02:38:41 +0000 (18:38 -0800)
committerBo Xu <bo_xu@foxitsoftware.com>
Tue, 4 Nov 2014 02:38:41 +0000 (18:38 -0800)
136 files changed:
xfa_test/FormFiller_Test/BookMarkView.cpp [deleted file]
xfa_test/FormFiller_Test/BookMarkView.h [deleted file]
xfa_test/FormFiller_Test/ChildFrm.cpp [deleted file]
xfa_test/FormFiller_Test/ChildFrm.h [deleted file]
xfa_test/FormFiller_Test/ConvertDlg.cpp [deleted file]
xfa_test/FormFiller_Test/ConvertDlg.h [deleted file]
xfa_test/FormFiller_Test/ExportPage.cpp [deleted file]
xfa_test/FormFiller_Test/ExportPage.h [deleted file]
xfa_test/FormFiller_Test/FX_SplitterWnd.cpp [deleted file]
xfa_test/FormFiller_Test/FX_SplitterWnd.h [deleted file]
xfa_test/FormFiller_Test/FindDlg.cpp [deleted file]
xfa_test/FormFiller_Test/FindDlg.h [deleted file]
xfa_test/FormFiller_Test/GotoPageDlg.cpp [deleted file]
xfa_test/FormFiller_Test/GotoPageDlg.h [deleted file]
xfa_test/FormFiller_Test/JS_ResponseDlg.cpp [deleted file]
xfa_test/FormFiller_Test/JS_ResponseDlg.h [deleted file]
xfa_test/FormFiller_Test/MainFrm.cpp [deleted file]
xfa_test/FormFiller_Test/MainFrm.h [deleted file]
xfa_test/FormFiller_Test/ReaderVC.cpp [deleted file]
xfa_test/FormFiller_Test/ReaderVC.dsp [deleted file]
xfa_test/FormFiller_Test/ReaderVC.h [deleted file]
xfa_test/FormFiller_Test/ReaderVC.rc [deleted file]
xfa_test/FormFiller_Test/ReaderVCDoc.cpp [deleted file]
xfa_test/FormFiller_Test/ReaderVCDoc.h [deleted file]
xfa_test/FormFiller_Test/ReaderVCView.cpp [deleted file]
xfa_test/FormFiller_Test/ReaderVCView.h [deleted file]
xfa_test/FormFiller_Test/StdAfx.cpp [deleted file]
xfa_test/FormFiller_Test/StdAfx.h [deleted file]
xfa_test/FormFiller_Test/TestJsDlg.cpp [deleted file]
xfa_test/FormFiller_Test/TestJsDlg.h [deleted file]
xfa_test/FormFiller_Test/ZoomDlg.cpp [deleted file]
xfa_test/FormFiller_Test/ZoomDlg.h [deleted file]
xfa_test/FormFiller_Test/res/BigHandCursor.cur [deleted file]
xfa_test/FormFiller_Test/res/Rd_SelText_Icon.bmp [deleted file]
xfa_test/FormFiller_Test/res/Rd_SelText_Icon_Dis.bmp [deleted file]
xfa_test/FormFiller_Test/res/ReaderVC.ico [deleted file]
xfa_test/FormFiller_Test/res/ReaderVC.rc2 [deleted file]
xfa_test/FormFiller_Test/res/ReaderVCDoc.ico [deleted file]
xfa_test/FormFiller_Test/res/SmallHandCursor.cur [deleted file]
xfa_test/FormFiller_Test/res/Toolbar.bmp [deleted file]
xfa_test/FormFiller_Test/res/bookmark.bmp [deleted file]
xfa_test/FormFiller_Test/res/bound.cur [deleted file]
xfa_test/FormFiller_Test/res/point.cur [deleted file]
xfa_test/FormFiller_Test/res/tool_actual_size.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_bookmark1.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_clockwise.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_counterclockwise.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_first.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_fit_page.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_fit_width.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hand1.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_about2.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_actual_size.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_bookmark1.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_clockwise.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_counterclockwise.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_first.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_first.xpm [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_fit_page.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_fit_width.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_hand1.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_last.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_next.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_open1.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_prev.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_print.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_search.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_snap_shot.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_zoomin.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_hot_zoomout.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_last.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_next.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_prev.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_print.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_search.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_snap_shot.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_zoomin.bmp [deleted file]
xfa_test/FormFiller_Test/res/tool_zoomout.bmp [deleted file]
xfa_test/FormFiller_Test/resource.h [deleted file]
xfa_test/pdf/BUILD.gn [deleted file]
xfa_test/pdf/DEPS [deleted file]
xfa_test/pdf/Info.plist [deleted file]
xfa_test/pdf/OWNERS [deleted file]
xfa_test/pdf/button.cc [deleted file]
xfa_test/pdf/button.h [deleted file]
xfa_test/pdf/chunk_stream.cc [deleted file]
xfa_test/pdf/chunk_stream.h [deleted file]
xfa_test/pdf/control.cc [deleted file]
xfa_test/pdf/control.h [deleted file]
xfa_test/pdf/document_loader.cc [deleted file]
xfa_test/pdf/document_loader.h [deleted file]
xfa_test/pdf/draw_utils.cc [deleted file]
xfa_test/pdf/draw_utils.h [deleted file]
xfa_test/pdf/fading_control.cc [deleted file]
xfa_test/pdf/fading_control.h [deleted file]
xfa_test/pdf/fading_controls.cc [deleted file]
xfa_test/pdf/fading_controls.h [deleted file]
xfa_test/pdf/instance.cc [deleted file]
xfa_test/pdf/instance.h [deleted file]
xfa_test/pdf/number_image_generator.cc [deleted file]
xfa_test/pdf/number_image_generator.h [deleted file]
xfa_test/pdf/out_of_process_instance.cc [deleted file]
xfa_test/pdf/out_of_process_instance.h [deleted file]
xfa_test/pdf/page_indicator.cc [deleted file]
xfa_test/pdf/page_indicator.h [deleted file]
xfa_test/pdf/paint_aggregator.cc [deleted file]
xfa_test/pdf/paint_aggregator.h [deleted file]
xfa_test/pdf/paint_manager.cc [deleted file]
xfa_test/pdf/paint_manager.h [deleted file]
xfa_test/pdf/pdf.cc [deleted file]
xfa_test/pdf/pdf.def [deleted file]
xfa_test/pdf/pdf.gyp [deleted file]
xfa_test/pdf/pdf.h [deleted file]
xfa_test/pdf/pdf.rc [deleted file]
xfa_test/pdf/pdf_engine.h [deleted file]
xfa_test/pdf/pdfium/pdfium_assert_matching_enums.cc [deleted file]
xfa_test/pdf/pdfium/pdfium_engine.cc [deleted file]
xfa_test/pdf/pdfium/pdfium_engine.h [deleted file]
xfa_test/pdf/pdfium/pdfium_mem_buffer_file_read.cc [deleted file]
xfa_test/pdf/pdfium/pdfium_mem_buffer_file_read.h [deleted file]
xfa_test/pdf/pdfium/pdfium_mem_buffer_file_write.cc [deleted file]
xfa_test/pdf/pdfium/pdfium_mem_buffer_file_write.h [deleted file]
xfa_test/pdf/pdfium/pdfium_page.cc [deleted file]
xfa_test/pdf/pdfium/pdfium_page.h [deleted file]
xfa_test/pdf/pdfium/pdfium_range.cc [deleted file]
xfa_test/pdf/pdfium/pdfium_range.h [deleted file]
xfa_test/pdf/preview_mode_client.cc [deleted file]
xfa_test/pdf/preview_mode_client.h [deleted file]
xfa_test/pdf/progress_control.cc [deleted file]
xfa_test/pdf/progress_control.h [deleted file]
xfa_test/pdf/resource.h [deleted file]
xfa_test/pdf/resource_consts.h [deleted file]
xfa_test/pdf/thumbnail_control.cc [deleted file]
xfa_test/pdf/thumbnail_control.h [deleted file]
xfa_test/process/process.cc [deleted file]
xfa_test/process/script.txt [deleted file]

diff --git a/xfa_test/FormFiller_Test/BookMarkView.cpp b/xfa_test/FormFiller_Test/BookMarkView.cpp
deleted file mode 100644 (file)
index 283c9a4..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-// BookMarkView.cpp : implementation file\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-#include "ChildFrm.h"\r
-#include "BookMarkView.h"\r
-#include "ReaderVCDoc.h"\r
-#include "ReaderVCView.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CBookMarkView\r
-\r
-IMPLEMENT_DYNCREATE(CBookMarkView, CTreeView)\r
-\r
-CBookMarkView::CBookMarkView()\r
-{\r
-       m_pFram = NULL;\r
-       m_pDoc = NULL;\r
-}\r
-\r
-CBookMarkView::~CBookMarkView()\r
-{\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(CBookMarkView, CTreeView)\r
-       //{{AFX_MSG_MAP(CBookMarkView)\r
-       ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnSelchanged)\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CBookMarkView drawing\r
-\r
-void CBookMarkView::OnDraw(CDC* pDC)\r
-{\r
-       CReaderVCDoc* pDoc = GetDocument();\r
-       // TODO: add draw code here\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CBookMarkView diagnostics\r
-\r
-#ifdef _DEBUG\r
-void CBookMarkView::AssertValid() const\r
-{\r
-       CTreeView::AssertValid();\r
-}\r
-\r
-void CBookMarkView::Dump(CDumpContext& dc) const\r
-{\r
-       CTreeView::Dump(dc);\r
-}\r
-\r
-CReaderVCDoc* CBookMarkView::GetDocument() // non-debug version is inline\r
-{\r
-       ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CReaderVCDoc)));\r
-       return (CReaderVCDoc*)m_pDocument;\r
-}\r
-#endif //_DEBUG\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CBookMarkView message handlers\r
-\r
-void CBookMarkView::OnInitialUpdate() \r
-{\r
-       CTreeView::OnInitialUpdate();\r
-       CReaderVCDoc* pDoc = GetDocument();\r
-       if (! m_pFram || !m_pFram->m_pView)\r
-       return;\r
-       m_pDoc = m_pFram->m_pView->GetPDFDoc();\r
-       if(m_pDoc == NULL) return;\r
-       int num = m_pFram->m_pView->GetTotalPages();\r
-    CString strName = pDoc->GetTitle();\r
-       FPDF_BOOKMARK bookmark1 = NULL;\r
-\r
-       //////////////////////////////////////////////////////////////////////////\r
-       //insert items\r
-       \r
-//     CTreeCtrl &treeCtrl = this->GetTreeCtrl();\r
-//     m_hItemRoot = treeCtrl.InsertItem(strName,0,0,TVI_ROOT,TVI_FIRST);\r
-//     treeCtrl.SetItemData(m_hItemRoot,0);\r
-//     bookmark1 = FPDFBookmark_GetFirstChild(m_pDoc, NULL);\r
-//     if (bookmark1 == NULL)//insert the page index to tree  \r
-//     {\r
-//             for (int i=0; i<num; i++)\r
-//             {\r
-//                     CString str;\r
-//                     str.Format(_T("Page%d"), i+1);\r
-//                     HTREEITEM hItem = treeCtrl.InsertItem(str);\r
-//                     treeCtrl.SetItemData(hItem, i);\r
-//             }\r
-//     }else{\r
-//             while(bookmark1 != NULL) {\r
-//                     this->InsertChildItem(bookmark1, m_hItemRoot, treeCtrl);\r
-//                     bookmark1 = FPDFBookmark_GetNextSibling(m_pDoc,bookmark1);\r
-//             } \r
-//     }\r
-//     treeCtrl.Expand(m_hItemRoot,TVE_EXPAND);\r
-//     \r
-//     LONG nStyle = ::GetWindowLong(this->m_hWnd, GWL_STYLE);\r
-//     nStyle |= TVS_LINESATROOT;\r
-//     nStyle |= TVS_HASLINES;\r
-//     nStyle |= TVS_HASBUTTONS;\r
-//     ::SetWindowLong(this->m_hWnd, GWL_STYLE, nStyle);\r
-       \r
-}\r
-\r
-void CBookMarkView::InsertChildItem(FPDF_BOOKMARK bookmark, HTREEITEM hItem, CTreeCtrl &treectrl)\r
-{\r
-\r
-//     CString strTitle;\r
-//     DWORD dwItemData = 0;\r
-//     WCHAR buffer[1024];\r
-//     CString str;\r
-//     int strlenth = 0;\r
-//     unsigned long pdf_actType = 0;\r
-//     //FPDF_BOOKMARK \r
-//     FPDF_DEST dest = NULL;\r
-//     FPDF_ACTION action = NULL;\r
-//     \r
-//     memset(buffer,0,1024*sizeof(WCHAR));\r
-//     strlenth = FPDFBookmark_GetTitle(bookmark, buffer, 0);\r
-//     int nlen = WideCharToMultiByte(CP_ACP,0,buffer,-1,NULL,NULL,NULL,NULL);\r
-//     char *buffer1 = new char[nlen];\r
-//     memset(buffer1,0,nlen);\r
-//     WideCharToMultiByte(CP_ACP,0,buffer,strlenth,buffer1,nlen,NULL,NULL);\r
-//     buffer1[nlen -1] = '\0';\r
-// /*  int strl = strlen(buffer1);\r
-//     strTitle = buffer;//\r
-//     strTitle = strTitle.Left(strl-1);*/\r
-//     hItem = treectrl.InsertItem(buffer1, 0, 0, hItem, TVI_LAST);\r
-//     action = FPDFBookmark_GetAction(bookmark);\r
-//     if (action != NULL)\r
-//     {\r
-//             pdf_actType = FPDFAction_GetType(action);\r
-//             if (pdf_actType == 1)\r
-//             {\r
-//                     dest = FPDFAction_GetDest(m_pDoc, action);\r
-//                     dwItemData = FPDFDest_GetPageIndex(m_pDoc, dest);\r
-//                     int nZoomMode = FPDFDest_GetZoomMode(dest);\r
-//                     if(nZoomMode == 1)\r
-//                     {\r
-//                             double nStartX = FPDFDest_GetZoomParam(dest, 0);\r
-//                             double nStartY = FPDFDest_GetZoomParam(dest, 1);\r
-//                             CPoint pos((int)nStartX, (int)nStartY);\r
-//                             m_PosMap.SetAt(hItem, pos);\r
-//                     }\r
-//                     treectrl.SetItemData(hItem, dwItemData);\r
-//                     \r
-//             }else{\r
-//                     dwItemData = 0;\r
-//                     treectrl.SetItemData(hItem, dwItemData);\r
-//             }\r
-//             \r
-//     }else{\r
-//             dest = FPDFBookmark_GetDest(m_pDoc, bookmark);\r
-//             dwItemData = FPDFDest_GetPageIndex(m_pDoc, dest);\r
-//             treectrl.SetItemData(hItem, dwItemData);\r
-//     }\r
-//     \r
-//     bookmark = FPDFBookmark_GetFirstChild(m_pDoc, bookmark);\r
-//     while(bookmark != NULL)\r
-//     {\r
-//             this->InsertChildItem(bookmark, hItem, treectrl);\r
-//             bookmark = FPDFBookmark_GetNextSibling(m_pDoc, bookmark);\r
-//     } \r
-//     delete buffer1;\r
-}\r
-\r
-void CBookMarkView::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult) \r
-{\r
-       NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;\r
-       // TODO: Add your control notification handler code here\r
-       HTREEITEM hItem;\r
-       DWORD dwPageIdex= 0;\r
-       if(m_pDoc == NULL) return;\r
-       hItem = GetTreeCtrl().GetSelectedItem();\r
-       dwPageIdex = GetTreeCtrl().GetItemData(hItem);\r
-       CPoint p;\r
-       if(0 == m_PosMap.Lookup(hItem, p))\r
-       {\r
-               p.x = 0; \r
-               p.y = 0;\r
-       }\r
-       m_pFram->m_pView->LoadPDFPage(m_pDoc, dwPageIdex, p);\r
-       m_pFram->m_pView->Invalidate();\r
-       *pResult = 0;\r
-}\r
-\r
diff --git a/xfa_test/FormFiller_Test/BookMarkView.h b/xfa_test/FormFiller_Test/BookMarkView.h
deleted file mode 100644 (file)
index d10964c..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#if !defined(AFX_BOOKMARKVIEW_H__B1EB2803_BE21_4768_A54B_2DE1E0FC968A__INCLUDED_)\r
-#define AFX_BOOKMARKVIEW_H__B1EB2803_BE21_4768_A54B_2DE1E0FC968A__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-// BookMarkView.h : header file\r
-//\r
-\r
-class CChildFrame;\r
-class CReaderVCDoc;\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CBookMarkView view\r
-\r
-class CBookMarkView : public CTreeView\r
-{\r
-protected:\r
-       CBookMarkView();           // protected constructor used by dynamic creation\r
-       DECLARE_DYNCREATE(CBookMarkView)\r
-\r
-// Attributes\r
-public:\r
-       CChildFrame *m_pFram;\r
-       FPDF_DOCUMENT m_pDoc;\r
-       HTREEITEM m_hItemRoot;\r
-       CReaderVCDoc* GetDocument();\r
-// Operations\r
-public:\r
-       void InsertChildItem(FPDF_BOOKMARK bookmark, HTREEITEM hItem, CTreeCtrl &treectrl);\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CBookMarkView)\r
-       public:\r
-       virtual void OnInitialUpdate();\r
-       protected:\r
-       virtual void OnDraw(CDC* pDC);      // overridden to draw this view\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-protected:\r
-       virtual ~CBookMarkView();\r
-#ifdef _DEBUG\r
-       virtual void AssertValid() const;\r
-       virtual void Dump(CDumpContext& dc) const;\r
-#endif\r
-\r
-       // Generated message map functions\r
-protected:\r
-       //{{AFX_MSG(CBookMarkView)\r
-       afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-private:\r
-       CMap<HTREEITEM, HTREEITEM&, CPoint, CPoint&> m_PosMap; \r
-};\r
-\r
-#ifndef _DEBUG  // debug version in PDFReaderVCView.cpp\r
-inline CReaderVCDoc* CBookMarkView::GetDocument()\r
-{ return (CReaderVCDoc*)m_pDocument; }\r
-#endif\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_BOOKMARKVIEW_H__B1EB2803_BE21_4768_A54B_2DE1E0FC968A__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/ChildFrm.cpp b/xfa_test/FormFiller_Test/ChildFrm.cpp
deleted file mode 100644 (file)
index 8d32a72..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-// ChildFrm.cpp : implementation of the CChildFrame class\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-\r
-#include "ChildFrm.h"\r
-#include "FX_SplitterWnd.h"\r
-#include "BookmarkView.h"\r
-#include "ReaderVCView.h"\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CChildFrame\r
-\r
-IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)\r
-\r
-BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)\r
-       //{{AFX_MSG_MAP(CChildFrame)\r
-       ON_WM_SIZE()\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CChildFrame construction/destruction\r
-\r
-CChildFrame::CChildFrame()\r
-{\r
-       // TODO: add member initialization code here\r
-       //m_nPosH = m_nPosV = 0;\r
-//     m_pBkView = NULL;\r
-       m_pView = NULL;\r
-//     m_bBookmark = FALSE;\r
-}\r
-\r
-CChildFrame::~CChildFrame()\r
-{\r
-/*     if (m_pBkView != NULL)\r
-       {\r
-               delete m_pBkView;\r
-               m_pBkView = NULL;\r
-       }\r
-       if (m_pView != NULL)\r
-       {\r
-               delete m_pView;\r
-               m_pView = NULL;\r
-       }*/\r
-}\r
-\r
-BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)\r
-{\r
-\r
-       if( !CMDIChildWnd::PreCreateWindow(cs) )\r
-               return FALSE;\r
-       cs.style |= WS_MAXIMIZE | WS_VISIBLE;\r
-       return TRUE;\r
-}\r
-\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CChildFrame diagnostics\r
-\r
-#ifdef _DEBUG\r
-void CChildFrame::AssertValid() const\r
-{\r
-       CMDIChildWnd::AssertValid();\r
-}\r
-\r
-void CChildFrame::Dump(CDumpContext& dc) const\r
-{\r
-       CMDIChildWnd::Dump(dc);\r
-}\r
-\r
-#endif //_DEBUG\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CChildFrame message handlers\r
-\r
-\r
-\r
-\r
-\r
-void CChildFrame::OnSize(UINT nType, int cx, int cy) \r
-{\r
-       CMDIChildWnd::OnSize(nType, cx, cy);\r
-\r
-       \r
-}\r
-\r
-BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) \r
-{\r
-       if ( !m_wndSplitter.CreateStatic( this, 1, 2 ) ||\r
-               !m_wndSplitter.CreateView( 0,0,RUNTIME_CLASS(CBookMarkView),CSize(180,0),pContext )|| \r
-                !m_wndSplitter.CreateView( 0,1,pContext->m_pNewViewClass,CSize(0,0),pContext )) \r
-               {\r
-                       return FALSE;\r
-               }\r
-       m_pBkView = (CBookMarkView *)(m_wndSplitter.GetPane(0,0));\r
-       m_pBkView->m_pFram = this;\r
-       m_pView = (CReaderVCView*)(m_wndSplitter.GetPane(0,1));\r
-       m_pView->m_pFram = this;\r
-       this->SetActiveView( (CView*)m_wndSplitter.GetPane(0,1) );\r
-       \r
-       return TRUE;\r
-       \r
-       //return CMDIChildWnd::OnCreateClient(lpcs, pContext);\r
-}\r
diff --git a/xfa_test/FormFiller_Test/ChildFrm.h b/xfa_test/FormFiller_Test/ChildFrm.h
deleted file mode 100644 (file)
index dcfc7bd..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// ChildFrm.h : interface of the CChildFrame class\r
-//\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#if !defined(AFX_CHILDFRM_H__452F838E_A3F7_4BBF_B4BB_4765F4D394E7__INCLUDED_)\r
-#define AFX_CHILDFRM_H__452F838E_A3F7_4BBF_B4BB_4765F4D394E7__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-\r
-//class CFX_SplitterWnd;\r
-#include "FX_SplitterWnd.h"\r
-class CReaderVCView;\r
-class CBookMarkView;\r
-//class CFX_SplitterWnd;\r
-class CChildFrame : public CMDIChildWnd\r
-{\r
-       DECLARE_DYNCREATE(CChildFrame)\r
-public:\r
-       CChildFrame();\r
-\r
-// Attributes\r
-public:\r
-       CFX_SplitterWnd m_wndSplitter;\r
-       CReaderVCView* m_pView;\r
-       CBookMarkView* m_pBkView;\r
-//     BOOL m_bBookmark;\r
-// Operations\r
-public:\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CChildFrame)\r
-       public:\r
-       virtual BOOL PreCreateWindow(CREATESTRUCT& cs);\r
-       protected:\r
-       virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-public:\r
-       virtual ~CChildFrame();\r
-#ifdef _DEBUG\r
-       virtual void AssertValid() const;\r
-       virtual void Dump(CDumpContext& dc) const;\r
-#endif\r
-\r
-// Generated message map functions\r
-protected:\r
-       //{{AFX_MSG(CChildFrame)\r
-       afx_msg void OnSize(UINT nType, int cx, int cy);\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-private:\r
-       //int m_nPosH, m_nPosV;\r
-};\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_CHILDFRM_H__452F838E_A3F7_4BBF_B4BB_4765F4D394E7__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/ConvertDlg.cpp b/xfa_test/FormFiller_Test/ConvertDlg.cpp
deleted file mode 100644 (file)
index ec31948..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// ConvertDlg.cpp : implementation file\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-#include "ConvertDlg.h"\r
-\r
-#include "MainFrm.h"\r
-#include "ChildFrm.h"\r
-#include "ReaderVCView.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CConvertDlg dialog\r
-\r
-\r
-CConvertDlg::CConvertDlg(CWnd* pParent /*=NULL*/)\r
-       : CDialog(CConvertDlg::IDD, pParent)\r
-{\r
-       //{{AFX_DATA_INIT(CConvertDlg)\r
-       m_nFlag = -1;\r
-       //}}AFX_DATA_INIT\r
-}\r
-\r
-\r
-void CConvertDlg::DoDataExchange(CDataExchange* pDX)\r
-{\r
-       CDialog::DoDataExchange(pDX);\r
-       //{{AFX_DATA_MAP(CConvertDlg)\r
-       DDX_Radio(pDX, IDC_RADIO_Stream, m_nFlag);\r
-       //}}AFX_DATA_MAP\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(CConvertDlg, CDialog)\r
-       //{{AFX_MSG_MAP(CConvertDlg)\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CConvertDlg message handlers\r
-\r
-BOOL CConvertDlg::OnInitDialog() \r
-{\r
-       CDialog::OnInitDialog();\r
-       \r
-       // TODO: Add extra initialization here\r
-       m_pView = (CReaderVCView *)(((CChildFrame *)((CMainFrame *)AfxGetMainWnd())->GetActiveFrame())->GetActiveView());\r
-       ASSERT(m_pView);\r
-       ((CButton *)GetDlgItem(IDC_RADIO_Appearance))->SetCheck(1);\r
-       return TRUE;  // return TRUE unless you set the focus to a control\r
-                     // EXCEPTION: OCX Property Pages should return FALSE\r
-}\r
-\r
-void CConvertDlg::OnOK() \r
-{\r
-       // TODO: Add extra validation here\r
-       UpdateData(TRUE);\r
-       CDialog::OnOK();\r
-}\r
diff --git a/xfa_test/FormFiller_Test/ConvertDlg.h b/xfa_test/FormFiller_Test/ConvertDlg.h
deleted file mode 100644 (file)
index 8ef9932..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#if !defined(AFX_CONVERTDLG_H__9BB8EADD_CCDD_4C68_A8A0_C1656653A947__INCLUDED_)\r
-#define AFX_CONVERTDLG_H__9BB8EADD_CCDD_4C68_A8A0_C1656653A947__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-// ConvertDlg.h : header file\r
-//\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CConvertDlg dialog\r
-class CReaderVCView;\r
-class CConvertDlg : public CDialog\r
-{\r
-// Construction\r
-public:\r
-       CConvertDlg(CWnd* pParent = NULL);   // standard constructor\r
-\r
-// Dialog Data\r
-       //{{AFX_DATA(CConvertDlg)\r
-       enum { IDD = IDD_DLG_CONVERT };\r
-       int             m_nFlag;\r
-       //}}AFX_DATA\r
-\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CConvertDlg)\r
-       protected:\r
-       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-protected:\r
-       CReaderVCView *m_pView;\r
-       // Generated message map functions\r
-       //{{AFX_MSG(CConvertDlg)\r
-       virtual BOOL OnInitDialog();\r
-       virtual void OnOK();\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_CONVERTDLG_H__9BB8EADD_CCDD_4C68_A8A0_C1656653A947__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/ExportPage.cpp b/xfa_test/FormFiller_Test/ExportPage.cpp
deleted file mode 100644 (file)
index 76287a7..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-// ExportPage.cpp : implementation file\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-#include "ExportPage.h"\r
-\r
-#include "MainFrm.h"\r
-#include "ChildFrm.h"\r
-#include "ReaderVCView.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CExportPage dialog\r
-\r
-\r
-CExportPage::CExportPage(CWnd* pParent /*=NULL*/)\r
-       : CDialog(CExportPage::IDD, pParent)\r
-{\r
-       //{{AFX_DATA_INIT(CExportPage)\r
-       m_nHeight = 0;\r
-       m_nPageHeight = 0;\r
-       m_nRotate = 0;\r
-       m_nWidth = 0;\r
-       m_nPageWidth = 0;\r
-       //}}AFX_DATA_INIT\r
-       m_bitmap = NULL;\r
-}\r
-\r
-\r
-void CExportPage::DoDataExchange(CDataExchange* pDX)\r
-{\r
-       CDialog::DoDataExchange(pDX);\r
-       //{{AFX_DATA_MAP(CExportPage)\r
-       DDX_Text(pDX, IDC_EDIT_HEIGHT, m_nHeight);\r
-       DDX_Text(pDX, IDC_EDIT_PAGE_HEIGHT, m_nPageHeight);\r
-       DDX_Text(pDX, IDC_EDIT_ROTATE, m_nRotate);\r
-       DDX_Text(pDX, IDC_EDIT_WIDTH, m_nWidth);\r
-       DDX_Text(pDX, IDC_EDIT_PAGE_WIDTH, m_nPageWidth);\r
-       //}}AFX_DATA_MAP\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(CExportPage, CDialog)\r
-       //{{AFX_MSG_MAP(CExportPage)\r
-       ON_BN_CLICKED(IDC_Rander_Page, OnRanderPage)\r
-       ON_BN_CLICKED(IDC_Save, OnSave)\r
-       ON_WM_PAINT()\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CExportPage message handlers\r
-\r
-void CExportPage::OnRanderPage() \r
-{\r
-       if (m_pView)\r
-       {\r
-               UpdateData(TRUE);\r
-               m_page=m_pView->GetPage();\r
-               if (!m_page) return;\r
-               if (m_nRotate==1 || m_nRotate==3)\r
-               {\r
-                       int temp;\r
-                       temp=m_nHeight;\r
-                       m_nHeight=m_nWidth;\r
-                       m_nWidth=temp;\r
-               }\r
-               m_bitmap=FPDFBitmap_Create(m_nWidth,m_nHeight,FPDFBitmap_BGRx);\r
-               FPDFBitmap_FillRect(m_bitmap,0,0,m_nWidth,m_nHeight,0xff,0xff,0xff,0xff);\r
-               FPDF_RenderPageBitmap(m_bitmap,m_page,0,0,200,200,m_nRotate,FPDF_ANNOT);\r
-               Invalidate();\r
-               if (m_nRotate==1 || m_nRotate==3)\r
-               {\r
-                       int temp;\r
-                       temp=m_nHeight;\r
-                       m_nHeight=m_nWidth;\r
-                       m_nWidth=temp;\r
-               }\r
-               //FPDFBitmap_Destroy(bitmap);\r
-               UpdateData(FALSE);\r
-       }\r
-       \r
-}\r
-\r
-void CExportPage::InitDialogInfo(CReaderVCView *pView)\r
-{\r
-       m_pView=pView;\r
-       if (pView)      m_page=pView->GetPage();\r
-       SetDlgInfo();\r
-}\r
-\r
-void CExportPage::SetDlgInfo()\r
-{\r
-       if (!m_page) return;\r
-       double height,width;\r
-       width=FPDF_GetPageWidth(m_page);\r
-       height=FPDF_GetPageHeight(m_page);\r
-       \r
-       UpdateData(TRUE);       \r
-       m_nPageHeight = (int)height;\r
-       m_nPageWidth = (int)width;\r
-       m_nWidth=(int)width/3;\r
-       m_nHeight=(int)height/3;\r
-       UpdateData(FALSE);\r
-}\r
-\r
-void CExportPage::OnSave() \r
-{\r
-       CFileDialog SavDlg(FALSE,"","",OFN_FILEMUSTEXIST |OFN_HIDEREADONLY,"bmp(*.bmp)|*.bmp||All Files(*.*)|*.*");\r
-       if (SavDlg.DoModal()==IDOK)\r
-       {\r
-               CString strFileName = SavDlg.GetPathName();\r
-               BITMAPFILEHEADER bitmapFileHeader;\r
-               BITMAPINFOHEADER bitmapInfoHeader;\r
-               BITMAP strBitmap;\r
-               int wBitCount = 32;\r
-               winbmp.GetBitmap(&strBitmap);\r
-               DWORD dwBmBitsSize = ((strBitmap.bmWidth * wBitCount+31)/32) * 4 * strBitmap.bmHeight;\r
-               \r
-               bitmapFileHeader.bfType = 0x4D42;\r
-               bitmapFileHeader.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + dwBmBitsSize;\r
-               bitmapFileHeader.bfReserved1 = bitmapFileHeader.bfReserved2 = 0;\r
-               bitmapFileHeader.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);\r
-               \r
-               bitmapInfoHeader.biSize = sizeof(BITMAPINFOHEADER);\r
-               bitmapInfoHeader.biWidth = strBitmap.bmWidth;\r
-               bitmapInfoHeader.biHeight = strBitmap.bmHeight;\r
-               bitmapInfoHeader.biPlanes = 1;\r
-               bitmapInfoHeader.biBitCount = wBitCount;\r
-               bitmapInfoHeader.biClrImportant = BI_RGB;\r
-               bitmapInfoHeader.biSizeImage = 0; //strBitmap.bmWidth * strBitmap.bmHeight;\r
-               bitmapInfoHeader.biXPelsPerMeter = 0;\r
-               bitmapInfoHeader.biYPelsPerMeter = 0;\r
-               bitmapInfoHeader.biClrUsed = 0;\r
-               bitmapInfoHeader.biCompression = 0;\r
-               \r
-               char* context = new char[dwBmBitsSize];\r
-               CWindowDC dc(NULL);\r
-               GetDIBits(dc.GetSafeHdc(), (HBITMAP)winbmp.m_hObject, 0, bitmapInfoHeader.biHeight, (LPVOID)context,(BITMAPINFO*)&bitmapInfoHeader, DIB_RGB_COLORS);\r
-               \r
-               CFile file;\r
-               file.Open(strFileName, CFile::modeCreate|CFile::modeWrite);\r
-               file.Write(&bitmapFileHeader, sizeof(BITMAPFILEHEADER));\r
-               file.Write(&bitmapInfoHeader, sizeof(BITMAPINFOHEADER));\r
-               file.Write(context, dwBmBitsSize);\r
-               \r
-               file.Close();\r
-               delete context;\r
-       }\r
-}\r
-\r
-void CExportPage::OnPaint() \r
-{\r
-       CPaintDC dc(this); // device context for painting\r
-       \r
-       // TODO: Add your message handler code here\r
-       if(m_bitmap)\r
-       {\r
-               //      CDC* pDc=GetDC();\r
-               int bufsize=FPDFBitmap_GetStride(m_bitmap)*m_nHeight;\r
-               void* bmpbuf=FPDFBitmap_GetBuffer(m_bitmap);\r
-               CDC MemDC;\r
-               CDC   *pDc   =   GetDlgItem(IDC_STATIC_BITMAP)->GetDC();     //ID:   picture \r
-               CRect   rect;\r
-               ((CWnd *)GetDlgItem(IDC_STATIC_BITMAP))->GetWindowRect(rect);\r
-               \r
-               MemDC.CreateCompatibleDC(pDc);\r
-               if((HBITMAP)winbmp != NULL)\r
-                       winbmp.DeleteObject();\r
-               if(HBITMAP(winbmp) == NULL)\r
-               {\r
-                       winbmp.CreateCompatibleBitmap(pDc,m_nWidth,m_nHeight);\r
-                       winbmp.SetBitmapBits(bufsize,bmpbuf);\r
-               }\r
-\r
-               MemDC.SelectObject(&winbmp); \r
-               \r
-               pDc->BitBlt(0 , 0 , rect.Width(), rect.Height(), &MemDC,0,0,SRCCOPY);\r
-               //pDc->StretchBlt(0,0,rect.right-rect.left,rect.bottom-rect.top,&MemDC,0,0,m_nWidth,m_nHeight,SRCCOPY);   \r
-               MemDC.DeleteDC();     \r
-       }\r
-       // Do not call CDialog::OnPaint() for painting messages\r
-}\r
diff --git a/xfa_test/FormFiller_Test/ExportPage.h b/xfa_test/FormFiller_Test/ExportPage.h
deleted file mode 100644 (file)
index 1742991..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#if !defined(AFX_EXPORTPAGE_H__D9B06547_96CA_4749_88CB_2506D8AF61D6__INCLUDED_)\r
-#define AFX_EXPORTPAGE_H__D9B06547_96CA_4749_88CB_2506D8AF61D6__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-// ExportPage.h : header file\r
-//\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CExportPage dialog\r
-class CReaderVCView;\r
-\r
-class CExportPage : public CDialog\r
-{\r
-// Construction\r
-public:\r
-       CBitmap winbmp;\r
-       FPDF_BITMAP m_bitmap;\r
-       FPDF_PAGE m_page;\r
-       CReaderVCView *m_pView;\r
-       void SetDlgInfo();\r
-       void InitDialogInfo(CReaderVCView *pView);\r
-       CExportPage(CWnd* pParent = NULL);   // standard constructor\r
-\r
-// Dialog Data\r
-       //{{AFX_DATA(CExportPage)\r
-       enum { IDD = IDD_EXPORT_PAGE };\r
-       int             m_nHeight;\r
-       int             m_nPageHeight;\r
-       int             m_nRotate;\r
-       int             m_nWidth;\r
-       int             m_nPageWidth;\r
-       //}}AFX_DATA\r
-\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CExportPage)\r
-       protected:\r
-       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-protected:\r
-\r
-       // Generated message map functions\r
-       //{{AFX_MSG(CExportPage)\r
-       afx_msg void OnRanderPage();\r
-       afx_msg void OnSave();\r
-       afx_msg void OnPaint();\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_EXPORTPAGE_H__D9B06547_96CA_4749_88CB_2506D8AF61D6__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/FX_SplitterWnd.cpp b/xfa_test/FormFiller_Test/FX_SplitterWnd.cpp
deleted file mode 100644 (file)
index 4024bb5..0000000
+++ /dev/null
@@ -1,373 +0,0 @@
-// FX_SplitterWnd.cpp: implementation of the CFX_SplitterWnd class.\r
-//\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-#include "stdafx.h"\r
-//#include "teststatusbar.h"\r
-#include "FX_SplitterWnd.h"\r
-\r
-#include <afxpriv.h>\r
-\r
-#ifdef _DEBUG\r
-#undef THIS_FILE\r
-static char THIS_FILE[]=__FILE__;\r
-#define new DEBUG_NEW\r
-#endif\r
-\r
-//////////////////////////////////////////////////////////////////////\r
-// Construction/Destruction\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-CFX_SplitterWnd::CFX_SplitterWnd()\r
-{\r
-       m_cxSplitter    = m_cySplitter = 4 + 1 + 1;\r
-       m_cxBorderShare = m_cyBorderShare = 0;\r
-       m_cxSplitterGap = m_cySplitterGap = 4 + 1 + 1;\r
-       m_cxBorder              = m_cyBorder = 1;\r
-       m_nHidedCol             = -1;\r
-       m_bBarLocked    = FALSE;\r
-}\r
-\r
-CFX_SplitterWnd::~CFX_SplitterWnd()\r
-{\r
-\r
-}\r
-\r
-BEGIN_MESSAGE_MAP(CFX_SplitterWnd, CSplitterWnd)\r
-       //{{AFX_MSG_MAP(CFX_SplitterWnd)\r
-       ON_WM_LBUTTONDOWN()\r
-       ON_WM_MOUSEMOVE()\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-void CFX_SplitterWnd::OnDrawSplitter(CDC *pDC,ESplitType nType,const CRect &rectArg)\r
-{\r
-       if((nType != splitBorder) || (pDC == NULL))\r
-       {\r
-               CSplitterWnd::OnDrawSplitter(pDC, nType, rectArg);\r
-               return;\r
-       }\r
-\r
-       pDC->Draw3dRect(rectArg, GetSysColor(COLOR_BTNSHADOW), GetSysColor(COLOR_BTNHIGHLIGHT));\r
-}\r
-void CFX_SplitterWnd::RecalcLayout()\r
-{\r
-       ASSERT_VALID(this);\r
-       ASSERT(m_nRows > 0 && m_nCols > 0); // must have at least one pane\r
-\r
-       CRect rectClient;\r
-       GetClientRect(rectClient);\r
-       rectClient.InflateRect(-m_cxBorder, -m_cyBorder);\r
-\r
-       CRect rectInside;\r
-       GetInsideRect(rectInside);\r
-\r
-       // layout columns (restrict to possible sizes)\r
-       LayoutRowCol(m_pColInfo, m_nCols, rectInside.Width(), m_cxSplitterGap);\r
-       LayoutRowCol(m_pRowInfo, m_nRows, rectInside.Height(), m_cySplitterGap);\r
-\r
-       // adjust the panes (and optionally scroll bars)\r
-\r
-       // give the hint for the maximum number of HWNDs\r
-       AFX_SIZEPARENTPARAMS layout;\r
-       layout.hDWP = ::BeginDeferWindowPos((m_nCols + 1) * (m_nRows + 1) + 1);\r
-\r
-       // size of scrollbars\r
-       int cx = rectClient.right - rectInside.right;\r
-       int cy = rectClient.bottom - rectInside.bottom;\r
-\r
-       // reposition size box\r
-       if (m_bHasHScroll && m_bHasVScroll)\r
-       {\r
-               CWnd* pScrollBar = GetDlgItem(AFX_IDW_SIZE_BOX);\r
-               ASSERT(pScrollBar != NULL);\r
-\r
-               // fix style if necessary\r
-               BOOL bSizingParent = (GetSizingParent() != NULL);\r
-               // modifyStyle returns TRUE if style changes\r
-               if (pScrollBar->ModifyStyle(SBS_SIZEGRIP|SBS_SIZEBOX,\r
-                               bSizingParent ? SBS_SIZEGRIP : SBS_SIZEBOX))\r
-                       pScrollBar->Invalidate();\r
-               pScrollBar->EnableWindow(bSizingParent);\r
-\r
-               // reposition the size box\r
-               DeferClientPos(&layout, pScrollBar,\r
-                       rectInside.right,\r
-                       rectInside.bottom, cx, cy, TRUE);\r
-       }\r
-\r
-       // reposition scroll bars\r
-       if (m_bHasHScroll)\r
-       {\r
-               int cxSplitterBox = m_cxSplitter;// split box bigger\r
-               int x = rectClient.left;\r
-               int y = rectInside.bottom;\r
-               for (int col = 0; col < m_nCols; col++)\r
-               {\r
-                       CWnd* pScrollBar = GetDlgItem(AFX_IDW_HSCROLL_FIRST + col);\r
-                       ASSERT(pScrollBar != NULL);\r
-                       int cx = m_pColInfo[col].nCurSize;\r
-                       if (col == 0 && m_nCols < m_nMaxCols)\r
-                               x += cxSplitterBox, cx -= cxSplitterBox;\r
-                       DeferClientPos(&layout, pScrollBar, x, y, cx, cy, TRUE);\r
-                       x += cx + m_cxSplitterGap;\r
-               }\r
-       }\r
-\r
-       if (m_bHasVScroll)\r
-       {\r
-               int cySplitterBox = m_cySplitter;// split box bigger\r
-               int x = rectInside.right;\r
-               int y = rectClient.top;\r
-               for (int row = 0; row < m_nRows; row++)\r
-               {\r
-                       CWnd* pScrollBar = GetDlgItem(AFX_IDW_VSCROLL_FIRST + row);\r
-                       ASSERT(pScrollBar != NULL);\r
-                       int cy = m_pRowInfo[row].nCurSize;\r
-                       if (row == 0 && m_nRows < m_nMaxRows)\r
-                               y += cySplitterBox, cy -= cySplitterBox;\r
-                       DeferClientPos(&layout, pScrollBar, x, y, cx, cy, TRUE);\r
-                       y += cy + m_cySplitterGap;\r
-               }\r
-       }\r
-\r
-       //BLOCK: Reposition all the panes\r
-       {\r
-               int x = rectClient.left;\r
-               for (int col = 0; col < m_nCols; col++)\r
-               {\r
-                       int cx = m_pColInfo[col].nCurSize;\r
-                       int y = rectClient.top;\r
-                       for (int row = 0; row < m_nRows; row++)\r
-                       {\r
-                               int cy = m_pRowInfo[row].nCurSize;\r
-                               CWnd* pWnd = GetPane(row, col);\r
-                               DeferClientPos(&layout, pWnd, x, y, cx, cy, FALSE);\r
-                               y += cy + m_cySplitterGap;\r
-                       }\r
-                       x += cx + m_cxSplitterGap;\r
-               }\r
-       }\r
-\r
-       // move and resize all the windows at once!\r
-       if (layout.hDWP == NULL || !::EndDeferWindowPos(layout.hDWP))\r
-               TRACE0("Warning: DeferWindowPos failed - low system resources.\n");\r
-\r
-       // invalidate all the splitter bars (with NULL pDC)\r
-       DrawAllSplitBars(NULL, rectInside.right, rectInside.bottom);\r
-}\r
-\r
-void CFX_SplitterWnd::DeferClientPos(AFX_SIZEPARENTPARAMS *lpLayout,CWnd *pWnd,int x,int y,int cx,int cy,BOOL bScrollBar)\r
-{\r
-       ASSERT(pWnd != NULL);\r
-       ASSERT(pWnd->m_hWnd != NULL);\r
-\r
-       if (bScrollBar)\r
-       {\r
-               // if there is enough room, draw scroll bar without border\r
-               // if there is not enough room, set the WS_BORDER bit so that\r
-               //   we will at least get a proper border drawn\r
-               BOOL bNeedBorder = (cx <= 1 || cy <= 1);\r
-               pWnd->ModifyStyle(bNeedBorder ? 0 : 1, bNeedBorder ? 1 : 0);\r
-       }\r
-       CRect rect(x, y, x+cx, y+cy);\r
-\r
-       // adjust for 3d border (splitter windows have implied border)\r
-       if ((pWnd->GetExStyle() & WS_EX_CLIENTEDGE) || pWnd->IsKindOf(RUNTIME_CLASS(CSplitterWnd)))\r
-       {\r
-               rect.InflateRect(1, 1); // for proper draw CFlatSplitterWnd in view\r
-//             rect.InflateRect(afxData.cxBorder2, afxData.cyBorder2);\r
-       }\r
-\r
-       // first check if the new rectangle is the same as the current\r
-       CRect rectOld;\r
-       pWnd->GetWindowRect(rectOld);\r
-       pWnd->GetParent()->ScreenToClient(&rectOld);\r
-       if (rect != rectOld)\r
-               AfxRepositionWindow(lpLayout, pWnd->m_hWnd, rect);\r
-}\r
-\r
-void CFX_SplitterWnd::LayoutRowCol(CSplitterWnd::CRowColInfo *pInfoArray,int nMax,int nSize,int nSizeSplitter)\r
-{\r
-       ASSERT(pInfoArray != NULL);\r
-       ASSERT(nMax > 0);\r
-       ASSERT(nSizeSplitter > 0);\r
-\r
-       CSplitterWnd::CRowColInfo* pInfo;\r
-       int i;\r
-\r
-       if (nSize < 0)\r
-               nSize = 0;  // if really too small, layout as zero size\r
-\r
-       // start with ideal sizes\r
-       for (i = 0, pInfo = pInfoArray; i < nMax-1; i++, pInfo++)\r
-       {\r
-               if (pInfo->nIdealSize < pInfo->nMinSize)\r
-                       pInfo->nIdealSize = 0;      // too small to see\r
-               pInfo->nCurSize = pInfo->nIdealSize;\r
-       }\r
-       pInfo->nCurSize = INT_MAX;  // last row/column takes the rest\r
-\r
-       for (i = 0, pInfo = pInfoArray; i < nMax; i++, pInfo++)\r
-       {\r
-               ASSERT(nSize >= 0);\r
-               if (nSize == 0)\r
-               {\r
-                       // no more room (set pane to be invisible)\r
-                       pInfo->nCurSize = 0;\r
-                       continue;       // don't worry about splitters\r
-               }\r
-               else if (nSize < pInfo->nMinSize && i != 0)\r
-               {\r
-                       // additional panes below the recommended minimum size\r
-                       //   aren't shown and the size goes to the previous pane\r
-                       pInfo->nCurSize = 0;\r
-\r
-                       // previous pane already has room for splitter + border\r
-                       //   add remaining size and remove the extra border\r
-                       (pInfo-1)->nCurSize += nSize + 2;\r
-                       nSize = 0;\r
-               }\r
-               else\r
-               {\r
-                       // otherwise we can add the second pane\r
-                       ASSERT(nSize > 0);\r
-                       if (pInfo->nCurSize == 0)\r
-                       {\r
-                               // too small to see\r
-                               if (i != 0)\r
-                                       pInfo->nCurSize = 0;\r
-                       }\r
-                       else if (nSize < pInfo->nCurSize)\r
-                       {\r
-                               // this row/col won't fit completely - make as small as possible\r
-                               pInfo->nCurSize = nSize;\r
-                               nSize = 0;\r
-                       }\r
-                       else\r
-                       {\r
-                               // can fit everything\r
-                               nSize -= pInfo->nCurSize;\r
-                       }\r
-               }\r
-\r
-               // see if we should add a splitter\r
-               ASSERT(nSize >= 0);\r
-               if (i != nMax - 1)\r
-               {\r
-                       // should have a splitter\r
-                       if (nSize > nSizeSplitter)\r
-                       {\r
-                               nSize -= nSizeSplitter; // leave room for splitter + border\r
-                               ASSERT(nSize > 0);\r
-                       }\r
-                       else\r
-                       {\r
-                               // not enough room - add left over less splitter size\r
-                               pInfo->nCurSize += nSize;\r
-                               if (pInfo->nCurSize > (nSizeSplitter - 2))\r
-                                       pInfo->nCurSize -= (nSizeSplitter - 2);\r
-                               nSize = 0;\r
-                       }\r
-               }\r
-       }\r
-       ASSERT(nSize == 0); // all space should be allocated\r
-}\r
-\r
-void CFX_SplitterWnd::HideColumn(int nCol)\r
-{\r
-       if ( m_nHidedCol != -1 )\r
-               return;\r
-\r
-       ASSERT_VALID(this);\r
-       ASSERT(m_nCols > 1);\r
-       ASSERT(nCol < m_nCols);\r
-       ASSERT(m_nHidedCol == -1);\r
-       m_nHidedCol = nCol;\r
-       \r
-    // if the column has an active window -- change it\r
-       int rowActive, colActive;\r
-       if (GetActivePane(&rowActive, &colActive) != NULL &&\r
-               colActive == nCol)\r
-       {\r
-               if (++colActive >= m_nCols)\r
-                       colActive = 0;\r
-               SetActivePane(rowActive, colActive);\r
-       }\r
-       \r
-    // hide all column panes\r
-       for (int row = 0; row < m_nRows; row++)\r
-       {\r
-               CWnd* pPaneHide = GetPane(row, nCol);\r
-               ASSERT(pPaneHide != NULL);\r
-               pPaneHide->ShowWindow(SW_HIDE);\r
-               pPaneHide->SetDlgCtrlID(\r
-                       AFX_IDW_PANE_FIRST + row * 16 + m_nCols);\r
-               \r
-               for (int col = nCol + 1; col < m_nCols; col++)\r
-               {\r
-                       CWnd* pPane = GetPane(row, col);\r
-                       ASSERT(pPane != NULL);\r
-                       pPane->SetDlgCtrlID(IdFromRowCol(row, col - 1));\r
-               }\r
-       }\r
-       m_nCols--;\r
-       m_pColInfo[m_nCols].nCurSize = m_pColInfo[nCol].nCurSize;\r
-       RecalcLayout();\r
-}\r
-\r
-void CFX_SplitterWnd::ShowColumn()\r
-{\r
-       if ( m_nHidedCol == -1 )\r
-               return;\r
-\r
-       ASSERT_VALID(this);\r
-       ASSERT(m_nCols < m_nMaxCols);\r
-       ASSERT(m_nHidedCol != -1);\r
-       \r
-       int colNew = m_nHidedCol;\r
-       m_nHidedCol = -1;\r
-       int cxNew = m_pColInfo[m_nCols].nCurSize;\r
-       m_nCols++;  // add a column\r
-       ASSERT(m_nCols == m_nMaxCols);\r
-       \r
-    // fill the hided column\r
-       int col;\r
-       for (int row = 0; row < m_nRows; row++)\r
-       {\r
-               CWnd* pPaneShow = GetDlgItem(\r
-                       AFX_IDW_PANE_FIRST + row * 16 + m_nCols);\r
-               ASSERT(pPaneShow != NULL);\r
-               pPaneShow->ShowWindow(SW_SHOWNA);\r
-               \r
-               for (col = m_nCols - 2; col >= colNew; col--)\r
-               {\r
-                       CWnd* pPane = GetPane(row, col);\r
-                       ASSERT(pPane != NULL);\r
-                       pPane->SetDlgCtrlID(IdFromRowCol(row, col + 1));\r
-               }\r
-               \r
-               pPaneShow->SetDlgCtrlID(IdFromRowCol(row, colNew));\r
-       }\r
-       \r
-    // new panes have been created -- recalculate layout\r
-       for (col = colNew + 1; col < m_nCols; col++)\r
-               m_pColInfo[col].nIdealSize = m_pColInfo[col - 1].nCurSize;\r
-       m_pColInfo[colNew].nIdealSize = cxNew;\r
-\r
-       RecalcLayout();\r
-}\r
-\r
-void CFX_SplitterWnd::OnLButtonDown(UINT nFlags, CPoint point) \r
-{\r
-       if (!m_bBarLocked)\r
-               CSplitterWnd::OnLButtonDown(nFlags, point);\r
-}\r
-\r
-void CFX_SplitterWnd::OnMouseMove(UINT nFlags, CPoint point) \r
-{\r
-       if (!m_bBarLocked)\r
-               CSplitterWnd::OnMouseMove(nFlags, point);\r
-       else\r
-               CWnd::OnMouseMove(nFlags, point);       \r
-}\r
diff --git a/xfa_test/FormFiller_Test/FX_SplitterWnd.h b/xfa_test/FormFiller_Test/FX_SplitterWnd.h
deleted file mode 100644 (file)
index 94893c9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// FX_SplitterWnd.h: interface for the CFX_SplitterWnd class.\r
-//\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-#if !defined(AFX_FX_SPLITTERWND_H__4BF45CD9_0C9D_4223_9D0E_9ECA148F49FB__INCLUDED_)\r
-#define AFX_FX_SPLITTERWND_H__4BF45CD9_0C9D_4223_9D0E_9ECA148F49FB__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-\r
-class CFX_SplitterWnd : public CSplitterWnd\r
-{\r
-public:\r
-       CFX_SplitterWnd();\r
-       virtual ~CFX_SplitterWnd();\r
-\r
-public:\r
-       virtual void    OnDrawSplitter(CDC *pDC,ESplitType nType,const CRect &rectArg);\r
-       virtual void    RecalcLayout();\r
-       static  void    DeferClientPos(AFX_SIZEPARENTPARAMS *lpLayout,CWnd *pWnd,int x,int y,int cx,int cy,BOOL bScrollBar);\r
-       static  void    LayoutRowCol(CSplitterWnd::CRowColInfo *pInfoArray,int nMax,int nSize,int nSizeSplitter);\r
-       void                    LockBar(BOOL bState=TRUE){m_bBarLocked=bState;}\r
-       void                    HideColumn(int nCol);\r
-       void                    ShowColumn();\r
-\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CFX_SplitterWnd)\r
-       //}}AFX_VIRTUAL\r
-\r
-       // Generated message map functions\r
-protected:\r
-       //{{AFX_MSG(CFX_SplitterWnd)\r
-       afx_msg void OnLButtonDown(UINT nFlags, CPoint point);\r
-       afx_msg void OnMouseMove(UINT nFlags, CPoint point);\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-protected:\r
-       BOOL    m_bBarLocked;\r
-       int             m_nHidedCol;\r
-\r
-};\r
-\r
-#endif // !defined(AFX_FX_SPLITTERWND_H__4BF45CD9_0C9D_4223_9D0E_9ECA148F49FB__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/FindDlg.cpp b/xfa_test/FormFiller_Test/FindDlg.cpp
deleted file mode 100644 (file)
index 88548d9..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// FindDlg.cpp : implementation file\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-#include "FindDlg.h"\r
-\r
-#include "MainFrm.h"\r
-#include "ChildFrm.h"\r
-#include "ReaderVCView.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CFindDlg dialog\r
-\r
-\r
-CFindDlg::CFindDlg(CWnd* pParent /*=NULL*/)\r
-       : CDialog(CFindDlg::IDD, pParent)\r
-{\r
-       //{{AFX_DATA_INIT(CFindDlg)\r
-       m_bMatchCase = FALSE;\r
-       m_bWholeWord = FALSE;\r
-       m_strFindWhat = _T("");\r
-       m_nDirection = -1;\r
-       //}}AFX_DATA_INIT\r
-}\r
-\r
-\r
-void CFindDlg::DoDataExchange(CDataExchange* pDX)\r
-{\r
-       CDialog::DoDataExchange(pDX);\r
-       //{{AFX_DATA_MAP(CFindDlg)\r
-       DDX_Check(pDX, IDC_CHECK_MATCHCASE, m_bMatchCase);\r
-       DDX_Check(pDX, IDC_CHECK_MATCHWHOLE, m_bWholeWord);\r
-       DDX_Text(pDX, IDC_EDIT1, m_strFindWhat);\r
-       DDX_Radio(pDX, IDC_RADIO_Down, m_nDirection);\r
-       //}}AFX_DATA_MAP\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(CFindDlg, CDialog)\r
-       //{{AFX_MSG_MAP(CFindDlg)\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CFindDlg message handlers\r
-\r
-void CFindDlg::OnOK() \r
-{\r
-       // TODO: Add extra validation here\r
-       UpdateData(TRUE);\r
-       m_pView->FindText(m_strFindWhat, m_bMatchCase, m_bWholeWord, m_nDirection);\r
-       //CDialog::OnOK();\r
-}\r
-\r
-BOOL CFindDlg::OnInitDialog() \r
-{\r
-       CDialog::OnInitDialog();\r
-       \r
-       // TODO: Add extra initialization here\r
-       m_pView = (CReaderVCView *)(((CChildFrame *)((CMainFrame *)AfxGetMainWnd())->GetActiveFrame())->GetActiveView());\r
-       ASSERT(m_pView);\r
-       ((CButton *)GetDlgItem(IDC_RADIO_Down))->SetCheck(1);\r
-       ((CButton *)GetDlgItem(IDC_CHECK_MATCHWHOLE))->SetCheck(1);\r
-       return TRUE;  // return TRUE unless you set the focus to a control\r
-                     // EXCEPTION: OCX Property Pages should return FALSE\r
-}\r
diff --git a/xfa_test/FormFiller_Test/FindDlg.h b/xfa_test/FormFiller_Test/FindDlg.h
deleted file mode 100644 (file)
index 18ef88d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#if !defined(AFX_FINDDLG_H__355AF96B_B487_4503_8658_7F37B397D38A__INCLUDED_)\r
-#define AFX_FINDDLG_H__355AF96B_B487_4503_8658_7F37B397D38A__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-// FindDlg.h : header file\r
-//\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CFindDlg dialog\r
-class CReaderVCView;\r
-class CFindDlg : public CDialog\r
-{\r
-// Construction\r
-public:\r
-       CFindDlg(CWnd* pParent = NULL);   // standard constructor\r
-\r
-// Dialog Data\r
-       //{{AFX_DATA(CFindDlg)\r
-       enum { IDD = IDD_DLG_FIND };\r
-       BOOL    m_bMatchCase;\r
-       BOOL    m_bWholeWord;\r
-       CString m_strFindWhat;\r
-       int             m_nDirection;\r
-       //}}AFX_DATA\r
-\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CFindDlg)\r
-       protected:\r
-       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-protected:\r
-       CReaderVCView *m_pView;\r
-       // Generated message map functions\r
-       //{{AFX_MSG(CFindDlg)\r
-       virtual void OnOK();\r
-       virtual BOOL OnInitDialog();\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_FINDDLG_H__355AF96B_B487_4503_8658_7F37B397D38A__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/GotoPageDlg.cpp b/xfa_test/FormFiller_Test/GotoPageDlg.cpp
deleted file mode 100644 (file)
index 5c189c8..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// GotoPageDlg.cpp : implementation file\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-#include "GotoPageDlg.h"\r
-\r
-#include "MainFrm.h"\r
-#include "ChildFrm.h"\r
-#include "ReaderVCView.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CGotoPageDlg dialog\r
-\r
-\r
-CGotoPageDlg::CGotoPageDlg(CWnd* pParent /*=NULL*/)\r
-       : CDialog(CGotoPageDlg::IDD, pParent)\r
-{\r
-       //{{AFX_DATA_INIT(CGotoPageDlg)\r
-       m_nPageIndex = 0;\r
-       //}}AFX_DATA_INIT\r
-}\r
-\r
-\r
-void CGotoPageDlg::DoDataExchange(CDataExchange* pDX)\r
-{\r
-       CDialog::DoDataExchange(pDX);\r
-       //{{AFX_DATA_MAP(CGotoPageDlg)\r
-       DDX_Text(pDX, IDC_EDIT1, m_nPageIndex);\r
-       //}}AFX_DATA_MAP\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(CGotoPageDlg, CDialog)\r
-       //{{AFX_MSG_MAP(CGotoPageDlg)\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CGotoPageDlg message handlers\r
-\r
-void CGotoPageDlg::OnOK() \r
-{\r
-       // TODO: Add extra validation here\r
-       if (NULL == m_pView) return;\r
-       UpdateData(TRUE);\r
-       m_pView->GotoPage(m_nPageIndex);\r
-       CDialog::OnOK();\r
-}\r
-\r
-BOOL CGotoPageDlg::OnInitDialog() \r
-{\r
-       CDialog::OnInitDialog();\r
-       \r
-       // TODO: Add extra initialization here\r
-       m_pView = (CReaderVCView *)(((CChildFrame *)((CMainFrame *)AfxGetMainWnd())->GetActiveFrame())->GetActiveView());\r
-       return TRUE;  // return TRUE unless you set the focus to a control\r
-                     // EXCEPTION: OCX Property Pages should return FALSE\r
-}\r
diff --git a/xfa_test/FormFiller_Test/GotoPageDlg.h b/xfa_test/FormFiller_Test/GotoPageDlg.h
deleted file mode 100644 (file)
index 40f6bea..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#if !defined(AFX_GOTOPAGEDLG_H__674C0708_4B25_4465_A73F_310610F9B991__INCLUDED_)\r
-#define AFX_GOTOPAGEDLG_H__674C0708_4B25_4465_A73F_310610F9B991__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-// GotoPageDlg.h : header file\r
-//\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CGotoPageDlg dialog\r
-class CReaderVCView;\r
-class CGotoPageDlg : public CDialog\r
-{\r
-// Construction\r
-public:\r
-       CGotoPageDlg(CWnd* pParent = NULL);   // standard constructor\r
-\r
-// Dialog Data\r
-       //{{AFX_DATA(CGotoPageDlg)\r
-       enum { IDD = IDD_DLG_GOTOPAGE };\r
-       int             m_nPageIndex;\r
-       //}}AFX_DATA\r
-\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CGotoPageDlg)\r
-       protected:\r
-       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
-       //}}AFX_VIRTUAL\r
-private:\r
-               CReaderVCView *m_pView;\r
-// Implementation\r
-protected:\r
-       \r
-       // Generated message map functions\r
-       //{{AFX_MSG(CGotoPageDlg)\r
-       virtual void OnOK();\r
-       virtual BOOL OnInitDialog();\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_GOTOPAGEDLG_H__674C0708_4B25_4465_A73F_310610F9B991__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/JS_ResponseDlg.cpp b/xfa_test/FormFiller_Test/JS_ResponseDlg.cpp
deleted file mode 100644 (file)
index 043efc2..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-// JS_ResponseDlg.cpp : implementation file\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "readervc.h"\r
-#include "JS_ResponseDlg.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CJS_ResponseDlg dialog\r
-\r
-\r
-CJS_ResponseDlg::CJS_ResponseDlg(CWnd* pParent /*=NULL*/)\r
-       : CDialog(CJS_ResponseDlg::IDD, pParent)\r
-{\r
-       //{{AFX_DATA_INIT(CJS_ResponseDlg)\r
-               // NOTE: the ClassWizard will add member initialization here\r
-       //}}AFX_DATA_INIT\r
-       m_swTitle =(FPDF_WIDESTRING) L"";\r
-       m_swQuestion =(FPDF_WIDESTRING) L"";\r
-       m_swLabel =(FPDF_WIDESTRING) L"";\r
-       m_swDefault =(FPDF_WIDESTRING) L"";\r
-       m_swResponse =L"";\r
-       m_bIsVisible = false;\r
-       m_pResponseEdit = NULL;\r
-}\r
-\r
-\r
-void CJS_ResponseDlg::DoDataExchange(CDataExchange* pDX)\r
-{\r
-       CDialog::DoDataExchange(pDX);\r
-       //{{AFX_DATA_MAP(CJS_ResponseDlg)\r
-               // NOTE: the ClassWizard will add DDX and DDV calls here\r
-       //}}AFX_DATA_MAP\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(CJS_ResponseDlg, CDialog)\r
-       //{{AFX_MSG_MAP(CJS_ResponseDlg)\r
-               // NOTE: the ClassWizard will add message map macros here\r
-               ON_BN_CLICKED(ID_JS_OK, OnResOk)\r
-               ON_BN_CLICKED(ID_JS_CANCEL, OnResCancel)\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CJS_ResponseDlg message handlers\r
-BOOL CJS_ResponseDlg::OnInitDialog()\r
-{\r
-       CDialog::OnInitDialog();\r
-\r
-       ::SetWindowTextW(this->GetSafeHwnd(), (LPCWSTR)m_swTitle);\r
-\r
-       CStatic* pQuestion = (CStatic*)GetDlgItem(IDC_JS_QUESTION);\r
-       ::SetWindowTextW(pQuestion->GetSafeHwnd(), (LPCWSTR)m_swQuestion);\r
-\r
-       CStatic* pLabel = (CStatic*)GetDlgItem(IDC_JS_ANSWER);\r
-\r
-       CRect DialogRect;\r
-       CRect LabelRect;\r
-       RECT rect;\r
-       GetWindowRect(&DialogRect);\r
-       pLabel->GetWindowRect(&LabelRect);      \r
-\r
-       if(m_swLabel == (FPDF_WIDESTRING)L"")\r
-       {       \r
-               rect.left = DialogRect.left + 20;\r
-               pLabel->ShowWindow(SW_HIDE);\r
-       }\r
-       else\r
-       {\r
-               rect.left = LabelRect.right + 1;\r
-               ::SetWindowTextW(pLabel->GetSafeHwnd(), (LPCWSTR)m_swLabel);\r
-       }\r
-\r
-       rect.top = LabelRect.top - 3;\r
-       rect.right = DialogRect.right - 20;\r
-       rect.bottom = LabelRect.bottom + 2;\r
-       ScreenToClient(&rect);\r
-       m_pResponseEdit = new CEdit();\r
-\r
-       if(m_bIsVisible)\r
-               m_pResponseEdit->Create(ES_AUTOVSCROLL | ES_NOHIDESEL | ES_PASSWORD | WS_BORDER, rect, this, IDC_JS_EDIT);\r
-       else\r
-               m_pResponseEdit->Create(ES_AUTOVSCROLL | ES_NOHIDESEL | WS_BORDER, rect, this, IDC_JS_EDIT);\r
-       \r
-       ::SetWindowTextW(m_pResponseEdit->GetSafeHwnd(), (LPCWSTR)m_swDefault);\r
-       m_pResponseEdit->ShowWindow(SW_SHOW);\r
-\r
-       return TRUE;\r
-}\r
-\r
-void CJS_ResponseDlg::OnResOk()\r
-{\r
-       m_swResponse = (wchar_t*)malloc(sizeof(wchar_t) * 250);\r
-       ::GetWindowTextW(m_pResponseEdit->GetSafeHwnd(), m_swResponse, 250);\r
-\r
-       if(m_pResponseEdit)\r
-       {\r
-               m_pResponseEdit->DestroyWindow();\r
-               delete m_pResponseEdit;\r
-               m_pResponseEdit = NULL;\r
-       }\r
-       CDialog::OnOK();\r
-}\r
-\r
-void CJS_ResponseDlg::OnResCancel()\r
-{\r
-       if(m_pResponseEdit)\r
-       {\r
-               m_pResponseEdit->DestroyWindow();\r
-               delete m_pResponseEdit;\r
-               m_pResponseEdit = NULL;\r
-       }\r
-       \r
-       CDialog::OnCancel();\r
-}\r
-\r
-void CJS_ResponseDlg::SetTitle(FPDF_WIDESTRING swTitle)\r
-{\r
-       m_swTitle = swTitle;\r
-}\r
-\r
-void CJS_ResponseDlg::SetQuestion(FPDF_WIDESTRING swQuestion)\r
-{\r
-       m_swQuestion = swQuestion;\r
-}\r
-\r
-void CJS_ResponseDlg::SetLabel(FPDF_WIDESTRING swLabel)\r
-{\r
-       m_swLabel = swLabel;\r
-}\r
-\r
-void CJS_ResponseDlg::SetDefault(FPDF_WIDESTRING swDefault)\r
-{\r
-       m_swDefault = swDefault;\r
-}\r
-\r
-FPDF_WIDESTRING CJS_ResponseDlg::GetResponse()\r
-{\r
-       return (FPDF_WIDESTRING)m_swResponse;\r
-}\r
-\r
-void CJS_ResponseDlg::SetIsVisible(FPDF_BOOL bPassword)\r
-{\r
-       m_bIsVisible = bPassword;\r
-}\r
diff --git a/xfa_test/FormFiller_Test/JS_ResponseDlg.h b/xfa_test/FormFiller_Test/JS_ResponseDlg.h
deleted file mode 100644 (file)
index c3410c4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#if !defined(AFX_JS_RESPONSEDLG_H__AE1575EB_3F0A_46E7_B278_089C74F2B34C__INCLUDED_)\r
-#define AFX_JS_RESPONSEDLG_H__AE1575EB_3F0A_46E7_B278_089C74F2B34C__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-// JS_ResponseDlg.h : header file\r
-//\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CJS_ResponseDlg dialog\r
-\r
-class CJS_ResponseDlg : public CDialog\r
-{\r
-// Construction\r
-public:\r
-       CJS_ResponseDlg(CWnd* pParent = NULL);   // standard constructor\r
-       ~CJS_ResponseDlg(){ if(m_swResponse) free(m_swResponse); }\r
-\r
-// Dialog Data\r
-       //{{AFX_DATA(CJS_ResponseDlg)\r
-       enum { IDD = IDD_DLG_RESPONSE };\r
-               // NOTE: the ClassWizard will add data members here\r
-       //}}AFX_DATA\r
-public:\r
-       void                            SetTitle(FPDF_WIDESTRING swTitle);\r
-       void                            SetQuestion(FPDF_WIDESTRING swQuestion);\r
-       void                            SetDefault(FPDF_WIDESTRING swDefault);\r
-       void                            SetLabel(FPDF_WIDESTRING swLabel);\r
-       void                            SetIsVisible(FPDF_BOOL bPassword);\r
-       FPDF_WIDESTRING         GetResponse();\r
-\r
-private:\r
-       FPDF_WIDESTRING         m_swTitle;\r
-       FPDF_WIDESTRING         m_swQuestion;\r
-       FPDF_WIDESTRING         m_swDefault;\r
-       FPDF_WIDESTRING         m_swLabel;\r
-       wchar_t*                        m_swResponse;\r
-       FPDF_BOOL                       m_bIsVisible;\r
-       CEdit*                          m_pResponseEdit;\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CJS_ResponseDlg)\r
-       protected:\r
-       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-protected:\r
-\r
-       // Generated message map functions\r
-       //{{AFX_MSG(CJS_ResponseDlg)\r
-               // NOTE: the ClassWizard will add member functions here\r
-       virtual BOOL OnInitDialog();\r
-       afx_msg void OnResOk();\r
-       afx_msg void OnResCancel();\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_JS_RESPONSEDLG_H__AE1575EB_3F0A_46E7_B278_089C74F2B34C__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/MainFrm.cpp b/xfa_test/FormFiller_Test/MainFrm.cpp
deleted file mode 100644 (file)
index b6e5943..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-// MainFrm.cpp : implementation of the CMainFrame class\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-\r
-#include "MainFrm.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CMainFrame\r
-\r
-IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)\r
-\r
-BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)\r
-       //{{AFX_MSG_MAP(CMainFrame)\r
-               // NOTE - the ClassWizard will add and remove mapping macros here.\r
-               //    DO NOT EDIT what you see in these blocks of generated code !\r
-       ON_WM_CREATE()\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-static UINT indicators[] =\r
-{\r
-       ID_SEPARATOR,           // status line indicator\r
-       ID_INDICATOR_CAPS,\r
-       ID_INDICATOR_NUM,\r
-       ID_INDICATOR_SCRL,\r
-};\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CMainFrame construction/destruction\r
-\r
-CMainFrame::CMainFrame()\r
-{\r
-       // TODO: add member initialization code here\r
-       \r
-}\r
-\r
-CMainFrame::~CMainFrame()\r
-{\r
-}\r
-\r
-int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)\r
-{\r
-       if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)\r
-               return -1;\r
-       \r
-       if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP\r
-               | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||\r
-               !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))\r
-       {\r
-               TRACE0("Failed to create toolbar\n");\r
-               return -1;      // fail to create\r
-       }\r
-\r
-       if (!m_wndStatusBar.Create(this) ||\r
-               !m_wndStatusBar.SetIndicators(indicators,\r
-                 sizeof(indicators)/sizeof(UINT)))\r
-       {\r
-               TRACE0("Failed to create status bar\n");\r
-               return -1;      // fail to create\r
-       }\r
-\r
-       // TODO: Delete these three lines if you don't want the toolbar to\r
-       //  be dockable\r
-\r
-       m_wndToolBar.ModifyStyle(0,TBSTYLE_FLAT | CBRS_TOOLTIPS | TBSTYLE_TRANSPARENT | TBBS_CHECKBOX);\r
-       m_wndToolBar.GetToolBarCtrl().SetButtonWidth(40,40);\r
-\r
-       CImageList ImgList,ImgList1;\r
-       CBitmap bm;\r
-       ImgList.Create(22,22,ILC_COLOR8|ILC_MASK, 16, 16);\r
-       ImgList.SetBkColor(::GetSysColor(15));\r
-       bm.LoadBitmap(IDB_BITMAP23);//OPEN\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP35);//Print\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP17);//first page\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP24);//prev page\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP22);//next page\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP21);//last page\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP16);//count clockwise\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP15);//clockwise\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP14);//zoom in\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP26);//zoom out\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP13);//actual size\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP18);//fit page\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP19);//fit width\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP36);//search\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP7);//Bookmark\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP25);//snap shot\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP2);//select text\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP20);//hand tool\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP12);//about\r
-       ImgList.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       m_wndToolBar.GetToolBarCtrl().SetImageList(&ImgList);\r
-       //m_wndToolBar.GetToolBarCtrl().SetHotImageList(&ImgList);\r
-       ImgList.Detach();\r
-\r
-       ImgList1.Create(22,22,ILC_COLOR8|ILC_MASK, 16, 16);\r
-       ImgList1.SetBkColor(::GetSysColor(15));\r
-       bm.LoadBitmap(IDB_BITMAP23);//open\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP30);//printer\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP8);//first page\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP29);//prev page\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP28);//next page\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP27);//last page\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP1);//count clockwise\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP6);//clockwise\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP33);//zoom in\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP34);//zoom out\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP4);//actual size\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP9);//fit page\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP10);//fit width\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP31);//search\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP5);//bookmark\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP32);//snap\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP3);//select text\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP11);//hand tool\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       bm.LoadBitmap(IDB_BITMAP12);//about\r
-       ImgList1.Add(&bm,RGB(0,255,0));\r
-       bm.Detach();\r
-       m_wndToolBar.GetToolBarCtrl().SetDisabledImageList(&ImgList1);\r
-       ImgList1.Detach();\r
-    \r
-       m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);\r
-       EnableDocking(CBRS_ALIGN_ANY);\r
-       DockControlBar(&m_wndToolBar);\r
-\r
-       return 0;\r
-}\r
-\r
-BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)\r
-{\r
-       if( !CMDIFrameWnd::PreCreateWindow(cs) )\r
-               return FALSE;\r
-       // TODO: Modify the Window class or styles here by modifying\r
-       //  the CREATESTRUCT cs\r
-\r
-       return TRUE;\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CMainFrame diagnostics\r
-\r
-#ifdef _DEBUG\r
-void CMainFrame::AssertValid() const\r
-{\r
-       CMDIFrameWnd::AssertValid();\r
-}\r
-\r
-void CMainFrame::Dump(CDumpContext& dc) const\r
-{\r
-       CMDIFrameWnd::Dump(dc);\r
-}\r
-\r
-#endif //_DEBUG\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CMainFrame message handlers\r
-\r
diff --git a/xfa_test/FormFiller_Test/MainFrm.h b/xfa_test/FormFiller_Test/MainFrm.h
deleted file mode 100644 (file)
index 1b9f128..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// MainFrm.h : interface of the CMainFrame class\r
-//\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#if !defined(AFX_MAINFRM_H__B05284F9_FD96_49A9_B8B2_F77706A9A02B__INCLUDED_)\r
-#define AFX_MAINFRM_H__B05284F9_FD96_49A9_B8B2_F77706A9A02B__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-\r
-class CMainFrame : public CMDIFrameWnd\r
-{\r
-       DECLARE_DYNAMIC(CMainFrame)\r
-public:\r
-       CMainFrame();\r
-\r
-// Attributes\r
-public:\r
-       CStatusBar  m_wndStatusBar;\r
-       CToolBar    m_wndToolBar;\r
-// Operations\r
-public:\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CMainFrame)\r
-       virtual BOOL PreCreateWindow(CREATESTRUCT& cs);\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-public:\r
-       virtual ~CMainFrame();\r
-#ifdef _DEBUG\r
-       virtual void AssertValid() const;\r
-       virtual void Dump(CDumpContext& dc) const;\r
-#endif\r
-\r
-protected:  // control bar embedded members\r
-\r
-// Generated message map functions\r
-protected:\r
-       //{{AFX_MSG(CMainFrame)\r
-       afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);\r
-               // NOTE - the ClassWizard will add and remove member functions here.\r
-               //    DO NOT EDIT what you see in these blocks of generated code!\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_MAINFRM_H__B05284F9_FD96_49A9_B8B2_F77706A9A02B__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/ReaderVC.cpp b/xfa_test/FormFiller_Test/ReaderVC.cpp
deleted file mode 100644 (file)
index 2d58c25..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-// ReaderVC.cpp : Defines the class behaviors for the application.\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-\r
-#include "MainFrm.h"\r
-#include "ChildFrm.h"\r
-#include "ReaderVCDoc.h"\r
-#include "ReaderVCView.h"\r
-#include "BookmarkView.h"\r
-\r
-\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCApp\r
-\r
-BEGIN_MESSAGE_MAP(CReaderVCApp, CWinApp)\r
-       //{{AFX_MSG_MAP(CReaderVCApp)\r
-       ON_COMMAND(ID_APP_ABOUT, OnAppAbout)\r
-               // NOTE - the ClassWizard will add and remove mapping macros here.\r
-               //    DO NOT EDIT what you see in these blocks of generated code!\r
-       //}}AFX_MSG_MAP\r
-       // Standard file based document commands\r
-       ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)\r
-       ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)\r
-       // Standard print setup command\r
-       ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCApp construction\r
-\r
-\r
-CReaderVCApp::CReaderVCApp()\r
-{\r
-       // TODO: add construction code here,\r
-       // Place all significant initialization in InitInstance\r
-\r
-\r
-\r
-       m_pActiveView = NULL;\r
-\r
-\r
-\r
-//     FPDF_InitFormFillEnviroument(this);\r
-}\r
-\r
-CReaderVCApp::~CReaderVCApp()\r
-{\r
-\r
-\r
-\r
-}\r
-/////////////////////////////////////////////////////////////////////////////\r
-// The one and only CReaderVCApp object\r
-\r
-CReaderVCApp theApp;\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCApp initialization\r
-extern void SetSampleFontInfo();\r
-BOOL CReaderVCApp::InitInstance()\r
-{\r
-       AfxEnableControlContainer();\r
-       FPDF_InitLibrary(this->m_hInstance);\r
-//     FPDF_UnlockDLL("SDKRDYX0408","5E5885A8AD61A855485D9F6C85BE82EF7C1F63AC");\r
-\r
-       SetSampleFontInfo();\r
-       // Standard initialization\r
-       // If you are not using these features and wish to reduce the size\r
-       //  of your final executable, you should remove from the following\r
-       //  the specific initialization routines you do not need.\r
-\r
-#ifdef _AFXDLL\r
-       Enable3dControls();                     // Call this when using MFC in a shared DLL\r
-#else\r
-       Enable3dControlsStatic();       // Call this when linking to MFC statically\r
-#endif\r
-\r
-       // Change the registry key under which our settings are stored.\r
-       // TODO: You should modify this string to be something appropriate\r
-       // such as the name of your company or organization.\r
-       SetRegistryKey(_T("Local AppWizard-Generated Applications"));\r
-\r
-       LoadStdProfileSettings();  // Load standard INI file options (including MRU)\r
-\r
-       // Register the application's document templates.  Document templates\r
-       //  serve as the connection between documents, frame windows and views.\r
-\r
-       CMultiDocTemplate* pDocTemplate;\r
-       pDocTemplate = new CMultiDocTemplate(\r
-               IDR_READERTYPE,\r
-               RUNTIME_CLASS(CReaderVCDoc),\r
-               RUNTIME_CLASS(CChildFrame), // custom MDI child frame\r
-               RUNTIME_CLASS(CReaderVCView));\r
-       AddDocTemplate(pDocTemplate);\r
-\r
-       CMultiDocTemplate* pDocTemplate1;\r
-       pDocTemplate1 = new CMultiDocTemplate(\r
-               IDR_READERTYPE,\r
-               RUNTIME_CLASS(CReaderVCDoc),\r
-               RUNTIME_CLASS(CChildFrame), // custom MDI child frame\r
-               RUNTIME_CLASS(CBookMarkView));\r
-       AddDocTemplate(pDocTemplate1);\r
-       // create main MDI Frame window\r
-       CMainFrame* pMainFrame = new CMainFrame;\r
-       if (!pMainFrame->LoadFrame(IDR_MAINFRAME))\r
-               return FALSE;\r
-       m_pMainWnd = pMainFrame;\r
-       // Parse command line for standard shell commands, DDE, file open\r
-       CCommandLineInfo cmdInfo;\r
-       cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;\r
-       ParseCommandLine(cmdInfo);\r
-\r
-       // Dispatch commands specified on the command line\r
-       if (!ProcessShellCommand(cmdInfo))\r
-               return FALSE;\r
-\r
-       // The main window has been initialized, so show and update it.\r
-       pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);\r
-       pMainFrame->UpdateWindow();\r
-       return TRUE;\r
-}\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CAboutDlg dialog used for App About\r
-\r
-class CAboutDlg : public CDialog\r
-{\r
-public:\r
-       CAboutDlg();\r
-\r
-// Dialog Data\r
-       //{{AFX_DATA(CAboutDlg)\r
-       enum { IDD = IDD_ABOUTBOX };\r
-       //}}AFX_DATA\r
-\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CAboutDlg)\r
-       protected:\r
-       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-protected:\r
-       //{{AFX_MSG(CAboutDlg)\r
-       afx_msg void OnMetalfile();\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)\r
-{\r
-       //{{AFX_DATA_INIT(CAboutDlg)\r
-       //}}AFX_DATA_INIT\r
-}\r
-\r
-void CAboutDlg::DoDataExchange(CDataExchange* pDX)\r
-{\r
-       CDialog::DoDataExchange(pDX);\r
-       //{{AFX_DATA_MAP(CAboutDlg)\r
-       //}}AFX_DATA_MAP\r
-}\r
-\r
-BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)\r
-       //{{AFX_MSG_MAP(CAboutDlg)\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-// App command to run the dialog\r
-void CReaderVCApp::OnAppAbout()\r
-{\r
-       CAboutDlg aboutDlg;\r
-       aboutDlg.DoModal();\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCApp message handlers\r
-\r
-\r
-int CReaderVCApp::ExitInstance() \r
-{\r
-       // TODO: Add your specialized code here and/or call the base class\r
-       FPDF_DestroyLibrary();\r
-\r
-       return CWinApp::ExitInstance();\r
-}\r
diff --git a/xfa_test/FormFiller_Test/ReaderVC.dsp b/xfa_test/FormFiller_Test/ReaderVC.dsp
deleted file mode 100644 (file)
index 8d95e07..0000000
+++ /dev/null
@@ -1,460 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ReaderVC" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Application" 0x0101\r
-\r
-CFG=ReaderVC - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "ReaderVC.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "ReaderVC.mak" CFG="ReaderVC - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "ReaderVC - Win32 Release" (based on "Win32 (x86) Application")\r
-!MESSAGE "ReaderVC - Win32 Debug" (based on "Win32 (x86) Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-MTL=midl.exe\r
-RSC=rc.exe\r
-\r
-!IF  "$(CFG)" == "ReaderVC - Win32 Release"\r
-\r
-# PROP BASE Use_MFC 6\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release"\r
-# PROP BASE Intermediate_Dir "Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 6\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release"\r
-# PROP Intermediate_Dir "Release"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "FPDFSDK_EXPORTS" /FR /Yu"stdafx.h" /FD /c\r
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x804 /d "NDEBUG" /d "_AFXDLL"\r
-# ADD RSC /l 0x804 /d "NDEBUG" /d "_AFXDLL"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386\r
-# ADD LINK32 /nologo /subsystem:windows /machine:I386 /out:"../../lib/rel_w32_vc6/ReaderVC.exe"\r
-\r
-!ELSEIF  "$(CFG)" == "ReaderVC - Win32 Debug"\r
-\r
-# PROP BASE Use_MFC 6\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "Debug"\r
-# PROP BASE Intermediate_Dir "Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 6\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug"\r
-# PROP Intermediate_Dir "Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "FPDFSDK_EXPORTS" /FR /Yu"stdafx.h" /FD /GZ /c\r
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x804 /d "_DEBUG" /d "_AFXDLL"\r
-# ADD RSC /l 0x804 /d "_DEBUG" /d "_AFXDLL"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 Msimg32.lib /nologo /subsystem:windows /map /debug /machine:I386 /out:"../../lib/dbg_w32_vc6/ReaderVC.exe" /pdbtype:sept\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "ReaderVC - Win32 Release"\r
-# Name "ReaderVC - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-# Begin Source File\r
-\r
-SOURCE=.\BookMarkView.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ChildFrm.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ConvertDlg.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ExportPage.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\FindDlg.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\FX_SplitterWnd.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\GotoPageDlg.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\JS_ResponseDlg.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\MainFrm.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ReaderVC.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ReaderVC.rc\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ReaderVCDoc.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ReaderVCView.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\StdAfx.cpp\r
-# ADD CPP /Yc"stdafx.h"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\TestJsDlg.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ZoomDlg.cpp\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
-# Begin Source File\r
-\r
-SOURCE=.\BookMarkView.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ChildFrm.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ConvertDlg.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ExportPage.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\FindDlg.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\FX_SplitterWnd.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\GotoPageDlg.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\JS_ResponseDlg.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\MainFrm.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ReaderVC.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ReaderVCDoc.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ReaderVCView.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\Resource.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\StdAfx.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\TestJsDlg.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ZoomDlg.h\r
-# End Source File\r
-# End Group\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-# Begin Source File\r
-\r
-SOURCE=.\res\BigHandCursor.cur\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap1.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap12.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap19.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap2.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap20.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap21.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap22.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap23.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bitmap26.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bookmark.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\bound.cur\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\formOptions.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\point.cur\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\Rd_SelText_Icon.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\Rd_SelText_Icon_Dis.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\ReaderVC.ico\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\ReaderVC.rc2\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\ReaderVCDoc.ico\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\SmallHandCursor.cur\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_actual_size.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_bookmark1.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_clockwise.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_counterclockwise.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_first.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_fit_page.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_fit_width.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hand1.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_about2.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_actual_size.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_bookmark1.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_clockwise.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_counterclockwise.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_first.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_fit_page.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_fit_width.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_hand1.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_last.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_next.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_open1.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_prev.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_print.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_search.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_snap_shot.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_zoomin.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_hot_zoomout.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_last.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_next.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_prev.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_print.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_search.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_snap_shot.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_zoomin.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\tool_zoomout.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\Toolbar.bmp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\res\unknowncolor_gray.bmp\r
-# End Source File\r
-# End Group\r
-# Begin Source File\r
-\r
-SOURCE=.\ReadMe.txt\r
-# End Source File\r
-# End Target\r
-# End Project\r
diff --git a/xfa_test/FormFiller_Test/ReaderVC.h b/xfa_test/FormFiller_Test/ReaderVC.h
deleted file mode 100644 (file)
index 11bcc43..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// ReaderVC.h : main header file for the READERVC application\r
-//\r
-\r
-#if !defined(AFX_READERVC_H__7873A15F_A60F_4C05_9DC6_C3914C224EAA__INCLUDED_)\r
-#define AFX_READERVC_H__7873A15F_A60F_4C05_9DC6_C3914C224EAA__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-\r
-#ifndef __AFXWIN_H__\r
-       #error include 'stdafx.h' before including this file for PCH\r
-#endif\r
-\r
-class CReaderVCView;\r
-\r
-#include "resource.h"       // main symbols\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCApp:\r
-// See ReaderVC.cpp for the implementation of this class\r
-//\r
-\r
-class CReaderVCApp : public CWinApp\r
-{\r
-public:\r
-       CReaderVCApp();\r
-       ~CReaderVCApp();\r
-       CReaderVCView * m_pActiveView;\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CReaderVCApp)\r
-       public:\r
-       virtual BOOL InitInstance();\r
-       virtual int ExitInstance();\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-       //{{AFX_MSG(CReaderVCApp)\r
-       afx_msg void OnAppAbout();\r
-               // NOTE - the ClassWizard will add and remove member functions here.\r
-               //    DO NOT EDIT what you see in these blocks of generated code !\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_READERVC_H__7873A15F_A60F_4C05_9DC6_C3914C224EAA__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/ReaderVC.rc b/xfa_test/FormFiller_Test/ReaderVC.rc
deleted file mode 100644 (file)
index bf647ae..0000000
+++ /dev/null
@@ -1,741 +0,0 @@
-//Microsoft Developer Studio generated resource script.\r
-//\r
-#include "resource.h"\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#include "afxres.h"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// Chinese (P.R.C.) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED\r
-#pragma code_page(936)\r
-#endif //_WIN32\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-\r
-1 TEXTINCLUDE DISCARDABLE \r
-BEGIN\r
-    "resource.h\0"\r
-END\r
-\r
-2 TEXTINCLUDE DISCARDABLE \r
-BEGIN\r
-    "#include ""afxres.h""\r\n"\r
-    "\0"\r
-END\r
-\r
-3 TEXTINCLUDE DISCARDABLE \r
-BEGIN\r
-    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"\r
-    "#define _AFX_NO_OLE_RESOURCES\r\n"\r
-    "#define _AFX_NO_TRACKER_RESOURCES\r\n"\r
-    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"\r
-    "\r\n"\r
-    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)\r\n"\r
-    "#ifdef _WIN32\r\n"\r
-    "LANGUAGE 4, 2\r\n"\r
-    "#pragma code_page(936)\r\n"\r
-    "#endif //_WIN32\r\n"\r
-    "#include ""res\\ReaderVC.rc2""  // non-Microsoft Visual C++ edited resources\r\n"\r
-    "#include ""l.chs\\afxres.rc""          // Standard components\r\n"\r
-    "#include ""l.chs\\afxprint.rc""        // printing/print preview resources\r\n"\r
-    "#endif\r\n"\r
-    "\0"\r
-END\r
-\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-IDR_MAINFRAME           ICON    DISCARDABLE     "res\\ReaderVC.ico"\r
-IDR_READERTYPE          ICON    DISCARDABLE     "res\\ReaderVCDoc.ico"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Bitmap\r
-//\r
-\r
-IDR_MAINFRAME           BITMAP  MOVEABLE PURE   "res\\Toolbar.bmp"\r
-IDB_BITMAP1             BITMAP  DISCARDABLE     "res\\tool_counterclockwise.bmp"\r
-IDB_BITMAP2             BITMAP  DISCARDABLE     "res\\Rd_SelText_Icon.bmp"\r
-IDB_BITMAP3             BITMAP  DISCARDABLE     "res\\Rd_SelText_Icon_Dis.bmp"\r
-IDB_BITMAP4             BITMAP  DISCARDABLE     "res\\tool_actual_size.bmp"\r
-IDB_BITMAP5             BITMAP  DISCARDABLE     "res\\tool_bookmark1.bmp"\r
-IDB_BITMAP6             BITMAP  DISCARDABLE     "res\\tool_clockwise.bmp"\r
-IDB_BITMAP7             BITMAP  DISCARDABLE     "res\\tool_hot_bookmark1.bmp"\r
-IDB_BITMAP8             BITMAP  DISCARDABLE     "res\\tool_first.bmp"\r
-IDB_BITMAP9             BITMAP  DISCARDABLE     "res\\tool_fit_page.bmp"\r
-IDB_BITMAP10            BITMAP  DISCARDABLE     "res\\tool_fit_width.bmp"\r
-IDB_BITMAP11            BITMAP  DISCARDABLE     "res\\tool_hand1.bmp"\r
-IDB_BITMAP12            BITMAP  DISCARDABLE     "res\\tool_hot_about2.bmp"\r
-IDB_BITMAP13            BITMAP  DISCARDABLE     "res\\tool_hot_actual_size.bmp"\r
-IDB_BITMAP14            BITMAP  DISCARDABLE     "res\\tool_hot_zoomin.bmp"\r
-IDB_BITMAP15            BITMAP  DISCARDABLE     "res\\tool_hot_clockwise.bmp"\r
-IDB_BITMAP16            BITMAP  DISCARDABLE     "res\\tool_hot_counterclockwise.bmp"\r
-IDB_BITMAP17            BITMAP  DISCARDABLE     "res\\tool_hot_first.bmp"\r
-IDB_BITMAP18            BITMAP  DISCARDABLE     "res\\tool_hot_fit_page.bmp"\r
-IDB_BITMAP19            BITMAP  DISCARDABLE     "res\\tool_hot_fit_width.bmp"\r
-IDB_BITMAP20            BITMAP  DISCARDABLE     "res\\tool_hot_hand1.bmp"\r
-IDB_BITMAP21            BITMAP  DISCARDABLE     "res\\tool_hot_last.bmp"\r
-IDB_BITMAP22            BITMAP  DISCARDABLE     "res\\tool_hot_next.bmp"\r
-IDB_BITMAP23            BITMAP  DISCARDABLE     "res\\tool_hot_open1.bmp"\r
-IDB_BITMAP24            BITMAP  DISCARDABLE     "res\\tool_hot_prev.bmp"\r
-IDB_BITMAP26            BITMAP  DISCARDABLE     "res\\tool_hot_zoomout.bmp"\r
-IDB_BITMAP27            BITMAP  DISCARDABLE     "res\\tool_last.bmp"\r
-IDB_BITMAP28            BITMAP  DISCARDABLE     "res\\tool_next.bmp"\r
-IDB_BITMAP29            BITMAP  DISCARDABLE     "res\\tool_prev.bmp"\r
-IDB_BITMAP30            BITMAP  DISCARDABLE     "res\\tool_print.bmp"\r
-IDB_BITMAP31            BITMAP  DISCARDABLE     "res\\tool_search.bmp"\r
-IDB_BITMAP32            BITMAP  DISCARDABLE     "res\\tool_snap_shot.bmp"\r
-IDB_BITMAP33            BITMAP  DISCARDABLE     "res\\tool_zoomin.bmp"\r
-IDB_BITMAP34            BITMAP  DISCARDABLE     "res\\tool_zoomout.bmp"\r
-IDB_BITMAP25            BITMAP  DISCARDABLE     "res\\tool_hot_snap_shot.bmp"\r
-IDB_BITMAP35            BITMAP  DISCARDABLE     "res\\tool_hot_print.bmp"\r
-IDB_BITMAP36            BITMAP  DISCARDABLE     "res\\tool_hot_search.bmp"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Toolbar\r
-//\r
-\r
-IDR_MAINFRAME TOOLBAR DISCARDABLE  24, 24\r
-BEGIN\r
-    BUTTON      ID_FILE_OPEN\r
-    SEPARATOR\r
-    BUTTON      ID_FILE_PRINT\r
-    SEPARATOR\r
-    BUTTON      ID_DOC_FIRSTPAGE\r
-    BUTTON      ID_DOC_PREPAGE\r
-    BUTTON      ID_DOC_NEXTPAGE\r
-    BUTTON      ID_DOC_LASTPAGE\r
-    SEPARATOR\r
-    BUTTON      ID_VIEW_COUNTERCLOCKWISE\r
-    BUTTON      ID_VIEW_CLOCKWISE\r
-    SEPARATOR\r
-    BUTTON      ID_VIEW_ZOOMIN\r
-    BUTTON      ID_VIEW_ZOOMOUT\r
-    SEPARATOR\r
-    BUTTON      ID_VIEW_ACTUALSIZE\r
-    BUTTON      ID_VIEW_FITPAGE\r
-    BUTTON      ID_VIEW_FITWIDTH\r
-    SEPARATOR\r
-    BUTTON      ID_EDIT_FIND\r
-    SEPARATOR\r
-    BUTTON      ID_VIEW_BOOKMARK\r
-    SEPARATOR\r
-    BUTTON      ID_TOOL_SNAPSHOT\r
-    BUTTON      ID_TOOL_SELECT\r
-    BUTTON      ID_TOOL_HAND\r
-    BUTTON      ID_APP_ABOUT\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Accelerator\r
-//\r
-\r
-IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE \r
-BEGIN\r
-    "+",            ID_VIEW_ZOOMIN,         VIRTKEY, CONTROL, NOINVERT\r
-    "-",            ID_VIEW_ZOOMOUT,        VIRTKEY, CONTROL, NOINVERT\r
-    "1",            ID_VIEW_ACTUALSIZE,     VIRTKEY, CONTROL, NOINVERT\r
-    "2",            ID_VIEW_FITPAGE,        VIRTKEY, CONTROL, NOINVERT\r
-    "3",            ID_VIEW_FITWIDTH,       VIRTKEY, CONTROL, NOINVERT\r
-    "C",            ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT\r
-    "F",            ID_EDIT_FIND,           VIRTKEY, CONTROL, NOINVERT\r
-    "M",            ID_VIEW_ZOOMTO,         VIRTKEY, CONTROL, NOINVERT\r
-    "N",            ID_FILE_NEW,            VIRTKEY, CONTROL, NOINVERT\r
-    "N",            ID_DOC_GOTOPAGE,        VIRTKEY, SHIFT, CONTROL, \r
-                                                    NOINVERT\r
-    "O",            ID_FILE_OPEN,           VIRTKEY, CONTROL, NOINVERT\r
-    "P",            ID_FILE_PRINT,          VIRTKEY, CONTROL, NOINVERT\r
-    "S",            ID_FILE_SAVE,           VIRTKEY, CONTROL, NOINVERT\r
-    "V",            ID_EDIT_PASTE,          VIRTKEY, CONTROL, NOINVERT\r
-    VK_BACK,        ID_EDIT_UNDO,           VIRTKEY, ALT, NOINVERT\r
-    VK_DELETE,      ID_EDIT_CUT,            VIRTKEY, SHIFT, NOINVERT\r
-    VK_F6,          ID_NEXT_PANE,           VIRTKEY, NOINVERT\r
-    VK_F6,          ID_PREV_PANE,           VIRTKEY, SHIFT, NOINVERT\r
-    VK_INSERT,      ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT\r
-    VK_INSERT,      ID_EDIT_PASTE,          VIRTKEY, SHIFT, NOINVERT\r
-    "X",            ID_EDIT_CUT,            VIRTKEY, CONTROL, NOINVERT\r
-    "Z",            ID_EDIT_UNDO,           VIRTKEY, CONTROL, NOINVERT\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_ABOUTBOX DIALOG DISCARDABLE  0, 0, 235, 55\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "About ReaderVC"\r
-FONT 9, "ËÎÌå"\r
-BEGIN\r
-    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,20,20\r
-    LTEXT           "Foxit SDK Demo 1.0 version",IDC_STATIC,40,10,126,8,\r
-                    SS_NOPREFIX\r
-    LTEXT           "All rights Reserved",IDC_STATIC,40,25,119,8\r
-    DEFPUSHBUTTON   "OK",IDOK,178,7,50,14,WS_GROUP\r
-END\r
-\r
-IDD_DLG_GOTOPAGE DIALOG DISCARDABLE  0, 0, 133, 29\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Goto Page"\r
-FONT 10, "MS Sans Serif"\r
-BEGIN\r
-    DEFPUSHBUTTON   "OK",IDOK,91,7,35,14\r
-    LTEXT           "Goto",IDC_STATIC,8,9,16,9\r
-    EDITTEXT        IDC_EDIT1,25,7,64,14,ES_AUTOHSCROLL\r
-END\r
-\r
-IDD_DLG_ZOOMTO DIALOG DISCARDABLE  0, 0, 141, 45\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Zoom To"\r
-FONT 10, "MS Sans Serif"\r
-BEGIN\r
-    DEFPUSHBUTTON   "OK",IDOK,38,24,29,14\r
-    LTEXT           "Zoom to",IDC_STATIC,7,9,30,8\r
-    DEFPUSHBUTTON   "Cancel",IDCANCEL,75,24,29,14\r
-    COMBOBOX        IDC_COMBO1,37,7,78,132,CBS_DROPDOWN | WS_VSCROLL | \r
-                    WS_TABSTOP\r
-END\r
-\r
-IDD_DLG_FIND DIALOG DISCARDABLE  0, 0, 222, 70\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Find Text"\r
-FONT 10, "MS Sans Serif"\r
-BEGIN\r
-    DEFPUSHBUTTON   "&Find Next",IDOK,174,7,41,13\r
-    PUSHBUTTON      "&Cancel",IDCANCEL,175,24,40,13\r
-    LTEXT           "&Find What",IDC_STATIC,7,10,38,10\r
-    EDITTEXT        IDC_EDIT1,46,7,124,16,ES_AUTOHSCROLL\r
-    CONTROL         "Match &Case",IDC_CHECK_MATCHCASE,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,30,90,11\r
-    CONTROL         "Match &Whole word only",IDC_CHECK_MATCHWHOLE,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,48,97,10\r
-    GROUPBOX        "Direction",IDC_STATIC,104,28,68,32\r
-    CONTROL         "Down",IDC_RADIO_Down,"Button",BS_AUTORADIOBUTTON | \r
-                    WS_GROUP,109,42,29,10\r
-    CONTROL         "Up",IDC_RADIO_UP,"Button",BS_AUTORADIOBUTTON,146,42,19,\r
-                    10\r
-END\r
-\r
-IDD_DLG_CONVERT DIALOG DISCARDABLE  0, 0, 128, 74\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Convert mode"\r
-FONT 10, "System"\r
-BEGIN\r
-    DEFPUSHBUTTON   "OK",IDOK,17,55,42,12\r
-    PUSHBUTTON      "Cancel",IDCANCEL,69,55,42,12\r
-    GROUPBOX        "Flags for ConvertText",IDC_STATIC,16,7,95,46\r
-    CONTROL         "Stream order",IDC_RADIO_Stream,"Button",\r
-                    BS_AUTORADIOBUTTON | WS_GROUP,30,20,69,8\r
-    CONTROL         "Appearance order",IDC_RADIO_Appearance,"Button",\r
-                    BS_AUTORADIOBUTTON,30,31,69,8\r
-END\r
-\r
-IDD_EXPORT_PAGE DIALOG DISCARDABLE  0, 0, 230, 229\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Export Page"\r
-FONT 10, "System"\r
-BEGIN\r
-    LTEXT           "Width",IDC_STATIC,22,16,20,8\r
-    LTEXT           "Height",IDC_STATIC,21,37,22,8\r
-    LTEXT           "Rotate",IDC_STATIC,21,61,22,8\r
-    LTEXT           "Bitmap Width",IDC_STATIC,102,14,45,8\r
-    LTEXT           "Bitmap Height",IDC_STATIC,99,35,47,8\r
-    PUSHBUTTON      "Rander Page ",IDC_Rander_Page,102,58,50,14\r
-    PUSHBUTTON      "Save As...",IDC_Save,158,58,50,14\r
-    EDITTEXT        IDC_EDIT_PAGE_WIDTH,45,14,40,14,ES_AUTOHSCROLL\r
-    EDITTEXT        IDC_EDIT_PAGE_HEIGHT,45,35,40,14,ES_AUTOHSCROLL\r
-    EDITTEXT        IDC_EDIT_ROTATE,45,59,40,14,ES_AUTOHSCROLL\r
-    EDITTEXT        IDC_EDIT_WIDTH,149,13,40,14,ES_AUTOHSCROLL\r
-    EDITTEXT        IDC_EDIT_HEIGHT,148,33,40,14,ES_AUTOHSCROLL\r
-    CONTROL         "",IDC_STATIC_BITMAP,"Static",SS_BLACKFRAME,18,87,196,\r
-                    127\r
-END\r
-\r
-IDD_DLG_RESPONSE DIALOG DISCARDABLE  0, 0, 241, 66\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Dialog"\r
-FONT 8, "System"\r
-BEGIN\r
-    DEFPUSHBUTTON   "OK",ID_JS_OK,116,45,50,14\r
-    PUSHBUTTON      "Cancel",ID_JS_CANCEL,184,45,50,14\r
-    LTEXT           "",IDC_JS_QUESTION,7,7,227,12\r
-    LTEXT           "",IDC_JS_ANSWER,7,26,27,12\r
-END\r
-\r
-IDD_TEST_JS DIALOG DISCARDABLE  0, 0, 187, 96\r
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Dialog"\r
-FONT 10, "System"\r
-BEGIN\r
-    EDITTEXT        IDC_EDIT1,7,18,173,33,ES_MULTILINE | ES_AUTOHSCROLL\r
-    PUSHBUTTON      "Run JS",IDC_BUTTON1,130,68,50,14\r
-END\r
-\r
-\r
-#ifndef _MAC\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Version\r
-//\r
-\r
-VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 1,0,0,1\r
- PRODUCTVERSION 1,0,0,1\r
- FILEFLAGSMASK 0x3fL\r
-#ifdef _DEBUG\r
- FILEFLAGS 0x1L\r
-#else\r
- FILEFLAGS 0x0L\r
-#endif\r
- FILEOS 0x4L\r
- FILETYPE 0x1L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
-    BLOCK "StringFileInfo"\r
-    BEGIN\r
-        BLOCK "080404b0"\r
-        BEGIN\r
-            VALUE "Comments", "\0"\r
-            VALUE "CompanyName", "\0"\r
-            VALUE "FileDescription", "ReaderVC Microsoft »ù´¡ÀàÓ¦ÓóÌÐò\0"\r
-            VALUE "FileVersion", "1, 0, 0, 1\0"\r
-            VALUE "InternalName", "ReaderVC\0"\r
-            VALUE "LegalCopyright", "°æȨËùÓР(C) 2007\0"\r
-            VALUE "LegalTrademarks", "\0"\r
-            VALUE "OriginalFilename", "ReaderVC.EXE\0"\r
-            VALUE "PrivateBuild", "\0"\r
-            VALUE "ProductName", "ReaderVC Ó¦ÓóÌÐò\0"\r
-            VALUE "ProductVersion", "1, 0, 0, 1\0"\r
-            VALUE "SpecialBuild", "\0"\r
-        END\r
-    END\r
-    BLOCK "VarFileInfo"\r
-    BEGIN\r
-        VALUE "Translation", 0x804, 1200\r
-    END\r
-END\r
-\r
-#endif    // !_MAC\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// DESIGNINFO\r
-//\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-GUIDELINES DESIGNINFO DISCARDABLE \r
-BEGIN\r
-    IDD_ABOUTBOX, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 228\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 48\r
-    END\r
-\r
-    IDD_DLG_GOTOPAGE, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 126\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 22\r
-    END\r
-\r
-    IDD_DLG_ZOOMTO, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 134\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 38\r
-    END\r
-\r
-    IDD_DLG_FIND, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 215\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 63\r
-    END\r
-\r
-    IDD_DLG_CONVERT, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 121\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 67\r
-    END\r
-\r
-    IDD_EXPORT_PAGE, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 223\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 222\r
-    END\r
-\r
-    IDD_DLG_RESPONSE, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 234\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 59\r
-    END\r
-\r
-    IDD_TEST_JS, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 180\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 89\r
-    END\r
-END\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Cursor\r
-//\r
-\r
-IDC_CURSOR1             CURSOR  DISCARDABLE     "res\\SmallHandCursor.cur"\r
-IDC_CURSOR2             CURSOR  DISCARDABLE     "res\\BigHandCursor.cur"\r
-IDC_CURSOR3             CURSOR  DISCARDABLE     "res\\bound.cur"\r
-IDC_CURSOR4             CURSOR  DISCARDABLE     "res\\point.cur"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE PRELOAD DISCARDABLE \r
-BEGIN\r
-    IDR_MAINFRAME           "ReaderVC"\r
-    IDR_READERTYPE          "\nReader\nReader\n\n\nReaderVC.Document\nReader Document"\r
-END\r
-\r
-STRINGTABLE PRELOAD DISCARDABLE \r
-BEGIN\r
-    AFX_IDS_APP_TITLE       "ReaderVC"\r
-    AFX_IDS_IDLEMESSAGE     "¾ÍÐ÷"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_INDICATOR_EXT        "À©Õ¹Ãû"\r
-    ID_INDICATOR_CAPS       "´óд"\r
-    ID_INDICATOR_NUM        "Êý×Ö"\r
-    ID_INDICATOR_SCRL       "¹ö¶¯"\r
-    ID_INDICATOR_OVR        "¸Äд"\r
-    ID_INDICATOR_REC        "¼Ç¼"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_FILE_NEW             "½¨Á¢ÐÂÎĵµ\nн¨"\r
-    ID_FILE_OPEN            "´ò¿ªÒ»¸öÏÖÓÐÎĵµ\n´ò¿ª"\r
-    ID_FILE_CLOSE           "¹Ø±Õ»î¶¯Îĵµ\n¹Ø±Õ"\r
-    ID_FILE_SAVE            "±£´æ»î¶¯Îĵµ\n±£´æ"\r
-    ID_FILE_SAVE_AS         "½«»î¶¯ÎĵµÒÔÒ»¸öÐÂÎļþÃû±£´æ\nÁí´æΪ"\r
-    ID_FILE_PAGE_SETUP      "¸Ä±ä´òÓ¡Ñ¡Ïî\nÒ³ÃæÉèÖÃ"\r
-    ID_FILE_PRINT_SETUP     "¸Ä±ä´òÓ¡»ú¼°´òÓ¡Ñ¡Ïî\n´òÓ¡ÉèÖÃ"\r
-    ID_FILE_PRINT           "´òÓ¡»î¶¯Îĵµ\n´òÓ¡"\r
-    ID_FILE_PRINT_PREVIEW   "ÏÔʾÕûÒ³\n´òÓ¡Ô¤ÀÀ"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_APP_ABOUT            "ÏÔʾ³ÌÐòÐÅÏ¢£¬°æ±¾ºÅºÍ°æȨ\n¹ØÓÚ"\r
-    ID_APP_EXIT             "Í˳öÓ¦ÓóÌÐò£»Ìáʾ±£´æÎĵµ\nÍ˳ö"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_FILE_MRU_FILE1       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE2       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE3       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE4       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE5       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE6       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE7       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE8       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE9       "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE10      "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE11      "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE12      "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE13      "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE14      "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE15      "´ò¿ª¸ÃÎĵµ"\r
-    ID_FILE_MRU_FILE16      "´ò¿ª¸ÃÎĵµ"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_NEXT_PANE            "Çл»µ½ÏÂÒ»¸ö´°¸ñ\nÏÂÒ»´°¸ñ"\r
-    ID_PREV_PANE            "Çл»»ØÇ°Ò»¸ö´°¸ñ\nÇ°Ò»´°¸ñ"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_WINDOW_NEW           "Ϊ»î¶¯Îĵµ´ò¿ªÁíÒ»¸ö´°¿Ú\nн¨´°¿Ú"\r
-    ID_WINDOW_ARRANGE       "½«Í¼±êÅÅÁÐÔÚ´°¿Úµ×²¿\nÅÅÁÐͼ±ê"\r
-    ID_WINDOW_CASCADE       "ÅÅÁд°¿Ú³ÉÏ໥Öصþ\n²ãµþ´°¿Ú"\r
-    ID_WINDOW_TILE_HORZ     "ÅÅÁд°¿Ú³É»¥²»Öصþ\nƽÆÌ´°¿Ú"\r
-    ID_WINDOW_TILE_VERT     "ÅÅÁд°¿Ú³É»¥²»Öصþ\nƽÆÌ´°¿Ú"\r
-    ID_WINDOW_SPLIT         "½«»î¶¯µÄ´°¿Ú·Ö¸ô³É´°¸ñ\n·Ö¸ô"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_EDIT_CLEAR           "ɾ³ý±»Ñ¡¶ÔÏó\nɾ³ý"\r
-    ID_EDIT_CLEAR_ALL       "È«²¿É¾³ý\nÈ«²¿É¾³ý"\r
-    ID_EDIT_COPY            "¸´ÖƱ»Ñ¡¶ÔÏó²¢½«ÆäÖÃÓÚ¼ôÌù°åÉÏ\n¸´ÖÆ"\r
-    ID_EDIT_CUT             "¼ôÇб»Ñ¡¶ÔÏó²¢½«ÆäÖÃÓÚ¼ôÌù°åÉÏ\n¼ôÇÐ"\r
-    ID_EDIT_FIND            "²éÕÒÖ¸¶¨µÄÕýÎÄ\n²éÕÒ"\r
-    ID_EDIT_PASTE           "²åÈë¼ôÌù°åÄÚÈÝ\nÕ³Ìù"\r
-    ID_EDIT_REPEAT          "Öظ´ÉÏÒ»²½²Ù×÷\nÖظ´"\r
-    ID_EDIT_REPLACE         "Óò»Í¬µÄÕýÎÄÌæ»»Ö¸¶¨µÄÕýÎÄ\nÌæ»»"\r
-    ID_EDIT_SELECT_ALL      "Ñ¡ÔñÕû¸öÎĵµ\nÑ¡ÔñÈ«²¿"\r
-    ID_EDIT_UNDO            "³·Ïû×îºóÒ»²½²Ù×÷\n³·Ïû"\r
-    ID_EDIT_REDO            "ÖØÐÂÖ´ÐÐÏÈÇ°Òѳ·ÏûµÄ²Ù×÷\nÖØÐÂÖ´ÐÐ"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_VIEW_TOOLBAR         "Show or hide the ToolBar\nShow or hide the ToolBar"\r
-    ID_VIEW_STATUS_BAR      "Show or hide\nShow or hide"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    AFX_IDS_SCSIZE          "¸Ä±ä´°¿Ú´óС"\r
-    AFX_IDS_SCMOVE          "¸Ä±ä´°¿ÚλÖÃ"\r
-    AFX_IDS_SCMINIMIZE      "½«´°¿ÚËõС³Éͼ±ê"\r
-    AFX_IDS_SCMAXIMIZE      "°Ñ´°¿Ú·Å´óµ½×î´ó³ß´ç"\r
-    AFX_IDS_SCNEXTWINDOW    "Çл»µ½ÏÂÒ»¸öÎĵµ´°¿Ú"\r
-    AFX_IDS_SCPREVWINDOW    "Çл»µ½ÏÈÇ°µÄÎĵµ´°¿Ú"\r
-    AFX_IDS_SCCLOSE         "¹Ø±Õ»î¶¯µÄ´°¿Ú²¢Ìáʾ±£´æËùÓÐÎĵµ"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    AFX_IDS_SCRESTORE       "°Ñ´°¿Ú»Ö¸´µ½Õý³£´óС"\r
-    AFX_IDS_SCTASKLIST      "¼¤»îÈÎÎñ±í"\r
-    AFX_IDS_MDICHILD        "¼¤»î¸Ã´°¿Ú"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    AFX_IDS_PREVIEW_CLOSE   "¹Ø±Õ´òÓ¡Ô¤ÀÀģʽ\nÈ¡ÏûÔ¤ÔÄ"\r
-END\r
-\r
-#endif    // Chinese (P.R.C.) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// English (U.S.) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Menu\r
-//\r
-\r
-IDR_READERTYPE MENU PRELOAD DISCARDABLE \r
-BEGIN\r
-    POPUP "&File"\r
-    BEGIN\r
-        MENUITEM "&Open...\tCtrl+O",            ID_FILE_OPEN\r
-        MENUITEM "&Close",                      ID_FILE_CLOSE\r
-        MENUITEM "&Save As...",                 ID_FILE_SAVE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Print...\tCtrl+P",           ID_FILE_PRINT\r
-        MENUITEM "P&rinter Setup...",           ID_FILE_PRINT_SETUP\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Recently File",               ID_FILE_MRU_FILE1, GRAYED\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "E&xit...\tCtrl+Q",            ID_APP_EXIT\r
-    END\r
-    POPUP "&Edit"\r
-    BEGIN\r
-        MENUITEM "&Copy Select Text",           ID_EDIT_COPY\r
-        MENUITEM "&Find Text...\tCtrl+F",       ID_EDIT_FIND\r
-    END\r
-    POPUP "&View"\r
-    BEGIN\r
-        MENUITEM "Zoom &In\t\tNum+",            ID_VIEW_ZOOMIN\r
-        MENUITEM "Zoom &Out\t\tNum-",           ID_VIEW_ZOOMOUT\r
-        MENUITEM "Zoom &To...\tCtrl+M",         ID_VIEW_ZOOMTO\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Actual Size\tCtrl+1",        ID_VIEW_ACTUALSIZE\r
-        MENUITEM "Fit &Page\tCtrl+2",           ID_VIEW_FITPAGE\r
-        MENUITEM "Fit &Width\tCtrl+3",          ID_VIEW_FITWIDTH\r
-        MENUITEM SEPARATOR\r
-        POPUP "&Rotate View"\r
-        BEGIN\r
-            MENUITEM "&Clockwise\tShift+Ctrl+Plus", ID_VIEW_CLOCKWISE, HELP\r
-            MENUITEM "Counterclock&wise\tShift+Ctrl+Minus", \r
-                                                    ID_VIEW_COUNTERCLOCKWISE\r
-        END\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&ToolBar",                    ID_VIEW_TOOLBAR\r
-        MENUITEM "&StatusBar",                  ID_VIEW_STATUS_BAR\r
-    END\r
-    POPUP "&Document"\r
-    BEGIN\r
-        MENUITEM "&First Page    \t\tHome",     ID_DOC_FIRSTPAGE\r
-        MENUITEM "P&revious Page\tLeft  Arrow", ID_DOC_PREPAGE\r
-        MENUITEM "&Next Page\tRight Arrow",     ID_DOC_NEXTPAGE\r
-        MENUITEM "&Last Page\tEnd",             ID_DOC_LASTPAGE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Goto Page...\tShift+Ctrl+N", ID_DOC_GOTOPAGE\r
-        MENUITEM "",                            TEST_PRINT_METALFILE\r
-    END\r
-    POPUP "&Tool"\r
-    BEGIN\r
-        MENUITEM "&Hand Tool",                  ID_TOOL_HAND\r
-        MENUITEM "Se&lect Text",                ID_TOOL_SELECT\r
-        MENUITEM "&Snapshot",                   ID_TOOL_SNAPSHOT\r
-        MENUITEM "Pdf2txt",                     ID_TOOL_PDF2TXT\r
-        MENUITEM "Extract links",               ID_TOOL_EXTRACTLINKS\r
-        MENUITEM "Test JavaScript",             IDM_Test_JS\r
-    END\r
-    POPUP "&Bitmap"\r
-    BEGIN\r
-        MENUITEM "&Export PDF to bitmap",       ID_EXPORT_PDF_TO_BITMAP\r
-    END\r
-    POPUP "&Help"\r
-    BEGIN\r
-        MENUITEM "About ReaderVC(&A)...",       ID_APP_ABOUT\r
-    END\r
-END\r
-\r
-IDR_MAINFRAME MENU PRELOAD DISCARDABLE \r
-BEGIN\r
-    POPUP "&File"\r
-    BEGIN\r
-        MENUITEM "&Open...\tCtrl+O",            ID_FILE_OPEN\r
-        MENUITEM "&Close",                      ID_FILE_CLOSE\r
-        MENUITEM "&Save As...",                 ID_FILE_SAVE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Print...\tCtrl+P",           ID_FILE_PRINT\r
-        MENUITEM "P&rinter Setup...",           ID_FILE_PRINT_SETUP\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Recently File",               ID_FILE_MRU_FILE1, GRAYED\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "E&xit...\tCtrl+Q",            ID_APP_EXIT\r
-    END\r
-    POPUP "&Edit"\r
-    BEGIN\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Copy Select Text",           ID_EDIT_COPY\r
-        MENUITEM "&Find Text...\tCtrl+F",       ID_EDIT_FIND\r
-    END\r
-    POPUP "&View"\r
-    BEGIN\r
-        MENUITEM "Zoom &In\t\tNum+",            ID_VIEW_ZOOMIN\r
-        MENUITEM "Zoom &Out\t\tNum-",           ID_VIEW_ZOOMOUT\r
-        MENUITEM "Zoom &To...\tCtrl+M",         ID_VIEW_ZOOMTO\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Actual Size\tCtrl+1",        ID_VIEW_ACTUALSIZE\r
-        MENUITEM "Fit &Page\tCtrl+2",           ID_VIEW_FITPAGE\r
-        MENUITEM "Fit &Width\tCtrl+3",          ID_VIEW_FITWIDTH\r
-        MENUITEM SEPARATOR\r
-        POPUP "&Rotate View"\r
-        BEGIN\r
-            MENUITEM "&Clockwise\tShift+Ctrl+Plus", ID_VIEW_CLOCKWISE, HELP\r
-            MENUITEM "Counterclock&wise\tShift+Ctrl+Minus", \r
-                                                    ID_VIEW_COUNTERCLOCKWISE\r
-        END\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&ToolBar",                    ID_VIEW_TOOLBAR\r
-        MENUITEM "&StatusBar",                  ID_VIEW_STATUS_BAR\r
-    END\r
-    POPUP "&Document"\r
-    BEGIN\r
-        MENUITEM "&First Page    \t\tHome",     ID_DOC_FIRSTPAGE\r
-        MENUITEM "P&revious Page\tLeft  Arrow", ID_DOC_PREPAGE\r
-        MENUITEM "&Next Page\tRight Arrow",     ID_DOC_NEXTPAGE\r
-        MENUITEM "&Last Page\tEnd",             ID_DOC_LASTPAGE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Goto Page...\tShift+Ctrl+N", ID_DOC_GOTOPAGE\r
-        MENUITEM "Print MetalFile",             TEST_PRINT_METALFILE\r
-    END\r
-    POPUP "&Tool"\r
-    BEGIN\r
-        MENUITEM "&Hand Tool",                  ID_TOOL_HAND\r
-        MENUITEM "Se&lect Text",                ID_TOOL_SELECT\r
-        MENUITEM "&Snapshot",                   ID_TOOL_SNAPSHOT\r
-        MENUITEM "Pdf2txt",                     ID_TOOL_PDF2TXT\r
-        MENUITEM "Extract links",               ID_TOOL_EXTRACTLINKS\r
-    END\r
-    POPUP "&Bitmap"\r
-    BEGIN\r
-        MENUITEM "&Export PDF to bitmap",       ID_EXPORT_PDF_TO_BITMAP\r
-    END\r
-    POPUP "&Help"\r
-    BEGIN\r
-        MENUITEM "About ReaderVC(&A)...",       ID_APP_ABOUT\r
-    END\r
-END\r
-\r
-#endif    // English (U.S.) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-#define _AFX_NO_SPLITTER_RESOURCES\r
-#define _AFX_NO_OLE_RESOURCES\r
-#define _AFX_NO_TRACKER_RESOURCES\r
-#define _AFX_NO_PROPERTY_RESOURCES\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)\r
-#ifdef _WIN32\r
-LANGUAGE 4, 2\r
-#pragma code_page(936)\r
-#endif //_WIN32\r
-#include "res\ReaderVC.rc2"  // non-Microsoft Visual C++ edited resources\r
-#include "l.chs\afxres.rc"          // Standard components\r
-#include "l.chs\afxprint.rc"        // printing/print preview resources\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif    // not APSTUDIO_INVOKED\r
-\r
diff --git a/xfa_test/FormFiller_Test/ReaderVCDoc.cpp b/xfa_test/FormFiller_Test/ReaderVCDoc.cpp
deleted file mode 100644 (file)
index e06515d..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-// ReaderVCDoc.cpp : implementation of the CReaderVCDoc class\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-\r
-#include "MainFrm.h"\r
-#include "ChildFrm.h"\r
-#include "ReaderVCDoc.h"\r
-#include "ReaderVCView.h"\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCDoc\r
-\r
-IMPLEMENT_DYNCREATE(CReaderVCDoc, CDocument)\r
-\r
-BEGIN_MESSAGE_MAP(CReaderVCDoc, CDocument)\r
-       //{{AFX_MSG_MAP(CReaderVCDoc)\r
-               // NOTE - the ClassWizard will add and remove mapping macros here.\r
-               //    DO NOT EDIT what you see in these blocks of generated code!\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCDoc construction/destruction\r
-\r
-CReaderVCDoc::CReaderVCDoc()\r
-{\r
-       // TODO: add one-time construction code here\r
-\r
-}\r
-\r
-CReaderVCDoc::~CReaderVCDoc()\r
-{\r
-}\r
-\r
-BOOL CReaderVCDoc::OnNewDocument()\r
-{\r
-       if (!CDocument::OnNewDocument())\r
-               return FALSE;\r
-\r
-       // TODO: add reinitialization code here\r
-       // (SDI documents will reuse this document)\r
-\r
-       return TRUE;\r
-}\r
-\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCDoc serialization\r
-\r
-void CReaderVCDoc::Serialize(CArchive& ar)\r
-{\r
-       if (ar.IsStoring())\r
-       {\r
-               // TODO: add storing code here\r
-       }\r
-       else\r
-       {\r
-               // TODO: add loading code here\r
-       }\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCDoc diagnostics\r
-\r
-#ifdef _DEBUG\r
-void CReaderVCDoc::AssertValid() const\r
-{\r
-       CDocument::AssertValid();\r
-}\r
-\r
-void CReaderVCDoc::Dump(CDumpContext& dc) const\r
-{\r
-       CDocument::Dump(dc);\r
-}\r
-#endif //_DEBUG\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCDoc commands\r
-\r
-BOOL CReaderVCDoc::OnOpenDocument(LPCTSTR lpszPathName) \r
-{\r
-       if (!CDocument::OnOpenDocument(lpszPathName))\r
-               return FALSE;\r
-       \r
-       // TODO: Add your specialized creation code here\r
-       void* pDoc = FPDF_LoadDocument(lpszPathName, NULL);\r
-\r
-       m_strPDFName=lpszPathName;\r
-       if(NULL == pDoc) return FALSE;  \r
-       POSITION pos = GetFirstViewPosition();\r
-       int nCount = FPDF_GetPageCount(pDoc);\r
-       while (pos != NULL)\r
-       {\r
-               CView* pView = GetNextView(pos);\r
-               if(pView->IsKindOf(RUNTIME_CLASS(CReaderVCView)))\r
-               {\r
-                       CMainFrame* pMFrm = (CMainFrame*)AfxGetMainWnd();\r
-                       CChildFrame* pChildFrm =(CChildFrame*) pMFrm->GetActiveFrame();\r
-                       pChildFrm->SetActiveView(pView, TRUE);\r
-//                     FPDFApp_SetDocument(((CReaderVCView*)pView)->GetFPDFApp(), (FPDF_DOCUMENT)pDoc);\r
-                       ((CReaderVCView*)pView)->SetPDFDocument(pDoc, nCount);\r
-               }       \r
-       }\r
-       return TRUE;\r
-}\r
diff --git a/xfa_test/FormFiller_Test/ReaderVCDoc.h b/xfa_test/FormFiller_Test/ReaderVCDoc.h
deleted file mode 100644 (file)
index 5bfc7e1..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-       // ReaderVCDoc.h : interface of the CReaderVCDoc class\r
-//\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#if !defined(AFX_READERVCDOC_H__6E0B9799_0661_4DB3_9E40_FB2D17F0D5EB__INCLUDED_)\r
-#define AFX_READERVCDOC_H__6E0B9799_0661_4DB3_9E40_FB2D17F0D5EB__INCLUDED_\r
-\r
-#if _MSC_VER > 1000\r
-#pragma once\r
-#endif // _MSC_VER > 1000\r
-\r
-\r
-class CReaderVCDoc : public CDocument\r
-{\r
-protected: // create from serialization only\r
-       CReaderVCDoc();\r
-       DECLARE_DYNCREATE(CReaderVCDoc)\r
-\r
-// Attributes\r
-public:\r
-\r
-// Operations\r
-public:\r
-\r
-// Overrides\r
-       // ClassWizard generated virtual function overrides\r
-       //{{AFX_VIRTUAL(CReaderVCDoc)\r
-       public:\r
-       virtual BOOL OnNewDocument();\r
-       virtual void Serialize(CArchive& ar);\r
-       virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);\r
-       //}}AFX_VIRTUAL\r
-\r
-// Implementation\r
-public:\r
-       CString m_strPDFName;\r
-       virtual ~CReaderVCDoc();\r
-#ifdef _DEBUG\r
-       virtual void AssertValid() const;\r
-       virtual void Dump(CDumpContext& dc) const;\r
-#endif\r
-\r
-protected:\r
-\r
-// Generated message map functions\r
-protected:\r
-       //{{AFX_MSG(CReaderVCDoc)\r
-               // NOTE - the ClassWizard will add and remove member functions here.\r
-               //    DO NOT EDIT what you see in these blocks of generated code !\r
-       //}}AFX_MSG\r
-       DECLARE_MESSAGE_MAP()\r
-};\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-//{{AFX_INSERT_LOCATION}}\r
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r
-\r
-#endif // !defined(AFX_READERVCDOC_H__6E0B9799_0661_4DB3_9E40_FB2D17F0D5EB__INCLUDED_)\r
diff --git a/xfa_test/FormFiller_Test/ReaderVCView.cpp b/xfa_test/FormFiller_Test/ReaderVCView.cpp
deleted file mode 100644 (file)
index ef0b58b..0000000
+++ /dev/null
@@ -1,3750 +0,0 @@
-// ReaderVCView.cpp : implementation of the CReaderVCView class\r
-//\r
-\r
-#include "stdafx.h"\r
-#include "ReaderVC.h"\r
-#include "MainFrm.h"\r
-#include "ChildFrm.h"\r
-#include "ReaderVCDoc.h"\r
-#include "ReaderVCView.h"\r
-\r
-#include "GotoPageDlg.h"\r
-#include "ZoomDlg.h"\r
-#include "FindDlg.h"\r
-#include "ConvertDlg.h"\r
-#include "JS_ResponseDlg.h"\r
-#include "TestJsDlg.h"\r
-//#include "../../include/pp_event.h"\r
-\r
-#ifdef _DEBUG\r
-#define new DEBUG_NEW\r
-#undef THIS_FILE\r
-static char THIS_FILE[] = __FILE__;\r
-#endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCView\r
-\r
-IMPLEMENT_DYNCREATE(CReaderVCView, CView)\r
-\r
-BEGIN_MESSAGE_MAP(CReaderVCView, CView)\r
-       //{{AFX_MSG_MAP(CReaderVCView)\r
-       ON_COMMAND(ID_DOC_FIRSTPAGE, OnDocFirstpage)\r
-       ON_COMMAND(ID_DOC_GOTOPAGE, OnDocGotopage)\r
-       ON_COMMAND(ID_DOC_LASTPAGE, OnDocLastpage)\r
-       ON_COMMAND(ID_DOC_NEXTPAGE, OnDocNextpage)\r
-       ON_COMMAND(ID_DOC_PREPAGE, OnDocPrepage)\r
-       ON_COMMAND(ID_VIEW_CLOCKWISE, OnClockwise)\r
-       ON_COMMAND(ID_VIEW_COUNTERCLOCKWISE, OnCounterclockwise)\r
-       ON_COMMAND(ID_VIEW_ACTUALSIZE, OnViewActualSize)\r
-       ON_COMMAND(ID_VIEW_FITPAGE, OnViewFitPage)\r
-       ON_COMMAND(ID_VIEW_FITWIDTH, OnViewFitWidth)\r
-       ON_COMMAND(ID_VIEW_ZOOMIN, OnViewZoomIn)\r
-       ON_COMMAND(ID_VIEW_ZOOMOUT, OnViewZoomOut)\r
-       ON_COMMAND(ID_VIEW_ZOOMTO, OnViewZoomTo)\r
-       ON_COMMAND(ID_EDIT_FIND, OnEditFind)\r
-       ON_COMMAND(ID_FILE_PRINT, OnFilePrint)\r
-       ON_WM_LBUTTONDOWN()\r
-       ON_WM_LBUTTONUP()\r
-       ON_WM_MOUSEMOVE()\r
-       ON_WM_KEYDOWN()\r
-       ON_COMMAND(ID_TOOL_SNAPSHOT, OnToolSnapshot)\r
-       ON_COMMAND(ID_TOOL_SELECT, OnToolSelect)\r
-       ON_COMMAND(ID_TOOL_HAND, OnToolHand)\r
-       ON_COMMAND(ID_TOOL_PDF2TXT, OnToolPdf2txt)\r
-       ON_WM_SIZE()\r
-       ON_WM_HSCROLL()\r
-       ON_WM_VSCROLL()\r
-       ON_COMMAND(ID_TOOL_EXTRACTLINKS, OnToolExtractlinks)\r
-       ON_WM_DESTROY()\r
-       ON_UPDATE_COMMAND_UI(ID_DOC_FIRSTPAGE, OnUpdateDocFirstpage)\r
-       ON_UPDATE_COMMAND_UI(ID_DOC_LASTPAGE, OnUpdateDocLastpage)\r
-       ON_UPDATE_COMMAND_UI(ID_DOC_NEXTPAGE, OnUpdateDocNextpage)\r
-       ON_UPDATE_COMMAND_UI(ID_DOC_PREPAGE, OnUpdateDocPrepage)\r
-       ON_UPDATE_COMMAND_UI(ID_TOOL_HAND, OnUpdateToolHand)\r
-       ON_UPDATE_COMMAND_UI(ID_TOOL_SNAPSHOT, OnUpdateToolSnapshot)\r
-       ON_UPDATE_COMMAND_UI(ID_TOOL_SELECT, OnUpdateToolSelect)\r
-       ON_COMMAND(ID_VIEW_BOOKMARK, OnViewBookmark)\r
-       ON_WM_MOUSEWHEEL()\r
-       ON_WM_CONTEXTMENU()\r
-       ON_COMMAND(ID_EDIT_COPY, OnEditCopy)\r
-       ON_COMMAND(ID_RENDERBITMAP, OnRenderbitmap)\r
-       ON_COMMAND(ID_EXPORT_PDF_TO_BITMAP, OnExportPdfToBitmap)\r
-       ON_WM_CHAR()\r
-       ON_WM_KEYUP()\r
-       ON_COMMAND(ID_FILE_SAVE, OnFileSave)\r
-       ON_COMMAND(IDM_Test_JS, OnTestJS)\r
-       ON_COMMAND(TEST_PRINT_METALFILE, OnPrintMetalfile)\r
-       //}}AFX_MSG_MAP\r
-       // Standard printing commands\r
-       ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)\r
-       ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)\r
-       ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCView construction/destruction\r
-void Sample_PageToDevice(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page,double page_x,double page_y, int* device_x, int* device_y)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->PageToDeviceImpl(page, page_x, page_y, device_x, device_y);\r
-       }\r
-       //((CReaderVCView*)pThis)->PageToDeviceImpl(page, page_x, page_y, device_x, device_y);\r
-}\r
-\r
-void Sample_Invalidate(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page, double left, double top, double right, double bottom)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->InvalidateImpl(page,left, top, right, bottom);\r
-       }\r
-       //((CReaderVCView*)pThis)->InvalidateImpl(page,left, top, right, bottom);\r
-}\r
-\r
-void Sample_OutputSelectedRect(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page, double left, double top, double right, double bottom)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->OutputSelectedRectImpl(page,left, top, right, bottom);\r
-       }\r
-}\r
-\r
-void Sample_DeviceToPage(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page,int device_x, int device_y, double* page_x, double* page_y)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->DeviceToPageImpl(page, device_x, device_y, page_x, page_y);\r
-       }\r
-       //((CReaderVCView*)pThis)->DeviceToPageImpl(page, device_x, device_y, page_x, page_y);\r
-}\r
-/* /* Remove by Amy Lin 20100913, Since we don't this the FFI_SetCaret any more.\r
-void Sample_SetCaret(struct _FPDF_FORMFILLINFO* pThis,FPDF_PAGE page,double page_x, double page_y, int nWidth, int nHeight)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->SetCaretImpl(page, page_x, page_y, nWidth,  nHeight);\r
-       }\r
-       //((CReaderVCView*)pThis)->SetCaretImpl(page, page_x, page_y, nWidth,  nHeight);\r
-}\r
-*/\r
-void Sample_Release(struct _FPDF_FORMFILLINFO* pThis)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->ReleaseImpl();\r
-       }\r
-       //((CReaderVCView*)pThis)->ReleaseImpl();\r
-}\r
-\r
-\r
-int Sample_SetTimer(struct _FPDF_FORMFILLINFO* pThis, int uElapse, TimerCallback lpTimerFunc)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->SetTimerImpl(uElapse, lpTimerFunc);\r
-       }else{\r
-               return -1;\r
-       }\r
-       //return ((CReaderVCView*)pThis)->SetTimerImpl(uElapse, lpTimerFunc);\r
-}\r
-\r
-void Sample_KillTimer(struct _FPDF_FORMFILLINFO* pThis,int nID)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->KillTimerImpl(nID);\r
-       }\r
-       //((CReaderVCView*)pThis)->KillTimerImpl(nID);\r
-}\r
-\r
-void Sample_SetCursor(struct _FPDF_FORMFILLINFO* pThis,int nCursorType)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->SetCurorImpl(nCursorType);\r
-       }\r
-       //((CReaderVCView*)pThis)->SetCurorImpl(nCursorType);\r
-}\r
-\r
-void Sample_OnChange(struct _FPDF_FORMFILLINFO* pThis)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               pView->OnChangeImpl();\r
-       }\r
-}\r
-FPDF_BOOL      Sample_IsSHIFTKeyDown(struct _FPDF_FORMFILLINFO* pThis)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->IsSHIFTKeyDownImpl();\r
-       }\r
-       return FALSE;\r
-}\r
-FPDF_BOOL      Sample_IsCTRLKeyDown(struct _FPDF_FORMFILLINFO* pThis)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->IsCTRLKeyDownImpl();\r
-       }\r
-       return FALSE;\r
-}\r
-FPDF_BOOL      Sample_IsALTKeyDown(struct _FPDF_FORMFILLINFO* pThis) \r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->IsALTKeyDownImpl();\r
-       }\r
-       return FALSE;\r
-}\r
-FPDF_BOOL      Sample_IsINSERTKeyDown(struct _FPDF_FORMFILLINFO* pThis) \r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->IsINSERTKeyDownImpl();\r
-       }\r
-       return FALSE;\r
-}\r
-\r
-FPDF_PAGE Sample_GetPage(struct _FPDF_FORMFILLINFO* pThis,FPDF_DOCUMENT document, int nPageIndex)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->GetPageImpl(document,nPageIndex);\r
-       }\r
-       return NULL;\r
-}\r
-\r
-FPDF_PAGE Sample_GetCurrentPage(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->GetCurrentPageImpl(document);\r
-       }\r
-       return NULL;\r
-}\r
-\r
-int Sample_GetRotation(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->GetRotationImpl(page);\r
-       }\r
-       return NULL;\r
-}\r
-FPDF_SYSTEMTIME Sample_GetLocalTime(struct _FPDF_FORMFILLINFO* pThis)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-               return pView->GetLocalTimeImpl();\r
-       }\r
-       return FPDF_SYSTEMTIME();\r
-}\r
-\r
-void SampleRelease(struct _FPDF_SYSFONTINFO* pThis)\r
-{\r
-       ((CSampleFontInfo*)pThis)->ReleaseImpl();\r
-}\r
-\r
-void SampleEnumFonts(struct _FPDF_SYSFONTINFO* pThis, void* pMapper)\r
-{\r
-       ((CSampleFontInfo*)pThis)->EnumFontsImpl(pMapper);\r
-}\r
-\r
-void* SampleMapFont(struct _FPDF_SYSFONTINFO* pThis, int weight, int bItalic, int charset, int pitch_family, \r
-                                               const char* face, int* bExact)\r
-{\r
-       return ((CSampleFontInfo*)pThis)->MapFontImpl(weight, bItalic, charset, pitch_family, face, bExact);\r
-}\r
-\r
-unsigned long SampleGetFontData(struct _FPDF_SYSFONTINFO* pThis, void* hFont,\r
-                                                               unsigned int table, unsigned char* buffer, unsigned long buf_size)\r
-{\r
-       return ((CSampleFontInfo*)pThis)->GetFontDataImpl(hFont, table, buffer, buf_size);\r
-}\r
-\r
-unsigned long SampleGetFaceName(struct _FPDF_SYSFONTINFO* pThis, void* hFont, char* buffer, unsigned long buf_size)\r
-{\r
-       return ((CSampleFontInfo*)pThis)->GetFaceNameImpl(hFont, buffer, buf_size);\r
-}\r
-\r
-int SampleGetFontCharset(struct _FPDF_SYSFONTINFO* pThis, void* hFont)\r
-{\r
-       return ((CSampleFontInfo*)pThis)->GetFontCharsetImpl(hFont);\r
-}\r
-\r
-void SampleDeleteFont(struct _FPDF_SYSFONTINFO* pThis, void* hFont)\r
-{\r
-       ((CSampleFontInfo*)pThis)->DeleteFontImpl(hFont);\r
-}\r
-\r
-void SetSampleFontInfo()\r
-{\r
-       CSampleFontInfo* pFontInfo = new CSampleFontInfo;\r
-       pFontInfo->version = 1;\r
-       pFontInfo->DeleteFont = SampleDeleteFont;\r
-       pFontInfo->EnumFonts = SampleEnumFonts;\r
-       pFontInfo->GetFaceName = SampleGetFaceName;\r
-       pFontInfo->GetFont = NULL;\r
-       pFontInfo->GetFontCharset = SampleGetFontCharset;\r
-       pFontInfo->GetFontData = SampleGetFontData;\r
-       pFontInfo->MapFont = SampleMapFont;\r
-       pFontInfo->Release = SampleRelease;\r
-       FPDF_SetSystemFontInfo(pFontInfo);\r
-}\r
-\r
-void   Sample_ExecuteNamedAction(struct _FPDF_FORMFILLINFO* pThis, FPDF_BYTESTRING namedAction)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if ( pView )\r
-       {\r
-                pView->ExecuteNamedActionImpl(namedAction);\r
-       }\r
-\r
-}\r
-void CReaderVCView::ExecuteNamedActionImpl(FPDF_BYTESTRING namedaction)\r
-{\r
-       if(strcmp("Print", (LPCSTR)namedaction) == 0)\r
-               OnFilePrint();\r
-}\r
-void CReaderVCView::OutputSelectedRectImpl(FPDF_PAGE page, double left, double top, double right, double bottom)\r
-{\r
-\r
-       if(page == m_pPage)\r
-       {\r
-\r
-               int device_left, device_top, device_right, device_bottom;\r
-               \r
-               int nActualRangeX = 0;\r
-               int nActualRangeY = 0;\r
-               if ( m_nRotateFlag % 2 == 0 )\r
-               {\r
-                       nActualRangeX = m_nActualSizeX;\r
-                       nActualRangeY = m_nActualSizeY;\r
-               }else{\r
-                       nActualRangeX = m_nActualSizeY;\r
-                       nActualRangeY = m_nActualSizeX;\r
-               }\r
-               \r
-               FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-                       (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, left, top, &device_left, &device_top);\r
-               \r
-               FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-                       (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, right, bottom, &device_right, &device_bottom);\r
-               \r
-               CRect rc(device_left,device_top, device_right, device_bottom);\r
-\r
-\r
-\r
-               m_SelectArray.Add(rc);\r
-\r
-\r
-       }\r
-}\r
-\r
-void           Sample_Release(FPDF_LPVOID clientData)\r
-{\r
-       if (!clientData) return;\r
-\r
-       fclose(((FPDF_FILE*)clientData)->file);\r
-       delete ((FPDF_FILE*)clientData);\r
-}\r
-\r
-FPDF_DWORD     Sample_GetSize(FPDF_LPVOID clientData)\r
-{\r
-       if (!clientData) return 0;\r
-\r
-       long curPos = ftell(((FPDF_FILE*)clientData)->file);\r
-       fseek(((FPDF_FILE*)clientData)->file, 0, SEEK_END);\r
-       long size = ftell(((FPDF_FILE*)clientData)->file);\r
-       fseek(((FPDF_FILE*)clientData)->file, curPos, SEEK_SET);\r
-\r
-       return (FPDF_DWORD)size;\r
-}\r
-\r
-FPDF_RESULT    Sample_ReadBlock(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPVOID buffer, FPDF_DWORD size)\r
-{\r
-       if (!clientData) return -1;\r
-\r
-       fseek(((FPDF_FILE*)clientData)->file, (long)offset, SEEK_SET);\r
-       size_t readSize = fread(buffer, 1, size, ((FPDF_FILE*)clientData)->file);\r
-       return readSize == size ? 0 : -1;\r
-}\r
-\r
-FPDF_RESULT    Sample_WriteBlock(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPCVOID buffer, FPDF_DWORD size)\r
-{\r
-       if (!clientData) return -1;\r
-\r
-       fseek(((FPDF_FILE*)clientData)->file, (long)offset, SEEK_SET);\r
-       //Write data\r
-       size_t writeSize = fwrite(buffer, 1, size, ((FPDF_FILE*)clientData)->file);\r
-       return writeSize == size ? 0 : -1;\r
-}\r
-\r
-FPDF_RESULT    Sample_Flush(FPDF_LPVOID clientData)\r
-{\r
-       if (!clientData) return -1;\r
-\r
-       //Flush file\r
-       fflush(((FPDF_FILE*)clientData)->file);\r
-\r
-       return 0;\r
-}\r
-\r
-FPDF_RESULT    Sample_Truncate(FPDF_LPVOID clientData, FPDF_DWORD size)\r
-{\r
-       return 0;\r
-}\r
-\r
-void   Sample_DisplayCaret(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_BOOL bVisible, double left, double top, double right, double bottom)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if (!pView) return;\r
-\r
-       HWND hWnd = pView->m_hWnd;\r
-\r
-       if (bVisible)\r
-       {\r
-               CPoint ltPt;\r
-               pView->PageToDevice(left, top, ltPt);\r
-               CPoint rbPt;\r
-               pView->PageToDevice(right, bottom, rbPt);\r
-               CRect rcCaret(ltPt, rbPt);\r
-               \r
-               ::DestroyCaret();\r
-               ::CreateCaret(hWnd, (HBITMAP)0, rcCaret.Width(), rcCaret.Height());\r
-               ::SetCaretPos (rcCaret.left, rcCaret.top);\r
-               ::ShowCaret(hWnd);\r
-       }\r
-       else\r
-       {\r
-               ::DestroyCaret();\r
-               ::HideCaret(hWnd);\r
-       }\r
-}\r
-\r
-int            Sample_GetCurrentPageIndex(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document)\r
-{\r
-       CReaderVCView* pView =(CReaderVCView*)pThis;\r
-       if (!pView) return -1;\r
-\r
-       return pView->GetCurrentPageIndex();\r
-}\r
-\r
-void   Sample_SetCurrentPage(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, int iCurPage)\r
-{\r
-       CReaderVCView* pView = (CReaderVCView*)pThis;\r
-       if (!pView) return;\r
-\r
-       FPDF_DOCUMENT curDoc = pView->GetPDFDoc();\r
-       if (curDoc != document)\r
-               return;\r
-\r
-       int nPageCount = FPDF_GetPageCount(curDoc);\r
-       if (nPageCount > iCurPage)\r
-       {\r
-               int nCurPageInx = pView->GetCurrentPageIndex();\r
-               if (nCurPageInx != iCurPage)\r
-               {\r
-                       pView->GotoPage(nCurPageInx);\r
-               }\r
-       }\r
-}\r
-\r
-void   Sample_GotoURL(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, FPDF_WIDESTRING wsURL)\r
-{\r
-       CReaderVCView* pView = (CReaderVCView*)pThis;\r
-       if (!pView) return;\r
-\r
-       wchar_t* pURL = (wchar_t*)wsURL;\r
-       MessageBoxW(NULL, pURL, NULL, MB_OK);\r
-}\r
-\r
-FPDF_WIDESTRING        Sample_GetURL(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document)\r
-{\r
-       CReaderVCView* pView = (CReaderVCView*)pThis;\r
-       if (!pView) return NULL;\r
-\r
-       if (pView->GetPDFDoc() != document)\r
-               return NULL;\r
-\r
-       //not support in this demo\r
-\r
-       return NULL;\r
-}\r
-\r
-void Sample_AddDoRecord(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, FPDF_WIDGET hWidget)\r
-{\r
-       //not support\r
-}\r
-\r
-void   Sample_PageEvent(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_DWORD eventFlag)\r
-{\r
-       //\r
-}\r
-\r
-void   Sample_GetPageViewRect(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, double* left, double* top, double* right, double* bottom)\r
-{\r
-       CReaderVCView* pView = (CReaderVCView*)pThis;\r
-       if (!pView) return;\r
-\r
-       if (pView->GetPage() != page)\r
-               return;\r
-\r
-       CRect clientRect;\r
-       pView->GetClientRect(&clientRect);\r
-\r
-       *left = (double)clientRect.left;\r
-       *right = (double)clientRect.right;\r
-       *top = (double)clientRect.top;\r
-       *bottom = (double)clientRect.bottom;\r
-}\r
-\r
-#define         WM_XFAMENU_COPY          10000\r
-\r
-FPDF_BOOL Sample_PopupMenu(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_WIDGET hWidget, int menuFlag, float x, float y)\r
-{\r
-       CReaderVCView* pView = (CReaderVCView*)pThis;\r
-       if (!pView)\r
-               return FALSE;\r
-\r
-       CMenu menu;\r
-       menu.CreatePopupMenu();\r
-\r
-       int nMenuIndex = 0;\r
-\r
-       if (menuFlag & FXFA_MEMU_COPY)\r
-               menu.InsertMenu(nMenuIndex++, MF_BYPOSITION, WM_XFAMENU_COPY, "Copy");\r
-       //...\r
-\r
-       CPoint pt;\r
-       pView->PageToDevice(x, y, pt);\r
-\r
-       UINT nID = menu.TrackPopupMenu(TPM_RIGHTBUTTON, pt.x, pt.y, pView);\r
-       switch(nID)\r
-       {\r
-       case WM_XFAMENU_COPY:\r
-               {\r
-                       FPDF_DWORD length = 0;\r
-                       FPDF_Widget_Copy(pView->GetPDFDoc(), hWidget, NULL, &length);\r
-                       if (length > 0)\r
-                       {\r
-                               unsigned short* buffer = (unsigned short*)malloc((length+1)*sizeof(unsigned short));\r
-                               memset(buffer, 0, (length+1)*sizeof(unsigned short));\r
-                               FPDF_Widget_Copy(pView->GetPDFDoc(), hWidget, buffer, &length);\r
-                               free(buffer);\r
-                       }\r
-               }\r
-               break;\r
-       }\r
-\r
-       menu.DestroyMenu();\r
-\r
-       return TRUE;\r
-}\r
-\r
-FPDF_FILEHANDLER* Sample_OpenFile(struct _FPDF_FORMFILLINFO* pThis, int fileFlag, FPDF_WIDESTRING wsURL)\r
-{\r
-       char* pszURL;\r
-       CString strURL;\r
-       if (wsURL == NULL) {\r
-               if (fileFlag == FXFA_FILE_XDP)\r
-                       strURL = "C://temp.xdp";\r
-               else if(fileFlag == FXFA_FILE_XML)\r
-                       strURL = "C://temp.xml";\r
-       }\r
-       else {\r
-               int iSize;\r
-               iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsURL, -1, NULL, 0, NULL, NULL);\r
-               pszURL = (char*)malloc((iSize+1));\r
-               WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsURL, -1, pszURL, iSize, NULL, NULL);\r
-               CString str(pszURL);\r
-               strURL = str;\r
-       }\r
-       \r
-\r
-       FILE* file = fopen(strURL, "r");\r
-       FPDF_FILE* pFileHander = new FPDF_FILE;\r
-       pFileHander->file = file;\r
-       pFileHander->fileHandler.clientData = pFileHander;\r
-       pFileHander->fileHandler.Flush = Sample_Flush;\r
-       pFileHander->fileHandler.GetSize = Sample_GetSize;\r
-       pFileHander->fileHandler.ReadBlock = Sample_ReadBlock;\r
-       pFileHander->fileHandler.Release = Sample_Release;\r
-       pFileHander->fileHandler.Truncate = Sample_Truncate;\r
-       pFileHander->fileHandler.WriteBlock = Sample_WriteBlock;\r
-\r
-       free(pszURL);\r
-       return &pFileHander->fileHandler;\r
-}\r
-\r
-FPDF_BOOL Sample_GetFilePath(struct _FPDF_FORMFILLINFO* pThis, FPDF_FILEHANDLER* pFileHandler, FPDF_BSTR* path)\r
-{\r
-       CReaderVCView* pView = (CReaderVCView*)pThis;\r
-       if (!pView)\r
-               return NULL;\r
-\r
-       CString filePath = pView->GetFilePath();\r
-       FPDF_BStr_Set(path, filePath.GetBuffer(filePath.GetLength()), filePath.GetLength());\r
-\r
-       return TRUE;\r
-}\r
-\r
-void   Sample_EmailTo(struct _FPDF_FORMFILLINFO* pThis, FPDF_FILEHANDLER* fileHandler, FPDF_WIDESTRING emailTo)\r
-{\r
-       MessageBoxW(NULL, (wchar_t*)emailTo, L"Sample_email", MB_OK);\r
-}\r
-\r
-void   Sample_UploadTo(struct _FPDF_FORMFILLINFO* pThis, FPDF_FILEHANDLER* fileHandler, FPDF_WIDESTRING uploadTo)\r
-{\r
-       int iSize;\r
-       char* pszURL;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)uploadTo, -1, NULL, 0, NULL, NULL);\r
-       pszURL = (char*)malloc((iSize+1));\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)uploadTo, -1, pszURL, iSize, NULL, NULL);\r
-       CString strPath(pszURL);\r
-\r
-       CString strUploadPath = "C://test";\r
-       int pos = strPath.ReverseFind('.');\r
-       if (pos != -1){\r
-               CString suffix = strPath.Right(strPath.GetLength()-pos);\r
-               strUploadPath += suffix;\r
-       }\r
-\r
-       FILE* file = fopen(strUploadPath, "r");\r
-       if (file) {\r
-               int size = fileHandler->GetSize(fileHandler->clientData);\r
-               BYTE* buffer = (BYTE*)malloc(size);\r
-               fileHandler->ReadBlock(fileHandler->clientData, 0, buffer, size);\r
-               fwrite(buffer, size, 1, file);\r
-               fflush(file);\r
-               fclose(file);\r
-               free(buffer);\r
-       }\r
-\r
-       free(pszURL);\r
-}\r
-\r
-int            Sample_GetAppName(struct _FPDF_FORMFILLINFO* pThis, void* appName, int length)\r
-{\r
-       if(appName == NULL || length <= 0)\r
-       {\r
-               CString name = AfxGetAppName();\r
-               return name.GetLength();\r
-       }       \r
-       else\r
-       {\r
-               CString name = AfxGetAppName();\r
-               int len = name.GetLength();\r
-               if(length > len)\r
-                       length = len;\r
-               memcpy(appName, name.GetBuffer(name.GetLength()), length);\r
-               return length;\r
-       }\r
-}\r
-\r
-int            Sample_GetPlatform(struct _FPDF_FORMFILLINFO* pThis, void* platform, int length)\r
-{\r
-       if(platform == NULL || length <= 0)\r
-       {\r
-               return 3;\r
-       }       \r
-       else\r
-       {\r
-               if(length > 3)\r
-                       length = 3;\r
-               memcpy(platform, "win", length);\r
-               return length;\r
-       }\r
-}\r
-\r
-int            Sample_GetDocumentCount(struct _FPDF_FORMFILLINFO* pThis)\r
-{\r
-       return 1;\r
-}\r
-\r
-int            Sample_GetCurDocumentIndex(struct _FPDF_FORMFILLINFO* pThis)\r
-{\r
-       return 0;\r
-}\r
-\r
-FPDF_LPFILEHANDLER     Sample_DownloadFromURL(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING URL)\r
-{\r
-       int iSize;\r
-       char* pszURL;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)URL, -1, NULL, 0, NULL, NULL);\r
-       pszURL = (char*)malloc((iSize+1));\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)URL, -1, pszURL, iSize, NULL, NULL);\r
-       CString strURL(pszURL);\r
-\r
-       CString bsLocal = strURL;\r
-       CReaderVCView::CreateLocalPath(bsLocal);\r
-\r
-       if (strURL.Left(7) == "http://")\r
-       {\r
-               CInternetSession sess;\r
-               CHttpFile *pFile = (CHttpFile*)sess.OpenURL(strURL);\r
-               int iLength = pFile->GetLength();\r
-               if (pFile == NULL || iLength < 1) return NULL;\r
-\r
-               FILE *pImageFile = fopen(bsLocal, "wb");\r
-\r
-               BYTE* pContent = new BYTE[iLength];\r
-               memset(pContent, 0, iLength);\r
-               int iRead = pFile->Read(pContent, iLength);\r
-\r
-               fwrite(pContent, 1, iLength, pImageFile);\r
-               free(pContent);\r
-               fflush(pImageFile);\r
-               fclose(pImageFile);\r
-\r
-               pFile->Close();\r
-               delete pFile;\r
-               sess.Close();\r
-       }\r
-       else if (strURL.Left(6) == "ftp://")\r
-       {\r
-               CInternetSession sess;\r
-               CFtpConnection* pConnect = sess.GetFtpConnection(bsLocal, "NULL", "NULL"); \r
-               CInternetFile* pFile = pConnect->OpenFile(bsLocal);\r
-\r
-               int iLength = pFile->GetLength();\r
-               if (pFile == NULL || iLength < 1) return NULL;\r
-               FILE *pImageFile = fopen(bsLocal, "wb");\r
-\r
-               BYTE* pContent = new BYTE[iLength];\r
-               memset(pContent, 0, iLength);\r
-               int iRead = pFile->Read(pContent, iLength);\r
-\r
-               fwrite(pContent, 1, iLength, pImageFile);\r
-               free(pContent);\r
-               fflush(pImageFile);\r
-               fclose(pImageFile);\r
-\r
-               pFile->Close();\r
-               delete pFile;\r
-               sess.Close();\r
-       }       \r
-       \r
-       free(pszURL);\r
-       \r
-       FPDF_FILE* fileWrap = new FPDF_FILE;\r
-       FILE* file = fopen(bsLocal, "r");\r
-       fileWrap->file = file;\r
-       fileWrap->fileHandler.clientData = fileWrap;\r
-       fileWrap->fileHandler.ReadBlock = Sample_ReadBlock;\r
-       fileWrap->fileHandler.GetSize = Sample_GetSize;\r
-       fileWrap->fileHandler.Flush = Sample_Flush;\r
-       fileWrap->fileHandler.Release = Sample_Release;\r
-       fileWrap->fileHandler.Truncate = Sample_Truncate;\r
-       fileWrap->fileHandler.WriteBlock = Sample_WriteBlock;\r
-\r
-       return &fileWrap->fileHandler;\r
-}\r
-\r
-FPDF_BOOL      Sample_PostRequestURL(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsContentType, FPDF_WIDESTRING wsEncode, FPDF_WIDESTRING wsHeader, FPDF_BSTR* respone)\r
-{\r
-       int iSize;\r
-       char* pszURL;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsURL, -1, NULL, 0, NULL, NULL);\r
-       pszURL = (char*)malloc((iSize+1));\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsURL, -1, pszURL, iSize, NULL, NULL);\r
-       CString csURL(pszURL);\r
-\r
-       char* pszData;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsData, -1, NULL, 0, NULL, NULL);\r
-       pszData = (char*)malloc(iSize+1);\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsData, -1, pszData, iSize, NULL, NULL);\r
-       CString csData(pszData);\r
-       \r
-       char* pszContentType;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsContentType, -1, NULL, 0, NULL, NULL);\r
-       pszContentType = (char*)malloc(iSize+1);\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsContentType, -1, pszContentType, iSize, NULL, NULL);\r
-       CString csContentType(pszContentType);\r
-       \r
-       char* pszHeader;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsHeader, -1, NULL, 0, NULL, NULL);\r
-       pszHeader = (char*)malloc(iSize+1);\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsHeader, -1, pszHeader, iSize, NULL, NULL);\r
-       CString csHeader(pszHeader);\r
-\r
-       CString csApp = AfxGetAppName();\r
-       csApp += L"/1.0";\r
-       BOOL bRet = FALSE;\r
-       DWORD dwServiceType = 0, dwFlags = ICU_NO_META;\r
-       CString csServer, sObject, csUserName, csPassword;\r
-       INTERNET_PORT nPort = 0;\r
-\r
-       bRet = AfxParseURLEx(csURL, dwServiceType, csServer, sObject, nPort, csUserName, csPassword, dwFlags);\r
-       if (!bRet)\r
-               return bRet;\r
-\r
-       if (dwServiceType != AFX_INET_SERVICE_HTTP && dwServiceType != AFX_INET_SERVICE_HTTPS)\r
-               return bRet;\r
-\r
-       CString csObject = sObject;\r
-       CString csResponse;\r
-       bRet = CReaderVCView::HttpDataPost(csData, csApp, csObject, csServer, csUserName, csPassword, nPort,\r
-               dwServiceType == AFX_INET_SERVICE_HTTPS, csContentType, csHeader, csResponse);\r
-\r
-       FPDF_BStr_Init(respone);\r
-       FPDF_BStr_Set(respone, (FPDF_LPCSTR)csResponse.GetBuffer(csResponse.GetLength()), csResponse.GetLength());\r
-\r
-       free(pszURL);\r
-       free(pszData);\r
-       free(pszContentType);\r
-       free(pszHeader);\r
-\r
-       return true;\r
-}\r
-\r
-FPDF_BOOL      Sample_PutRequestURL(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsEncode)\r
-{\r
-       int iSize;\r
-       char* pszURL;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsURL, -1, NULL, 0, NULL, NULL);\r
-       pszURL = (char*)malloc((iSize+1));\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsURL, -1, pszURL, iSize, NULL, NULL);\r
-       CString csURL(pszURL);\r
-\r
-       char* pszData;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsData, -1, NULL, 0, NULL, NULL);\r
-       pszData = (char*)malloc((iSize+1));\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsData, -1, pszData, iSize, NULL, NULL);\r
-       CString csData(pszData);\r
-\r
-       CString csApp = AfxGetAppName();\r
-       csApp += L"/1.0";\r
-       BOOL bRet = FALSE;\r
-       DWORD dwServiceType = 0, dwFlags = ICU_NO_META;\r
-       CString csServer, sObject, csUserName, csPassword;\r
-       INTERNET_PORT nPort = 0;\r
-\r
-       bRet = AfxParseURLEx(csURL, dwServiceType, csServer, sObject, nPort, csUserName, csPassword, dwFlags);\r
-       if (!bRet)\r
-               return bRet;\r
-\r
-       if (dwServiceType != AFX_INET_SERVICE_HTTP && dwServiceType != AFX_INET_SERVICE_HTTPS)\r
-               return bRet;\r
-\r
-       CString csObject = sObject;\r
-\r
-       bRet = CReaderVCView::HttpDataPut(csData, csApp, csObject, csServer, csUserName, csPassword, nPort, dwServiceType == AFX_INET_SERVICE_HTTPS);\r
-       \r
-       free(pszData);\r
-       free(pszURL);\r
-       return TRUE;\r
-}\r
-\r
-FPDF_BOOL      Sample_ShowFileDialog(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsTitle, FPDF_WIDESTRING wsFilter, FPDF_BOOL isOpen, FPDF_STRINGHANDLE pathArr)\r
-{\r
-       int iSize;\r
-       char* pszFilter;\r
-       iSize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsFilter, -1, NULL, 0, NULL, NULL);\r
-       pszFilter = (char*)malloc((iSize+1));\r
-       WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)wsFilter, -1, pszFilter, iSize, NULL, NULL);\r
-\r
-       CFileDialog fileOpen(isOpen, NULL,NULL, OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST, pszFilter);\r
-       //      fileOpen.m_ofn.Flags|=OFN_ENABLEHOOK|OFN_ALLOWMULTISELECT;\r
-       if(fileOpen.DoModal()==IDCANCEL) \r
-       { \r
-               return FALSE;   \r
-       }\r
-       \r
-       POSITION pos;   \r
-       pos=fileOpen.GetStartPosition(); \r
-       CString csFile;\r
-       while(pos!=NULL) \r
-       { \r
-               csFile=fileOpen.GetNextPathName(pos); \r
-               FPDF_StringHandleAddString(pathArr, csFile.GetBuffer(csFile.GetLength()), csFile.GetLength());          \r
-       }\r
-\r
-       free(pszFilter);\r
-       return TRUE;\r
-}\r
-\r
-FPDF_SYSTEMTIME CReaderVCView::GetLocalTimeImpl()\r
-{\r
-       FPDF_SYSTEMTIME sys;\r
-       time_t curTime;\r
-       time(&curTime);\r
-       tm* pTm = localtime(&curTime);\r
-       if(pTm)\r
-       {\r
-               sys.wDay = pTm->tm_mday;\r
-               sys.wDayOfWeek= pTm->tm_wday;\r
-               sys.wHour = pTm->tm_hour;\r
-               sys.wMilliseconds = 0;\r
-               sys.wMinute = pTm->tm_min;\r
-               sys.wMonth = pTm->tm_mon;\r
-               sys.wSecond = pTm->tm_sec;\r
-               sys.wYear = pTm->tm_year + 1900;\r
-       }\r
-       \r
-       return sys;\r
-}\r
-\r
-int CReaderVCView::GetRotationImpl(FPDF_PAGE page)\r
-{\r
-       return m_nRotateFlag;\r
-}\r
-\r
-FPDF_PAGE CReaderVCView::GetPageImpl(FPDF_DOCUMENT document,int nPageIndex)\r
-{\r
-       FPDF_PAGE page = NULL;\r
-       m_pageMap.Lookup(nPageIndex, page);\r
-       if(page)\r
-               return page;\r
-       page = FPDF_LoadPage(document, nPageIndex);\r
-       FORM_OnAfterLoadPage(page, m_pApp);\r
-       m_pageMap.SetAt(nPageIndex, page);\r
-       return page;\r
-}\r
-\r
-FPDF_PAGE CReaderVCView::GetCurrentPageImpl(FPDF_DOCUMENT document)\r
-{\r
-       return m_pPage;\r
-}\r
-\r
-bool CReaderVCView::IsALTKeyDownImpl()\r
-{\r
-       return GetKeyState(VK_MENU) < 0;\r
-}\r
-bool CReaderVCView::IsINSERTKeyDownImpl()\r
-{\r
-       return GetKeyState(VK_INSERT) & 0x01;\r
-}\r
-bool CReaderVCView::IsSHIFTKeyDownImpl()\r
-{\r
-       return !((GetKeyState(VK_SHIFT)&0x8000) == 0);\r
-}\r
-bool CReaderVCView::IsCTRLKeyDownImpl()\r
-{\r
-       return GetKeyState(VK_CONTROL) < 0;\r
-}\r
-\r
-void CReaderVCView::OnChangeImpl()\r
-{\r
-\r
-}\r
-\r
-CString CReaderVCView::GetFilePath()\r
-{\r
-       CReaderVCDoc* pDoc = GetDocument();\r
-       if(pDoc)\r
-       {\r
-               return pDoc->m_strPDFName;\r
-       }\r
-       return "";\r
-}\r
-\r
-BOOL CReaderVCView::SubmitFormImpl(void* pBuffer, int nLength, CString strURL)\r
-{\r
-       CString tempFDFFile = "D://1.fdf";\r
-\r
-       if (pBuffer == NULL || nLength <= 0)\r
-       {\r
-               return FALSE;\r
-       }\r
-\r
-       CFile file;\r
-       if (file.Open(tempFDFFile, CFile::modeCreate | CFile::modeWrite | CFile::typeBinary))\r
-       {\r
-               file.Write(pBuffer, nLength);\r
-               file.Close();\r
-       }\r
-\r
-       return TRUE;\r
-}\r
-\r
-int Sample_appResponse(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Question, FPDF_WIDESTRING Title, \r
-                                          FPDF_WIDESTRING Default, FPDF_WIDESTRING cLabel, FPDF_BOOL bPassword, void* response, int length)\r
-{\r
-       CReaderVCView* pView = (CReaderVCView*)pThis->m_pFormfillinfo;\r
-       FPDF_WIDESTRING wsResponse;\r
-\r
-       if (pView->m_pwsResponse && response != NULL)\r
-       {\r
-               wsResponse = (FPDF_WIDESTRING)pView->m_pwsResponse;\r
-               length = wcslen((const wchar_t*)wsResponse);\r
-               memcpy(response, wsResponse, length*sizeof(wchar_t));\r
-               pView->m_pwsResponse = NULL;\r
-       }       \r
-       else\r
-       {\r
-               CJS_ResponseDlg dlg;\r
-               dlg.SetTitle(Title);\r
-               dlg.SetDefault(Default);\r
-               dlg.SetLabel(cLabel);\r
-               dlg.SetQuestion(Question);\r
-               dlg.SetIsVisible(bPassword);\r
-               int iRet = dlg.DoModal();               \r
-               \r
-               if (iRet == 1)\r
-               {\r
-                       wsResponse = dlg.GetResponse();\r
-                       length = wcslen((const wchar_t*)wsResponse);\r
-                       pView->m_pwsResponse = new wchar_t[length+1];\r
-                       memset(pView->m_pwsResponse, 0, length*sizeof(wchar_t));\r
-                       memcpy(pView->m_pwsResponse, wsResponse, length*sizeof(wchar_t));\r
-                       pView->m_pwsResponse[length] = L'\0';\r
-               }\r
-       }\r
-       \r
-       return length*sizeof(wchar_t);\r
-}\r
-\r
-int Sample_appalert(struct _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Msg, FPDF_WIDESTRING Title, int Type, int Icon)\r
-{\r
-       int nRet = 0;\r
-       if(pThis && pThis->m_pFormfillinfo)\r
-       {\r
-               CReaderVCView* pView = (CReaderVCView*)pThis->m_pFormfillinfo;\r
-               int msgType = MB_OK;\r
-               switch(Type)\r
-               {\r
-       \r
-               case 1:\r
-                       msgType = MB_OKCANCEL;\r
-                       break;\r
-               case 2:\r
-                       msgType = MB_YESNO;\r
-                       break;\r
-               case 3:\r
-                       msgType = MB_YESNOCANCEL;\r
-                       break;  \r
-               case 0:\r
-               default:\r
-                       break;\r
-               }\r
-               nRet = MessageBoxW(pView->m_hWnd, (const wchar_t*)Msg, (const wchar_t*)Title, msgType);\r
-               switch(nRet)\r
-               {\r
-               case IDOK:\r
-                       return 1;\r
-               case IDCANCEL:\r
-                       return 2;\r
-               case IDNO:\r
-                       return 3;\r
-               case IDYES:\r
-                       return 4;\r
-               }\r
-               return nRet;\r
-       }\r
-       return nRet;\r
-}\r
-\r
-void Sample_appbeep(struct _IPDF_JsPlatform* pThis, int nType)\r
-{\r
-       MessageBeep(nType);\r
-       //AfxMessageBox("aaaa");\r
-}\r
-\r
-\r
-CString userSelFilePath;\r
-int  Sample_fieldBrowse(struct _IPDF_JsPlatform* pThis,void* filePath, int length)\r
-{\r
-       if(userSelFilePath.IsEmpty())\r
-       {\r
-               CFileDialog fd(FALSE, "fdf");\r
-               if(fd.DoModal() == IDOK)\r
-               {\r
-                       userSelFilePath = fd.GetPathName();\r
-                       \r
-                       if(filePath == NULL || length == 0)\r
-                               return userSelFilePath.GetLength() + 1;\r
-                       else\r
-                               return 0;\r
-               }\r
-               else\r
-                       return 0;\r
-       }       \r
-       else\r
-       {\r
-               int nLen = userSelFilePath.GetLength()+1;\r
-               if(length > nLen)\r
-                       length = nLen;\r
-               memcpy(filePath, userSelFilePath.GetBuffer(length), length);\r
-               userSelFilePath.ReleaseBuffer();\r
-               userSelFilePath = "";\r
-               return length;\r
-       }\r
-}\r
-int Sample_docGetFilePath(struct _IPDF_JsPlatform* pThis, void* filePath, int length)\r
-{\r
-       if(pThis && pThis->m_pFormfillinfo)\r
-       {\r
-               CReaderVCView* pView = (CReaderVCView*)pThis->m_pFormfillinfo;\r
-               CString csFilePath = pView->GetFilePath();\r
-\r
-               int nbufflen = csFilePath.GetLength() + 1;\r
-               if(filePath == NULL || length == 0)\r
-                       return nbufflen;\r
-\r
-               if(length > nbufflen)\r
-                       length = nbufflen;\r
-               memcpy(filePath, csFilePath.GetBuffer(length), length);\r
-               csFilePath.ReleaseBuffer();\r
-\r
-               return length;\r
-\r
-       }\r
-       return 0;\r
-}\r
-\r
-void Sample_docSubmitForm(struct _IPDF_JsPlatform* pThis,void* formData, int length, FPDF_WIDESTRING URL)\r
-{\r
-       if(pThis && pThis->m_pFormfillinfo)\r
-       {\r
-               CReaderVCView *pView = (CReaderVCView*)pThis->m_pFormfillinfo;\r
-               if (pView)\r
-               {\r
-                       pView->SubmitFormImpl(formData, length, "");\r
-               }\r
-       }       \r
-}\r
-\r
-void Sample_gotoPage(struct _IPDF_JsPlatform* pThis, int nPageNum)\r
-{\r
-       if(pThis && pThis->m_pFormfillinfo)\r
-       {\r
-               CReaderVCView *pView = (CReaderVCView*)pThis->m_pFormfillinfo;\r
-               if (pView)\r
-               {\r
-                       pView->GotoPage(nPageNum);\r
-               }\r
-       }       \r
-}\r
-\r
-CReaderVCView::CReaderVCView()\r
-{\r
-       // TODO: add construction code here\r
-       m_pFram = NULL;\r
-       m_pExportPageDlg = NULL;\r
-       m_pDoc = NULL;\r
-       m_pPage = NULL;\r
-       m_nTotalPage = 0;\r
-       m_nRotateFlag = 0;\r
-       m_dbScaleFactor = 1.0f;\r
-       m_nPageIndex = -1;\r
-       m_dbPageWidth = 0.0f;\r
-       m_dbPageHeight = 0.0f;\r
-       m_nStartX = 0;\r
-       m_nStartY = 0;\r
-       m_nActualSizeX = 0;\r
-       m_nActualSizeY = 0;\r
-\r
-       //for search text\r
-       m_pTextPage = NULL;\r
-       m_FindInfo.m_strFind = _T("");\r
-       m_FindInfo.m_nFlag = -1;\r
-       m_FindInfo.m_nDirection = -1;\r
-       m_FindInfo.m_nStartPageIndex = -1;\r
-       m_FindInfo.m_nStartCharIndex = -1;\r
-       m_FindInfo.m_bFirst = TRUE;\r
-       m_FindInfo.m_pCurFindBuf = NULL;\r
-       m_pSCHHandle = NULL;\r
-\r
-       m_rtFind = NULL;\r
-       m_nRectNum = 0;\r
-       \r
-       //for select text\r
-       m_bSelect = FALSE;\r
-       m_bHand = TRUE;\r
-       m_bSnap = FALSE;\r
-       m_bHasChar = FALSE;\r
-       \r
-       m_ptLBDown.x = m_ptLBDown.y = 0;\r
-       m_ptLBUp.x = m_ptLBUp.y = 0;\r
-       m_ptOld.x = m_ptOld.y = 0;\r
-\r
-       m_nStartIndex = m_nEndIndex = m_nOldIndex = -1;\r
-       m_rtArray.RemoveAll();\r
-       m_rtOld.left = m_rtOld.right = m_rtOld.bottom = m_rtOld.top = 0;\r
-\r
-       m_nPosH = m_nPosV = -1;\r
-\r
-       // for links\r
-       m_pLink = NULL;\r
-       m_bBookmark = FALSE;\r
-\r
-       m_bmp = NULL;\r
-       m_pwsResponse = NULL;\r
-\r
-       this->FFI_Invalidate = Sample_Invalidate;\r
-       this->Release= Sample_Release;\r
-       this->FFI_SetTimer = Sample_SetTimer;\r
-       this->FFI_KillTimer = Sample_KillTimer;\r
-       this->FFI_GetLocalTime = Sample_GetLocalTime;\r
-       this->FFI_SetCursor = Sample_SetCursor;\r
-       this->FFI_OnChange = Sample_OnChange;\r
-       this->FFI_GetPage = Sample_GetPage;\r
-       this->FFI_GetCurrentPage = Sample_GetCurrentPage;\r
-       this->FFI_GetRotation = Sample_GetRotation;\r
-       this->FFI_OutputSelectedRect = Sample_OutputSelectedRect;\r
-       this->FFI_ExecuteNamedAction = Sample_ExecuteNamedAction;\r
-       this->FFI_OutputSelectedRect  = NULL;\r
-       this->FFI_SetTextFieldFocus = NULL;\r
-       this->FFI_DoGoToAction = NULL;\r
-       this->FFI_DoURIAction = NULL;\r
-       this->FFI_DisplayCaret = Sample_DisplayCaret;\r
-       this->FFI_GetCurrentPageIndex = Sample_GetCurrentPageIndex;\r
-       this->FFI_SetCurrentPage = Sample_SetCurrentPage;\r
-       this->FFI_GotoURL = Sample_GotoURL;\r
-       this->FFI_GetPageViewRect = Sample_GetPageViewRect;\r
-       this->FFI_PopupMenu = Sample_PopupMenu;\r
-       this->FFI_OpenFile = Sample_OpenFile;\r
-       this->FFI_GetFilePath = Sample_GetFilePath;\r
-       this->FFI_EmailTo = Sample_EmailTo;\r
-       this->FFI_UploadTo = Sample_UploadTo;\r
-       this->FFI_GetPlatform = Sample_GetPlatform;\r
-       this->FFI_GetDocumentCount = Sample_GetDocumentCount;\r
-       this->FFI_GetCurDocumentIndex = Sample_GetCurDocumentIndex;\r
-       this->FFI_DownloadFromURL = Sample_DownloadFromURL;\r
-       this->FFI_PostRequestURL = Sample_PostRequestURL;\r
-       this->FFI_PutRequestURL = Sample_PutRequestURL;\r
-       this->FFI_ShowFileDialog = Sample_ShowFileDialog;       \r
-       this->version = 1;\r
-       \r
-       this->m_pJsPlatform = NULL;\r
-       this->m_pJsPlatform = new IPDF_JSPLATFORM;\r
-       memset(m_pJsPlatform, 0, sizeof(IPDF_JSPLATFORM));\r
-       this->m_pJsPlatform->app_alert = Sample_appalert;\r
-       this->m_pJsPlatform->app_response = Sample_appResponse;\r
-       this->m_pJsPlatform->app_beep = Sample_appbeep;\r
-       this->m_pJsPlatform->Field_browse =Sample_fieldBrowse;\r
-       this->m_pJsPlatform->Doc_getFilePath = Sample_docGetFilePath;\r
-       this->m_pJsPlatform->Doc_submitForm = Sample_docSubmitForm;\r
-       this->m_pJsPlatform->Doc_gotoPage = Sample_gotoPage;\r
-       this->m_pJsPlatform->m_pFormfillinfo = this;\r
-\r
-       m_pApp = NULL;\r
-}\r
-\r
-\r
-CReaderVCView::~CReaderVCView()\r
-{\r
-\r
-//     FPDF_DestroyApp(m_App);\r
-\r
-       if(m_pTextPage != NULL)\r
-       {\r
-               FPDFText_ClosePage(m_pTextPage);\r
-               m_pTextPage = NULL;\r
-       }\r
-       if (m_pLink != NULL)\r
-       {\r
-               FPDFLink_CloseWebLinks(m_pLink);\r
-               m_pLink = NULL;\r
-       }\r
-\r
-       POSITION pos = m_pageMap.GetStartPosition();\r
-       while(pos)\r
-       {\r
-               int nIndex = 0;\r
-               FPDF_PAGE page = NULL;\r
-               m_pageMap.GetNextAssoc(pos, nIndex, page);\r
-\r
-               if (page)\r
-               {\r
-                       FORM_OnBeforeClosePage(page, m_pApp);\r
-                       FPDF_ClosePage(page);\r
-               }\r
-       }\r
-       m_pPage = NULL;\r
-\r
-       if (m_pDoc != NULL)\r
-       {\r
-               //Should strictly follow the reverse order of initialization .\r
-               FORM_DoDocumentAAction(m_pApp, FPDFDOC_AACTION_WC);\r
-               if(m_pApp)\r
-                       FPDFDOC_ExitFormFillEnviroument(m_pApp);\r
-               FPDF_CloseDocument(m_pDoc);\r
-               m_pDoc = NULL;\r
-       }\r
-       if (m_FindInfo.m_pCurFindBuf != NULL)\r
-       {\r
-               delete []m_FindInfo.m_pCurFindBuf;\r
-               m_FindInfo.m_pCurFindBuf = NULL;\r
-       }\r
-       if (m_rtFind != NULL)\r
-       {\r
-               delete m_rtFind;\r
-               m_rtFind = NULL;\r
-       }\r
-       if(m_bmp != NULL)\r
-       {\r
-               FPDFBitmap_Destroy(m_bmp);\r
-       }\r
-\r
-       if (m_pwsResponse)\r
-       {\r
-               delete m_pwsResponse;\r
-               m_pwsResponse = NULL;\r
-       }\r
-\r
-       if(this->m_pJsPlatform)\r
-               delete m_pJsPlatform;\r
-\r
-       m_mapTimerFuns.RemoveAll();\r
-//     m_formFiledInfo.Release();\r
-//     }\r
-//     m_rtArray.RemoveAll();\r
-}\r
-\r
-BOOL CReaderVCView::PreCreateWindow(CREATESTRUCT& cs)\r
-{\r
-       // TODO: Modify the Window class or styles here by modifying\r
-       //  the CREATESTRUCT cs\r
-       cs.style |= WS_MAXIMIZE | WS_VISIBLE | WS_VSCROLL |WS_HSCROLL;\r
-       return CView::PreCreateWindow(cs);\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCView drawing\r
-\r
-void CReaderVCView::OnDraw(CDC* pDC)\r
-{\r
-       CReaderVCDoc* pDoc = GetDocument();\r
-       ASSERT_VALID(pDoc);\r
-       // TODO: add draw code for native data here\r
-       DrawPage(m_nRotateFlag, pDC);\r
-       DrawAllRect(pDC);\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCView printing\r
-\r
-BOOL CReaderVCView::OnPreparePrinting(CPrintInfo* pInfo)\r
-{\r
-       // default preparation\r
-       return DoPreparePrinting(pInfo);\r
-}\r
-\r
-void CReaderVCView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)\r
-{\r
-       // TODO: add extra initialization before printing\r
-}\r
-\r
-void CReaderVCView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)\r
-{\r
-       // TODO: add cleanup after printing\r
-}\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCView diagnostics\r
-\r
-#ifdef _DEBUG\r
-void CReaderVCView::AssertValid() const\r
-{\r
-       CView::AssertValid();\r
-}\r
-\r
-void CReaderVCView::Dump(CDumpContext& dc) const\r
-{\r
-       CView::Dump(dc);\r
-}\r
-\r
-CReaderVCDoc* CReaderVCView::GetDocument() // non-debug version is inline\r
-{\r
-       ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CReaderVCDoc)));\r
-       return (CReaderVCDoc*)m_pDocument;\r
-}\r
-#endif //_DEBUG\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// CReaderVCView message handlers\r
-\r
-BOOL CReaderVCView::LoadPDFPage(FPDF_DOCUMENT doc, int nIndex, CPoint pos)\r
-{\r
-       if(NULL == doc) return FALSE;\r
-       if(nIndex < 0) nIndex = 0;\r
-       if(nIndex > m_nTotalPage) nIndex = m_nTotalPage;\r
-\r
-       FORM_DoPageAAction(m_pPage, m_pApp, FPDFPAGE_AACTION_CLOSE);\r
-\r
-       m_pPage = NULL;\r
-       m_pageMap.Lookup(nIndex, m_pPage);\r
-       if(!m_pPage)\r
-       {\r
-               m_pPage = FPDF_LoadPage(doc, nIndex);\r
-               FORM_OnAfterLoadPage(m_pPage, m_pApp);\r
-               m_pageMap.SetAt(nIndex, m_pPage);       \r
-       }\r
-       if(NULL == m_pPage) return FALSE;\r
-\r
-       FORM_DoPageAAction(m_pPage, m_pApp, FPDFPAGE_AACTION_OPEN);\r
-\r
-       m_nPageIndex = nIndex;\r
-    SetPageMetrics(m_pPage);\r
-\r
-       if (m_pTextPage != NULL)\r
-       {\r
-               FPDFText_ClosePage(m_pTextPage);\r
-               m_pTextPage = NULL;     \r
-       }\r
-       m_pTextPage = FPDFText_LoadPage(m_pPage);\r
-\r
-\r
-       CChildFrame *pParent = (CChildFrame *)this->GetParentFrame();\r
-       if (pParent != NULL)\r
-       {\r
-               pParent->SetActiveView(this);\r
-               SyncScroll();   \r
-       }\r
-       \r
-       if(pos.x !=0 && pos.y != 0)\r
-       {\r
-               FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(m_nActualSizeX * m_dbScaleFactor),\r
-                       (int)(m_nActualSizeY * m_dbScaleFactor), m_nRotateFlag, pos.x, pos.y, &m_nStartX, &m_nStartY);                  \r
-               m_nStartX = -m_nStartX + 20;\r
-               m_nStartY = -m_nStartY + 20;\r
-               \r
-               int nSizeX = 0; \r
-               int nSizeY = 0;\r
-               if (1 == m_nRotateFlag || 3 == m_nRotateFlag)\r
-               {\r
-                       nSizeX = m_nActualSizeY;\r
-                       nSizeY = m_nActualSizeX;\r
-               }\r
-               else\r
-               {\r
-                       nSizeX = m_nActualSizeX;\r
-                       nSizeY = m_nActualSizeY;\r
-               }\r
-               SCROLLINFO scrinfo;\r
-               GetScrollInfo(SB_VERT, &scrinfo);                                         \r
-               scrinfo.nMin = 0;                                                         \r
-               scrinfo.nMax =(int) (nSizeY * m_dbScaleFactor + abs(m_nStartY));                                             \r
-               SetScrollInfo(SB_VERT, &scrinfo);  \r
-               SetScrollPos(SB_VERT, abs(m_nStartY), TRUE);\r
-\r
-               GetScrollInfo(SB_HORZ, &scrinfo);                                         \r
-               scrinfo.nMin = 0;                                                         \r
-               scrinfo.nMax = (int)(nSizeX * m_dbScaleFactor + abs(m_nStartX));                                             \r
-               SetScrollInfo(SB_HORZ, &scrinfo);  \r
-               SetScrollPos(SB_HORZ, abs(m_nStartX), TRUE);\r
-       }\r
-       this->Invalidate(TRUE);\r
-//     FPDFApp_SetPage(m_App, m_pPage);\r
-       return TRUE;\r
-\r
-}\r
-\r
-\r
-void CReaderVCView::InvalidateImpl(FPDF_PAGE page, double left, double top, double right, double bottom)\r
-{\r
-       int device_left, device_top, device_right, device_bottom;\r
-\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-\r
-       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, left, top, &device_left, &device_top);\r
-\r
-       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, right, bottom, &device_right, &device_bottom);\r
-\r
-       CRect rc(device_left,device_top, device_right, device_bottom);\r
-//     TRACE("left = %d\r\n", device_left);\r
-//             TRACE("top = %d\r\n", device_top);\r
-//                     TRACE("right = %d\r\n", device_right);\r
-//                             TRACE("bottom = %d\r\n", device_bottom);\r
-       if(device_right-device_left>5)\r
-       TRACE("left=%d,top=%d,right=%d,bottom=%d\r\n",device_left,device_top,device_right,device_bottom);\r
-       ::InvalidateRect(m_hWnd, rc, FALSE);\r
-}\r
-\r
-void CReaderVCView::SetCaretImpl(FPDF_PAGE page,double page_x, double page_y, int nWidth, int nHeight)\r
-{\r
-\r
-}\r
-\r
-void CReaderVCView::ReleaseImpl()\r
-{\r
-\r
-}\r
-CMap<int, int,TimerCallback, TimerCallback> CReaderVCView::m_mapTimerFuns;\r
-int CReaderVCView::SetTimerImpl(int uElapse, TimerCallback lpTimerFunc)\r
-{\r
-       int nTimeID =  ::SetTimer(NULL, 0, uElapse, TimerProc); \r
-       m_mapTimerFuns.SetAt(nTimeID, lpTimerFunc);\r
-       return nTimeID;\r
-}\r
-\r
-void CReaderVCView::KillTimerImpl(int nID)\r
-{\r
-       ::KillTimer(NULL, nID);\r
-       m_mapTimerFuns.RemoveKey(nID);\r
-}\r
-\r
-void CReaderVCView::SetCurorImpl(int nCursorType)\r
-{\r
-       HCURSOR hcur = LoadCursor(NULL, IDC_UPARROW);\r
-       switch(nCursorType)\r
-       {\r
-               case    FXCT_ARROW:\r
-               case    FXCT_NESW:              \r
-               case    FXCT_NWSE:              \r
-               case    FXCT_VBEAM:             \r
-               case    FXCT_HBEAM:             \r
-               case    FXCT_HAND:\r
-               //      ::SetCursor(hcur);\r
-               break;\r
-       }\r
-}\r
-\r
-void CReaderVCView::PageToDeviceImpl(FPDF_PAGE page,double page_x,double page_y, int* device_x, int* device_y)\r
-{\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-                               (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, page_x, page_y,device_x, device_y);\r
-}\r
-\r
-void CReaderVCView::DeviceToPageImpl(FPDF_PAGE page,int device_x, int device_y, double* page_x, double* page_y)\r
-{\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-       FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, device_x, device_y, page_x, page_y);\r
-\r
-}\r
-\r
-void CReaderVCView::SetPageMetrics(FPDF_PAGE pPage)\r
-{\r
-       m_nStartX = 10;\r
-       m_nStartY = 10;\r
-       if(NULL==pPage) return;\r
-       //get pdf page width an height;\r
-       m_dbPageWidth = FPDF_GetPageWidth(pPage);\r
-       m_dbPageHeight = FPDF_GetPageHeight(pPage);\r
-\r
-       CDC *pDC = GetDC();\r
-       int ix, iy;\r
-       ix = pDC->GetDeviceCaps(LOGPIXELSX);\r
-       iy = pDC->GetDeviceCaps(LOGPIXELSY);\r
-       m_nActualSizeX = (int)(m_dbPageWidth / 72 * ix + 0.5f);//convert pdf coordinates to device\r
-       m_nActualSizeY = (int)(m_dbPageHeight / 72 * iy + 0.5f);//convert pdf coordinates to device\r
-       ReleaseDC(pDC);\r
-\r
-}\r
-\r
-void CReaderVCView::SetScalFactor(double dbScal)\r
-{\r
-       if(dbScal > 64 ) m_dbScaleFactor = 64;\r
-       if( dbScal < 0) m_dbScaleFactor = 0.08f;\r
-       m_dbScaleFactor = dbScal;\r
-}\r
-void CReaderVCView::DrawPage(int nRotate, CDC *pDC)\r
-{\r
-       int nSizeX = m_nActualSizeX;\r
-       int nSizeY = m_nActualSizeY;\r
-\r
-       if (1 == nRotate || 3 == nRotate)\r
-       {\r
-               int temp = nSizeX;\r
-               nSizeX = nSizeY;\r
-               nSizeY = temp;\r
-       }\r
-       \r
-       int nShowSizeX = (int)(nSizeX * m_dbScaleFactor + m_nStartX);\r
-       int nShowSizeY = (int)(nSizeY * m_dbScaleFactor + m_nStartY);\r
-       \r
-\r
-       CRect rc; \r
-       pDC->GetClipBox(&rc);\r
-               FPDF_BITMAP bmptemp = FPDFBitmap_Create(rc.Width(), rc.Height(), 0);\r
-               int nClientWidth = FPDFBitmap_GetWidth(bmptemp);\r
-               int nClientHeight = FPDFBitmap_GetHeight(bmptemp);\r
-               \r
-               \r
-               FPDFBitmap_FillRect(bmptemp, 0, 0, nClientWidth, nClientHeight, 255,255,255, 0);\r
-               FPDF_RenderPageBitmap(bmptemp, m_pPage, m_nStartX-rc.left, m_nStartY-rc.top, (int)(nSizeX * m_dbScaleFactor), (int)(nSizeY * m_dbScaleFactor), nRotate, \r
-                       FPDF_LCD_TEXT | FPDF_NO_NATIVETEXT);\r
-               FPDF_FFLDraw(m_pApp, bmptemp, m_pPage, m_nStartX-rc.left, m_nStartY-rc.top, (int)(nSizeX * m_dbScaleFactor), (int)(nSizeY * m_dbScaleFactor), nRotate, \r
-                       FPDF_ANNOT | FPDF_LCD_TEXT | FPDF_NO_NATIVETEXT);\r
-               \r
-               //      m_pPage2 = FPDF_LoadPage(m_pDoc, 2);\r
-               //      FPDF_RenderPageBitmap(m_bmp, m_pPage2, m_nStartX+500, m_nStartY, (int)(nSizeX * m_dbScaleFactor), (int)(nSizeY * m_dbScaleFactor), nRotate, \r
-               //              FPDF_LCD_TEXT | FPDF_NO_NATIVETEXT);\r
-               //      FPDF_FFLDraw(m_pApp, m_bmp, m_pPage2, m_nStartX+500, m_nStartY, (int)(nSizeX * m_dbScaleFactor), (int)(nSizeY * m_dbScaleFactor), nRotate, \r
-               //              FPDF_ANNOT | FPDF_LCD_TEXT | FPDF_NO_NATIVETEXT);\r
-               \r
-               int t = FPDFBitmap_GetStride(bmptemp);\r
-               int bufsize=FPDFBitmap_GetStride(bmptemp)*nClientHeight;\r
-               void* bmpbuf=FPDFBitmap_GetBuffer(bmptemp);\r
-               CDC MemDC;\r
-               \r
-               CBitmap winbmp;\r
-               MemDC.CreateCompatibleDC(pDC);\r
-               if((HBITMAP)winbmp != NULL)\r
-                       winbmp.DeleteObject();\r
-               if(HBITMAP(winbmp) == NULL)\r
-               {\r
-                       winbmp.CreateCompatibleBitmap(pDC,nClientWidth,nClientHeight);\r
-                       winbmp.SetBitmapBits(bufsize,bmpbuf);\r
-               }\r
-               \r
-               MemDC.SelectObject(&winbmp); \r
-               \r
-               pDC->BitBlt(rc.left , rc.top , nClientWidth, nClientHeight, &MemDC,0,0,SRCCOPY);\r
-               MemDC.DeleteDC();    \r
-               \r
-               FPDFBitmap_Destroy(bmptemp);\r
-       \r
-       \r
-       int size = m_SelectArray.GetSize();\r
-       for(int i=0; i<size; i++)\r
-       {\r
-               \r
-               \r
-               CRect rc = m_SelectArray.GetAt(i);\r
-               \r
-               CDC memdc;\r
-               CBitmap bmp,*pOldBitmap; \r
-               memdc.CreateCompatibleDC(pDC); \r
-               \r
-               bmp.CreateCompatibleBitmap(pDC,rc.Width(),rc.Height());\r
-               \r
-               pOldBitmap = memdc.SelectObject(&bmp);\r
-               \r
-               memdc.FillSolidRect(0,0,rc.Width(),rc.Height(),RGB(0,100,160));\r
-               \r
-               BLENDFUNCTION bf; \r
-               \r
-               bf.BlendOp = AC_SRC_OVER; \r
-               \r
-               bf.BlendFlags = 0; \r
-               \r
-               bf.SourceConstantAlpha = 0x4f; \r
-               \r
-               bf.AlphaFormat = 0;\r
-               \r
-\r
-               \r
-               BOOL ret=AlphaBlend(pDC->GetSafeHdc(),rc.left,rc.top,rc.Width(),rc.Height(),memdc.GetSafeHdc(),0,0,rc.Width(),rc.Height(),bf);\r
-               \r
-               memdc.SelectObject(pOldBitmap);\r
-               memdc.DeleteDC();\r
-               bmp.DeleteObject();\r
-               \r
-       }\r
-       m_SelectArray.RemoveAll();\r
-\r
-\r
-\r
-\r
-}\r
-\r
-void CReaderVCView::GetNewPageSize(int &nsizeX, int &nsizeY)\r
-{\r
-       int nSizeX = m_nActualSizeX;\r
-       int nSizeY = m_nActualSizeY;\r
-       if (1 == m_nRotateFlag || 3 == m_nRotateFlag)\r
-       {\r
-               int temp = nSizeX;\r
-               nSizeX = nSizeY;\r
-               nSizeY = temp;\r
-       }\r
-        nsizeX = (int)(nSizeX*m_dbScaleFactor);\r
-        nsizeY = (int)(nSizeY*m_dbScaleFactor);\r
-}\r
-\r
-void CReaderVCView::OnDocFirstpage() \r
-{\r
-\r
-       if(m_nPageIndex == 0) return;\r
-       this->m_nPageIndex = 0;\r
-       this->LoadPDFPage(m_pDoc, 0);\r
-       DeleteAllRect();\r
-}\r
-\r
-void CReaderVCView::OnDocGotopage() \r
-{\r
-       CGotoPageDlg dlg;\r
-       dlg.DoModal();  \r
-}\r
-\r
-void CReaderVCView::OnDocLastpage() \r
-{\r
-//     FPDF_DOCUMENT doc = FPDF_LoadDocument("d:\\a1.pdf", "");\r
-//     FPDF_PAGE page = FPDF_LoadPage(doc, 0);\r
-//     FPDF_IMAGEOBJECT imgObject = FPDFPageObj_NewImgeObj(doc);\r
-//      long ret = FPDFImageObj_LoadFromFileEx(&page, 1 ,\r
-//                                                              imgObject, "E:\\temp\\temp\\k.gif",TRUE\r
-//                                                              );\r
-//      FPDFImageObj_SetMatrix(imgObject, 240, 0, 0, 160, 1*50, 0 );\r
-//      FPDFPage_InsertObject(page, imgObject);\r
-//      FPDFPage_GenerateContent(page);\r
-//      FPDF_SaveAsFile(doc, "D:\\out.pdf", 0, NULL, 0, NULL, 0);\r
-//      FPDF_ClosePage(page);\r
-//      FPDF_CloseDocument(doc);\r
-//     return;\r
-\r
-\r
-       if(m_nPageIndex == m_nTotalPage -1) return;\r
-       this->m_nPageIndex = m_nTotalPage -1;\r
-       LoadPDFPage(m_pDoc, m_nPageIndex);\r
-       DeleteAllRect();\r
-}\r
-\r
-void CReaderVCView::OnDocNextpage() \r
-{\r
-       m_nPageIndex ++ ;\r
-       m_nPageIndex %= m_nTotalPage;\r
-       LoadPDFPage(m_pDoc, m_nPageIndex);\r
-       DeleteAllRect();\r
-}\r
-\r
-void CReaderVCView::OnDocPrepage() \r
-{\r
-       m_nPageIndex --;\r
-       if(m_nPageIndex < 0) m_nPageIndex = m_nTotalPage-1;\r
-       LoadPDFPage(m_pDoc, m_nPageIndex);\r
-       DeleteAllRect();\r
-}\r
-\r
-void CReaderVCView::OnClockwise() \r
-{\r
-       m_nRotateFlag ++;\r
-       m_nRotateFlag %= 4;\r
-       LoadPDFPage(m_pDoc, m_nPageIndex);\r
-}\r
-\r
-void CReaderVCView::OnCounterclockwise() \r
-{\r
-       m_nRotateFlag --;\r
-       if (m_nRotateFlag < 0) m_nRotateFlag = 3;\r
-       LoadPDFPage(m_pDoc, m_nPageIndex);\r
-}\r
-\r
-BOOL CReaderVCView::SetPDFDocument(FPDF_DOCUMENT pDoc, int nPageNum)\r
-{\r
-       if(pDoc == NULL) return FALSE;\r
-\r
-       m_pApp = FPDFDOC_InitFormFillEnviroument(pDoc,this);\r
-       FPDF_LoadXFA(pDoc);\r
-\r
-       FORM_DoDocumentJSAction(m_pApp);\r
-       FORM_DoDocumentOpenAction(m_pApp);\r
-//     FORM_OnAfterLoadDocument(m_pApp);\r
-       FPDF_SetFormFieldHighlightColor(m_pApp, 0, RGB(0,255, 0));\r
-       FPDF_SetFormFieldHighlightAlpha(m_pApp, 128);\r
-\r
-       \r
-       m_pDoc = pDoc;\r
-       m_nTotalPage = nPageNum;\r
-       if(!LoadPDFPage(m_pDoc, 0)) return FALSE;\r
-\r
-       return TRUE;\r
-}\r
-\r
-void CReaderVCView::GotoPage(int index)\r
-{\r
-       if(index < 0 || index >= m_nTotalPage){MessageBoxA("Invalidate index");}\r
-       if(index == m_nPageIndex) return;\r
-       if(!LoadPDFPage(m_pDoc, index)) return;\r
-       DeleteAllRect();\r
-}\r
-\r
-void CReaderVCView::OnViewActualSize() \r
-{\r
-       m_nStartX = m_nStartY = 10;\r
-       ScalPage(1.0f);\r
-}\r
-\r
-void CReaderVCView::OnViewFitPage() \r
-{\r
-       m_nStartX = m_nStartY = 10;\r
-       CRect rect;\r
-       GetClientRect(rect);\r
-       double dbHeight = rect.Height();        \r
-       double dbScal = dbHeight / m_nActualSizeY;\r
-       ScalPage(dbScal);\r
-}\r
-\r
-void CReaderVCView::OnViewFitWidth() \r
-{\r
-       m_nStartX = m_nStartY = 10;\r
-       CRect rect;\r
-       GetClientRect(rect);\r
-       double dbWidth= rect.Width();\r
-       double dbScal = dbWidth / m_nActualSizeX;\r
-       ScalPage(dbScal);\r
-}\r
-\r
-void CReaderVCView::OnViewZoomIn() \r
-{\r
-       double dbScal = m_dbScaleFactor;\r
-       dbScal += 0.25f;\r
-       if(dbScal > 6400.0f) return;\r
-       ScalPage(dbScal);\r
-       \r
-}\r
-\r
-void CReaderVCView::OnViewZoomOut() \r
-{\r
-       double dbScal = m_dbScaleFactor;\r
-       dbScal -= 0.25f;\r
-       if(dbScal < 0.25f) return;\r
-       ScalPage(dbScal);\r
-}\r
-\r
-void CReaderVCView::OnViewZoomTo() \r
-{\r
-       CZoomDlg dlg;\r
-       dlg.DoModal();\r
-}\r
-\r
-void CReaderVCView::ScalPage(double dbScal)\r
-{\r
-       SetScalFactor(dbScal);\r
-       CChildFrame *pParent = (CChildFrame *)this->GetParentFrame();\r
-       if (pParent != NULL)\r
-       {\r
-               pParent->SetActiveView(this);\r
-               SyncScroll();   \r
-       }\r
-       Invalidate(TRUE);\r
-}\r
-\r
-void CReaderVCView::OnEditFind() \r
-{\r
-       if(m_pTextPage == NULL)\r
-       {\r
-               AfxMessageBox("Sorry, the fpdftext.dll may has expired. For keeping on using the dll, please contact sales@foxitsoftware.com.");\r
-               return;\r
-       }\r
-       CFindDlg dlg;\r
-       dlg.DoModal();  \r
-}\r
-\r
-void CReaderVCView::FindText(CString strFind, BOOL bCase, BOOL bWholeword, int Direction)\r
-{\r
-       CString str;\r
-       str = m_FindInfo.m_strFind;\r
-       int nFlag = 0;\r
-       if(bCase) { nFlag |= FPDF_MATCHCASE; }\r
-       if(bWholeword) { nFlag |= FPDF_MATCHWHOLEWORD; }\r
-\r
-       if(NULL == m_pTextPage) return;\r
-\r
-       if (strFind.Compare(str) != 0 || nFlag != m_FindInfo.m_nFlag)//new search\r
-       {\r
-               if (NULL == m_pTextPage) return;\r
-               if (NULL != m_pSCHHandle)\r
-               {\r
-                       FPDFText_FindClose(m_pSCHHandle);\r
-                       m_pSCHHandle  = NULL;\r
-               }\r
-\r
-               int len = MultiByteToWideChar(CP_ACP, 0, strFind.GetBuffer(0), -1, NULL, NULL);\r
-               wchar_t *pBuf = new wchar_t[len];\r
-               memset(pBuf, 0, len*sizeof(wchar_t));\r
-               MultiByteToWideChar(CP_ACP, 0, strFind.GetBuffer(0), strFind.GetLength(), pBuf, len);\r
-               pBuf[len-1] = L'\0';\r
-               m_pSCHHandle = FPDFText_FindStart(m_pTextPage, (FPDF_WIDESTRING)pBuf, nFlag, 0);\r
-               if(NULL == m_pSCHHandle) return;\r
-               \r
-        if (m_FindInfo.m_pCurFindBuf != NULL)\r
-               {\r
-                       delete []m_FindInfo.m_pCurFindBuf;\r
-                       m_FindInfo.m_pCurFindBuf = NULL;\r
-               }\r
-               m_FindInfo.m_pCurFindBuf = new wchar_t[len];\r
-               memset(m_FindInfo.m_pCurFindBuf, 0, len*sizeof(wchar_t));\r
-               memcpy(m_FindInfo.m_pCurFindBuf, pBuf, len*sizeof(wchar_t));\r
-\r
-               delete []pBuf;\r
-               \r
-\r
-               //save the find info\r
-               m_FindInfo.m_strFind = strFind;\r
-               m_FindInfo.m_nFlag = nFlag;\r
-               m_FindInfo.m_nDirection = Direction;\r
-               m_FindInfo.m_nStartPageIndex = m_nPageIndex;\r
-               m_FindInfo.m_bFirst = TRUE;\r
-               \r
-               \r
-       }\r
-       FindNext(Direction);\r
-}\r
-\r
-void CReaderVCView::FindNext(int nDirection)\r
-{\r
-       if(NULL == m_pSCHHandle) return;\r
-       BOOL bResult = FALSE;\r
-       \r
-       if (nDirection != m_FindInfo.m_nDirection)\r
-       {\r
-               m_FindInfo.m_nDirection = nDirection;\r
-               m_FindInfo.m_bFirst = TRUE;\r
-       }\r
-\r
-       if (0 == nDirection)// find down\r
-       {\r
-               bResult = FPDFText_FindNext(m_pSCHHandle);\r
-       }\r
-       if (1 == nDirection)\r
-       {\r
-               bResult = FPDFText_FindPrev(m_pSCHHandle);\r
-       }\r
-       \r
-       while(!bResult){\r
-\r
-                       if (m_rtFind != NULL)\r
-                       {\r
-                               delete [] m_rtFind;\r
-                               m_rtFind = NULL;\r
-                       }\r
-\r
-                       if (0 == nDirection)\r
-                       {\r
-                               m_nPageIndex ++;\r
-                               m_nPageIndex %= m_nTotalPage;\r
-                               if(!LoadPDFPage(m_pDoc, m_nPageIndex)) return;\r
-                               if (NULL == m_pTextPage) return;\r
-                               if (NULL != m_pSCHHandle)\r
-                               {\r
-                                       FPDFText_FindClose(m_pSCHHandle);\r
-                                       m_pSCHHandle  = NULL;\r
-                               }\r
-                               m_pSCHHandle = FPDFText_FindStart(m_pTextPage, (FPDF_WIDESTRING)m_FindInfo.m_pCurFindBuf, m_FindInfo.m_nFlag, 0);\r
-                               if(NULL == m_pSCHHandle) break;\r
-                               bResult = FPDFText_FindNext(m_pSCHHandle);\r
-                               if(!bResult && m_nPageIndex == m_FindInfo.m_nStartPageIndex) break;\r
-                       } \r
-                       else\r
-                       {\r
-                               m_nPageIndex --;\r
-                               if (m_nPageIndex < 0) {m_nPageIndex = m_nTotalPage - 1;}\r
-                               if(!LoadPDFPage(m_pDoc, m_nPageIndex)) return;\r
-                               if (NULL == m_pTextPage) return;\r
-                               if (NULL != m_pSCHHandle)\r
-                               {\r
-                                       FPDFText_FindClose(m_pSCHHandle);\r
-                                       m_pSCHHandle  = NULL;\r
-                               }\r
-                               m_pSCHHandle = FPDFText_FindStart(m_pTextPage, (FPDF_WIDESTRING)m_FindInfo.m_pCurFindBuf, m_FindInfo.m_nFlag, 0);\r
-                               if(NULL == m_pSCHHandle) break;\r
-                               bResult = FPDFText_FindPrev(m_pSCHHandle);\r
-                               if(!bResult && m_nPageIndex == m_FindInfo.m_nStartPageIndex) break;\r
-                       }\r
-       }//end while\r
-       \r
-       if(!bResult)//find over\r
-       {\r
-               FPDFText_FindClose(m_pSCHHandle);\r
-               m_pSCHHandle = NULL;\r
-\r
-               if (m_rtFind != NULL)\r
-               {\r
-                       delete [] m_rtFind;\r
-                       m_rtFind = NULL;\r
-               }\r
-               \r
-               m_FindInfo.m_bFirst = TRUE;\r
-               m_FindInfo.m_nDirection = -1;\r
-               m_FindInfo.m_nFlag = -1;\r
-               m_FindInfo.m_nStartCharIndex = -1;\r
-               m_FindInfo.m_nStartPageIndex = -1;\r
-               m_FindInfo.m_pCurFindBuf = NULL;\r
-               m_FindInfo.m_strFind = _T("");\r
-\r
-               MessageBox("Find complete!", "Find Infomation", MB_OK | MB_ICONINFORMATION);\r
-               return;\r
-       }\r
-       \r
-       \r
-       \r
-       int index = FPDFText_GetSchResultIndex(m_pSCHHandle);\r
-       if (m_nPageIndex == m_FindInfo.m_nStartPageIndex && index == m_FindInfo.m_nStartCharIndex && !m_FindInfo.m_bFirst )\r
-       {\r
-               if (NULL != m_pSCHHandle)\r
-               {\r
-                       FPDFText_FindClose(m_pSCHHandle);\r
-                       m_pSCHHandle  = NULL;\r
-               }\r
-               MessageBox("Find complete!", "Find Infomation", MB_OK | MB_ICONINFORMATION);\r
-               return;\r
-       }else{\r
-               CDC *pDC = GetDC();\r
-               DrawAllRect(pDC);//update\r
-\r
-               int nCount = FPDFText_GetSchCount(m_pSCHHandle);\r
-               int nRects = FPDFText_CountRects(m_pTextPage, index, nCount);\r
-               if (m_rtFind != NULL)\r
-               {\r
-                       delete [] m_rtFind;\r
-                       m_rtFind = NULL;\r
-               }\r
-               m_rtFind = new PDFRect[nRects];\r
-               m_nRectNum = nRects;\r
-               for (int i=0; i<nRects; i++)\r
-               {       \r
-                       double left, top, right, bottom;        \r
-                       FPDFText_GetRect(m_pTextPage, i, &left, &top, &right, &bottom);\r
-                       m_rtFind[i].m_dbLeft = left;\r
-                       m_rtFind[i].m_dbTop = top;\r
-                       m_rtFind[i].m_dbRight = right;\r
-                       m_rtFind[i].m_dbBottom = bottom;\r
-               }\r
-               DrawAllRect(pDC);//draw new rect\r
-               ReleaseDC(pDC);\r
-       }\r
-\r
-       if (m_FindInfo.m_bFirst)\r
-       {//find first string, store info;\r
-               m_FindInfo.m_bFirst = FALSE;\r
-               m_FindInfo.m_nStartCharIndex = index;\r
-               m_FindInfo.m_nStartPageIndex = m_nPageIndex; \r
-       }\r
-       \r
-}\r
-\r
-void CReaderVCView::DrawReverse(CDC *pDC, CRect rect)\r
-{\r
-       CRect rt = rect;\r
-       rect.left = __min(rt.left, rt.right);\r
-       rect.right = __max(rt.left, rt.right);\r
-       rect.top = __min(rt.top, rt.bottom);\r
-       rect.bottom = __max(rt.top, rt.bottom);\r
-\r
-       ASSERT(pDC);\r
-       int bmp_width=abs(rect.Width());\r
-       int bmp_height=abs(rect.Height());      \r
-       HBITMAP hbmp = CreateCompatibleBitmap(pDC->m_hDC, bmp_width, bmp_height);\r
-       CDC MemDC;\r
-       MemDC.CreateCompatibleDC(pDC);\r
-       HBITMAP holdbmp  = (HBITMAP)MemDC.SelectObject(hbmp);\r
-       // copy screen DC to memory DC\r
-       BitBlt(MemDC, 0, 0, bmp_width, bmp_height,      pDC->m_hDC, rect.left,rect.top, SRCCOPY);\r
-       MemDC.SelectObject(holdbmp);\r
-       \r
-       BITMAPINFO bmi;\r
-       memset(&bmi, 0, sizeof bmi);\r
-       bmi.bmiHeader.biSize = sizeof bmi.bmiHeader;\r
-       bmi.bmiHeader.biBitCount = 24;\r
-       bmi.bmiHeader.biClrImportant = 0;\r
-       bmi.bmiHeader.biClrUsed = 0;\r
-       bmi.bmiHeader.biCompression = BI_RGB;\r
-       bmi.bmiHeader.biHeight = bmp_height;\r
-       bmi.bmiHeader.biPlanes = 1;\r
-       bmi.bmiHeader.biSizeImage = 0;\r
-       bmi.bmiHeader.biWidth = bmp_width;\r
-       bmi.bmiHeader.biXPelsPerMeter = 0;\r
-       bmi.bmiHeader.biYPelsPerMeter = 0;\r
-       \r
-       // get bitmap stream\r
-       int ret = GetDIBits(MemDC, hbmp, 0,bmp_height, NULL, &bmi, DIB_RGB_COLORS);\r
-       \r
-       int size = bmi.bmiHeader.biSizeImage;\r
-       \r
-       BYTE* pBits = new BYTE[size];\r
-       memset(pBits, 0, size);\r
-       ret = GetDIBits(MemDC, hbmp, 0,bmp_height, pBits, &bmi, DIB_RGB_COLORS);\r
-       ret = GetLastError();\r
-       DeleteObject(hbmp);\r
-       MemDC.DeleteDC();\r
-       for (int row = 0; row < bmp_height; row ++) {\r
-               int pitch = (bmp_width * 3 + 3) / 4 * 4;\r
-               int rowpos = row * pitch;\r
-               for(int col = 0; col < bmp_width; col ++){\r
-                       int i = rowpos + col * 3;       \r
-                       pBits[i]                = 255-pBits[i] ;                \r
-                       pBits[i + 1]    = 255-pBits[i + 1];\r
-                       pBits[i + 2]    = 255-pBits[i + 2];     \r
-               }\r
-       }\r
-       ret = SetDIBitsToDevice(pDC->m_hDC,rect.left,rect.top,bmp_width, bmp_height,0, 0, 0, bmp_height, pBits, &bmi, DIB_RGB_COLORS);\r
-       delete []pBits; \r
-\r
-}\r
-\r
-void CReaderVCView::DrawAllRect(CDC *pDC)\r
-{\r
-       int i;\r
-       int left, top, right, bottom;\r
-\r
-       int nSizeX = 0; \r
-       int nSizeY = 0;\r
-//     int temp = 0;   \r
-       if (1 == m_nRotateFlag || 3 == m_nRotateFlag)\r
-       {\r
-               nSizeX = m_nActualSizeY;\r
-               nSizeY = m_nActualSizeX;\r
-       }\r
-       else\r
-       {\r
-               nSizeX = m_nActualSizeX;\r
-               nSizeY = m_nActualSizeY;\r
-       }\r
-       ASSERT(pDC);\r
-       if (m_rtFind != NULL)\r
-       {\r
-               for (i=0; i<m_nRectNum; i++)\r
-               {\r
-                       \r
-                       PDFRect rect = m_rtFind[i];\r
-                       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nSizeX * m_dbScaleFactor),\r
-                               (int)(nSizeY * m_dbScaleFactor), m_nRotateFlag, rect.m_dbLeft, rect.m_dbTop, &left, &top);\r
-                       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nSizeX * m_dbScaleFactor),\r
-                               (int)(nSizeY * m_dbScaleFactor), m_nRotateFlag, rect.m_dbRight, rect.m_dbBottom, &right, &bottom);\r
-                       CRect rt(left, top, right, bottom);\r
-                       DrawReverse(pDC, rt);\r
-\r
-               }\r
-       }\r
-\r
-       if (m_rtArray.GetSize() != 0)\r
-       {\r
-               for (i=0; i<m_rtArray.GetSize(); i++)\r
-               {\r
-                       PDFRect rect = m_rtArray.GetAt(i);\r
-                       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nSizeX * m_dbScaleFactor),\r
-                               (int)(nSizeY * m_dbScaleFactor), m_nRotateFlag, rect.m_dbLeft, rect.m_dbTop, &left, &top);\r
-                       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nSizeX * m_dbScaleFactor),\r
-                               (int)(nSizeY * m_dbScaleFactor), m_nRotateFlag, rect.m_dbRight, rect.m_dbBottom, &right, &bottom);\r
-                       CRect rt(left, top, right, bottom);\r
-                       DrawReverse(pDC, rt);\r
-               }\r
-       }\r
-}\r
-\r
-void CReaderVCView::DeleteAllRect()\r
-{\r
-       CDC *pDC = GetDC();\r
-       DrawAllRect(pDC);\r
-       ReleaseDC(pDC);\r
-\r
-       if (m_rtFind != NULL)\r
-       {\r
-               delete []m_rtFind;\r
-               m_rtFind = NULL;\r
-       }\r
-       \r
-       if (m_rtArray.GetSize() != 0)\r
-       {\r
-               m_rtArray.RemoveAll();\r
-       }\r
-}\r
-\r
-void CReaderVCView::OnFilePrint() \r
-{\r
-       CString strDoc = GetDocument()->GetTitle(); \r
-       CPrintDialog dlg(FALSE, PD_PAGENUMS | PD_USEDEVMODECOPIES);\r
-       dlg.m_pd.nMinPage = dlg.m_pd.nFromPage =1;\r
-       dlg.m_pd.nMaxPage = dlg.m_pd.nToPage = m_nTotalPage;\r
-       if (dlg.DoModal() == IDOK)\r
-       {\r
-               int from_page, to_page;\r
-               if (dlg.PrintAll())              \r
-               {\r
-                       from_page = dlg.m_pd.nMinPage;\r
-                       to_page = dlg.m_pd.nMaxPage;\r
-               }\r
-               else if (dlg.PrintRange())       \r
-               {                                \r
-                       from_page = dlg.GetFromPage();\r
-                       to_page = dlg.GetToPage();\r
-               }\r
-               else if (dlg.PrintSelection())   \r
-               {\r
-                       from_page = to_page = m_nPageIndex + 1;     \r
-               }\r
-               \r
-               HDC printDC;\r
-               DOCINFO docInfo;\r
-\r
-               printDC = dlg.CreatePrinterDC();\r
-               if(NULL == printDC) return;\r
-               docInfo.cbSize = sizeof(DOCINFO);\r
-               docInfo.fwType = 0;\r
-               docInfo.lpszDatatype = NULL;\r
-               docInfo.lpszOutput = NULL;\r
-               docInfo.lpszDocName = strDoc;\r
-\r
-       if(StartDoc(printDC, &docInfo) <= 0) return;\r
-               //FPDF_DOCUMENT pDoc = NULL;\r
-               FPDF_PAGE pPage = NULL;\r
-               CString str;\r
-               for (int i=from_page-1; i<to_page; i++)\r
-               {\r
-                       if(pPage != NULL)\r
-                       {\r
-                               FPDF_ClosePage(pPage);\r
-                               pPage = NULL;\r
-                       }\r
-                       pPage = FPDF_LoadPage(m_pDoc, i);\r
-                       double npagewidth = FPDF_GetPageWidth(m_pPage);\r
-                       double npageheight = FPDF_GetPageHeight(m_pPage);\r
-                       \r
-                       int logpixelsx,logpixelsy;\r
-                       //calculate the page size\r
-                       logpixelsx = GetDeviceCaps(printDC,LOGPIXELSX);\r
-                       logpixelsy = GetDeviceCaps(printDC,LOGPIXELSY);\r
-                       int nsizeX = (int)(npagewidth / 72 *logpixelsx + 0.5f);\r
-                       int nsizeY = (int)(npageheight / 72 *logpixelsy + 0.5f);\r
-                       \r
-                       if(StartPage(printDC) <= 0)\r
-                       {       \r
-                               str.Format("one error occured when start the page %d", i);\r
-                               MessageBox(str);\r
-                               return;\r
-                       }\r
-\r
-                       //render to print device\r
-                       FPDF_RenderPage(printDC, pPage, m_nStartX, m_nStartY, nsizeX, nsizeY, m_nRotateFlag, 0);\r
-                       \r
-                       if(EndPage(printDC) <= 0)\r
-                       {\r
-                               str.Format("one error occured when close the page %d", i);\r
-                               MessageBox(str);\r
-                               return;\r
-                       }\r
-\r
-               }//end for\r
-               EndDoc(printDC);\r
-               if(!DeleteDC(printDC))// delete printDC\r
-                       MessageBox("can not delete the printer");\r
-       }       \r
-}\r
-\r
-void CReaderVCView::OnLButtonDown(UINT nFlags, CPoint point) \r
-{\r
-       // TODO: Add your message handler code here and/or call default\r
-\r
-       double page_x = 0;\r
-       double page_y = 0;\r
-       DeviceToPage(point, page_x, page_y);\r
-\r
-       if(m_pApp)\r
-       {\r
-               FPDF_BOOL b=  FORM_OnLButtonDown(m_pApp, m_pPage,ComposeFlag(),page_x, page_y);\r
-               if(b)\r
-                       return;\r
-       }\r
-       DeleteAllRect();\r
-       LoadMyCursor(1);\r
-       m_ptLBDown = point;\r
-\r
-\r
-       if (m_bSelect)\r
-       {\r
-               m_bHasChar = GetCharIndexByPoint(point, m_nStartIndex);\r
-               CreateCaret(point);\r
-       }\r
-       if (m_bHand)\r
-       {       \r
-               m_nPosH = GetScrollPos(SB_HORZ);//SetScrollPos(SB_VERT, point.y, TRUE);\r
-               m_nPosV = GetScrollPos(SB_VERT);\r
-       }\r
-       CView::OnLButtonDown(nFlags, point);\r
-}\r
-\r
-void CReaderVCView::OnLButtonUp(UINT nFlags, CPoint point) \r
-{\r
-\r
-       // TODO: Add your message handler code here and/or call default\r
-       double page_x = 0;\r
-       double page_y = 0;\r
-       DeviceToPage(point, page_x, page_y);\r
-\r
-       if(m_pApp)\r
-       {\r
-               if(FORM_OnLButtonUp(m_pApp, m_pPage,ComposeFlag(), page_x, page_y))\r
-                       return;\r
-       }\r
-       LoadMyCursor();\r
-       m_ptLBUp = point;\r
-       if (m_bSelect || m_bSnap)\r
-       {\r
-               CDC *pDC  = GetDC();\r
-               CPen *pOldPen;\r
-               CPen pen;\r
-               CBrush *pOldBr;\r
-               CRect rect;\r
-               pen.CreatePen(PS_DASH, 2, RGB(255,0,0));\r
-               pOldPen = pDC->SelectObject(&pen);\r
-               pOldBr = (CBrush*) (pDC->SelectStockObject(NULL_BRUSH));\r
-               int nOldRop = pDC->SetROP2(R2_XORPEN);\r
-               pDC->Rectangle(m_rtOld);\r
-               pDC->SetROP2(nOldRop);\r
-               m_rtOld.left = m_rtOld.top = m_rtOld.right = m_rtOld.bottom = 0;\r
-               ReleaseDC(pDC);\r
-       }\r
-       \r
-       if (m_bSnap)\r
-       {       \r
-               BOOL open = OpenClipboard();\r
-               if (open)\r
-               {\r
-                       ::EmptyClipboard();\r
-                       int bmpWidth = abs(point.x - m_ptLBDown.x);\r
-                       int bmpHeight = abs(point.y - m_ptLBDown.y);\r
-                       if (bmpHeight == 0 || bmpWidth == 0)return;\r
-                       CRect bmpRect(m_ptLBDown, point);\r
-                       CClientDC dc(this);\r
-                       CBitmap *pBitmap = new CBitmap();\r
-                       pBitmap->CreateCompatibleBitmap(&dc,bmpWidth,bmpHeight);\r
-                       CDC memDC;\r
-                       memDC.CreateCompatibleDC(&dc);\r
-                       memDC.SelectObject(pBitmap);\r
-                       CBrush whiteBrush(RGB(255,255,255));\r
-                       //memDC.FillRect(bmpRect,&whiteBrush);\r
-                       memDC.BitBlt(0, 0, bmpRect.Width(), bmpRect.Height(),&dc, bmpRect.left, bmpRect.top,SRCCOPY);\r
-                       HBITMAP hBitmap = (HBITMAP) *pBitmap;\r
-                       :: SetClipboardData(CF_BITMAP, hBitmap);\r
-                       ::CloseClipboard();\r
-                       MessageBox("The selected area has been copied to clipboard!");\r
-                       delete pBitmap;\r
-               }\r
-       }\r
-       \r
-       FPDF_LINK hlink=NULL;\r
-       double pdfx,pdfy;\r
-\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-\r
-       FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor),m_nRotateFlag,point.x,point.y,&pdfx,&pdfy);\r
-       hlink=FPDFLink_GetLinkAtPoint(m_pPage,pdfx,pdfy);\r
-       if (hlink)\r
-       {\r
-               FPDF_ACTION haction=NULL;\r
-               FPDF_DEST hLinkDest=NULL;\r
-               haction=FPDFLink_GetAction(hlink);\r
-               hLinkDest=FPDFLink_GetDest(m_pDoc,hlink);\r
-               if (haction)\r
-               {\r
-                       int nActionType=FPDFAction_GetType(haction);\r
-                       switch(nActionType)\r
-                       {\r
-                       case PDFACTION_UNSUPPORTED: // Unsupported action type\r
-                               break;\r
-                       case PDFACTION_GOTO:            // Go to a destination within current document  \r
-                               {\r
-                                       FPDF_LINK hActLinkDest =  FPDFAction_GetDest(m_pDoc,haction);\r
-                                       if (hActLinkDest)\r
-                                       {\r
-                                               int nPageIndex=FPDFDest_GetPageIndex(m_pDoc,hActLinkDest);\r
-                                               GotoPage(nPageIndex);\r
-                                       }\r
-                               }\r
-                               break;\r
-                       case PDFACTION_REMOTEGOTO:      // Go to a destination within another document\r
-                               \r
-                               //      FPDFAction_GetFilePath(...);\r
-                               //      .....   \r
-                               break;\r
-                       case PDFACTION_URI:             // Universal Resource Identifier, including web pages and \r
-                               // other Internet based resources\r
-                               //      int nsize= FPDFAction_GetURIPath(m_pDoc,haction);\r
-                               //      ...\r
-                               break;\r
-                       case PDFACTION_LAUNCH:                  // Launch an application or open a file\r
-                               //      FPDFAction_GetFilePath(...)\r
-                               break;\r
-                       default :\r
-                               break;\r
-                       }\r
-               }\r
-               else if (hLinkDest)\r
-               {\r
-                       int nPageIndex=FPDFDest_GetPageIndex(m_pDoc,hLinkDest);\r
-                       GotoPage(nPageIndex);\r
-               }\r
-       }\r
-       CView::OnLButtonUp(nFlags, point);\r
-}\r
-\r
-void CReaderVCView::OnMouseMove(UINT nFlags, CPoint point) \r
-{\r
-       // TODO: Add your message handler code here and/or call default\r
-       double page_x = 0;\r
-       double page_y = 0;\r
-       DeviceToPage(point, page_x, page_y);\r
-\r
-       if(m_pApp)\r
-       {\r
-               if(FORM_OnMouseMove(m_pApp, m_pPage,ComposeFlag(), page_x, page_y))\r
-                       return;\r
-       }\r
-       if (nFlags == MK_LBUTTON)\r
-       {\r
-               LoadMyCursor(1);\r
-       }else{LoadMyCursor();}\r
-       \r
-       CDC *pDC = GetDC();\r
-\r
-       if (m_bSelect && nFlags == MK_LBUTTON)\r
-       {\r
-               if (m_bHasChar)\r
-               {\r
-                       if (m_ptOld.x == 0 && m_ptOld.y == 0){m_ptOld = m_ptLBDown;}\r
-       \r
-                       int nIndex = 0;\r
-                       if (!GetCharIndexByPoint(point, nIndex)) return;\r
-                       if(nIndex == m_nEndIndex) return;\r
-                       \r
-                       DrawAllRect(pDC);//update all rect\r
-                       \r
-                       m_nEndIndex = nIndex;\r
-                       GetRects(m_nStartIndex, m_nEndIndex);   //get the rect and store into m_rtArray\r
-                       DrawAllRect(pDC);//draw new rect        \r
-               }\r
-               else \r
-               {\r
-                       CPen *pOldPen;\r
-                       CPen pen;\r
-                       CBrush *pOldBr;\r
-                       CRect rect;\r
-                       pen.CreatePen(PS_DASH, 2, RGB(255,0,0));\r
-                       pOldPen = pDC->SelectObject(&pen);\r
-                       pOldBr = (CBrush*) (pDC->SelectStockObject(NULL_BRUSH));\r
-                       int nOldRop = pDC->SetROP2(R2_XORPEN);\r
-                       int nModle = pDC->Rectangle(m_rtOld);\r
-               \r
-                       \r
-                       DrawAllRect(pDC);//update all rect\r
-                       rect = SelectSegment(m_ptLBDown, point);\r
-                       DrawAllRect(pDC);\r
-\r
-                       pDC->Rectangle(rect);\r
-                       pDC->SelectObject(pOldBr);\r
-                       pDC->SelectObject(pOldPen);\r
-                       pDC->SetROP2(nModle);\r
-                       m_rtOld = rect; \r
-               }\r
-       }\r
-\r
-       if (m_bHand && nFlags == MK_LBUTTON)\r
-       {\r
-               int curPos, prevPos;\r
-               //CChildFrame *pFrame = (CChildFrame *) GetParentFrame();\r
-               \r
-               int dy = m_ptLBDown.y - point.y;\r
-               prevPos = m_nPosV;\r
-               curPos = prevPos + dy;\r
-               prevPos = SetScrollPos(SB_VERT, curPos, TRUE);\r
-               curPos = GetScrollPos(SB_VERT);\r
-               int distance;\r
-               distance = prevPos - curPos;\r
-               m_nStartY += distance;\r
-               ScrollWindow(0, distance);\r
-       \r
-               dy = m_ptLBDown.x - point.x;\r
-               prevPos = m_nPosH;\r
-               curPos = prevPos + dy;\r
-               prevPos = SetScrollPos(SB_HORZ, curPos, TRUE);\r
-               curPos = GetScrollPos(SB_HORZ);\r
-               distance = prevPos - curPos;\r
-               m_nStartX += distance;\r
-               ScrollWindow(distance, 0);\r
-\r
-       }\r
-       if (m_bSnap && nFlags == MK_LBUTTON)\r
-       {\r
-               CPen *pOldPen;\r
-               CPen pen;\r
-               CBrush *pOldBr;\r
-               CRect rect(m_ptLBDown, point);\r
-               pen.CreatePen(PS_DASH, 2, RGB(255,0,0));\r
-               pOldPen = pDC->SelectObject(&pen);\r
-               pOldBr = (CBrush*) (pDC->SelectStockObject(NULL_BRUSH));\r
-               int nOldRop = pDC->SetROP2(R2_XORPEN);\r
-               int nModle = pDC->Rectangle(m_rtOld);\r
-               \r
-               pDC->Rectangle(rect);\r
-               pDC->SelectObject(pOldBr);\r
-               pDC->SelectObject(pOldPen);\r
-               pDC->SetROP2(nModle);\r
-               m_rtOld = rect;\r
-               \r
-       }\r
-       \r
-       FPDF_LINK hlink=NULL;\r
-       double pdfx,pdfy;\r
-\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-\r
-       FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor),m_nRotateFlag,point.x,point.y,&pdfx,&pdfy);\r
-       hlink=FPDFLink_GetLinkAtPoint(m_pPage,pdfx,pdfy);\r
-       if (hlink)\r
-       {\r
-               HCURSOR hCur = AfxGetApp()->LoadCursor(IDC_CURSOR4);\r
-           ::SetCursor(hCur);\r
-       }\r
-       ReleaseDC(pDC);\r
-//             \r
-       CView::OnMouseMove(nFlags, point);\r
-}\r
-\r
-void CReaderVCView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) \r
-{\r
-       // TODO: Add your message handler code here and/or call default\r
-//     double page_x = 0;\r
-//     double page_y = 0;\r
-//     DeviceToPage(point, page_x, page_y);\r
-\r
-       if(m_pApp)\r
-       {\r
-               if(FORM_OnKeyDown(m_pApp, m_pPage, nChar, ComposeFlag()))\r
-                       return;\r
-       }\r
-       switch(nChar)\r
-       {\r
-       case 35:\r
-               OnDocLastpage();        \r
-               break;\r
-       case 36:\r
-               OnDocFirstpage();\r
-               break;\r
-       case 37:\r
-               this->OnDocPrepage();\r
-               break;\r
-       case 39:\r
-               this->OnDocNextpage();\r
-               break;\r
-       case 38:\r
-               \r
-               break;\r
-       case 40:\r
-               \r
-               break;\r
-       default:\r
-               break;\r
-       }\r
-       CView::OnKeyDown(nChar, nRepCnt, nFlags);\r
-}\r
-\r
-void CReaderVCView::OnToolSnapshot() \r
-{\r
-       m_bSnap = TRUE;\r
-       m_bHand = FALSE;\r
-       m_bSelect = FALSE;\r
-       this->HideCaret();\r
-}\r
-\r
-void CReaderVCView::OnToolSelect() \r
-{\r
-       if(m_pTextPage == NULL)\r
-       {\r
-               AfxMessageBox("Sorry, the fpdftext.dll may has expired. For keeping on using the dll, please contact sales@foxitsoftware.com.");\r
-               return;\r
-       }\r
-       m_bSnap = FALSE;\r
-       m_bHand = FALSE;\r
-       m_bSelect = TRUE;\r
-}\r
-\r
-void CReaderVCView::OnToolHand() \r
-{\r
-       m_bSnap = FALSE;\r
-       m_bHand = TRUE;\r
-       m_bSelect = FALSE;\r
-       this->HideCaret();\r
-}\r
-\r
-void CReaderVCView::LoadMyCursor(int nflag)\r
-{\r
-       HCURSOR hCur;\r
-       if (nflag == 1)\r
-       {\r
-               if (m_bSelect)\r
-               {\r
-                       hCur = AfxGetApp()->LoadCursor(IDC_CURSOR3);\r
-               }\r
-               else if (m_bSnap)\r
-               {\r
-                       hCur = AfxGetApp()->LoadStandardCursor(IDC_CROSS);\r
-               }\r
-               else\r
-               {\r
-                       hCur = AfxGetApp()->LoadCursor(IDC_CURSOR1);\r
-               }\r
-       }\r
-       else if (m_bHand)\r
-       {\r
-               hCur = AfxGetApp()->LoadCursor(IDC_CURSOR2);\r
-       }\r
-       else if (m_bSelect)\r
-       {\r
-               hCur = AfxGetApp()->LoadCursor(IDC_CURSOR3);\r
-       }\r
-       else if (m_bSnap)\r
-       {\r
-               hCur = AfxGetApp()->LoadStandardCursor(IDC_CROSS);\r
-       }else \r
-       {\r
-               hCur = AfxGetApp()->LoadStandardCursor(IDC_ARROW);\r
-       }\r
-       ::SetCursor(hCur);\r
-}\r
-\r
-BOOL CReaderVCView::DeviceToPage(CPoint pt, double& page_x, double& page_y)\r
-{\r
-//     if(NULL == m_pTextPage) return FALSE;\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-//     switch ( m_nRotateFlag % 4 )\r
-//     {\r
-//     case 0:\r
-//     case 2:\r
-//             {\r
-//                     FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-//                     m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, pt.x, pt.y, &page_x, &page_y);\r
-//                     break;\r
-//             }\r
-//     case 1:\r
-//     case 3:\r
-//             {\r
-//                     FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, m_nActualSizeY * m_dbScaleFactor,\r
-//                             m_nActualSizeX * m_dbScaleFactor, m_nRotateFlag, pt.x, pt.y, &page_x, &page_y);\r
-//                     break;\r
-//             }\r
-//     }\r
-\r
-       FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, pt.x, pt.y, &page_x, &page_y);\r
-       return TRUE;\r
-}\r
-\r
-BOOL CReaderVCView::PageToDevice(double page_x, double page_y, CPoint& pt)\r
-{\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-\r
-       FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, page_x, page_y, (int*)&pt.x, (int*)&pt.y);\r
-       return TRUE;\r
-}\r
-\r
-BOOL CReaderVCView::GetCharIndexByPoint(CPoint pt, int &nIndex)\r
-{\r
-       double page_x = 0.0f;\r
-       double page_y = 0.0f;\r
-\r
-       if(NULL == m_pTextPage) return FALSE;\r
-       int nActualRangeX = 0;\r
-       int nActualRangeY = 0;\r
-       if ( m_nRotateFlag % 2 == 0 )\r
-       {\r
-               nActualRangeX = m_nActualSizeX;\r
-               nActualRangeY = m_nActualSizeY;\r
-       }else{\r
-               nActualRangeX = m_nActualSizeY;\r
-               nActualRangeY = m_nActualSizeX;\r
-       }\r
-       FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-               (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, pt.x, pt.y, &page_x, &page_y);\r
-//     FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-//             m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, pt.x, pt.y, &page_x, &page_y);\r
-       \r
-       nIndex = FPDFText_GetCharIndexAtPos(m_pTextPage, page_x, page_y, 10, 10);\r
-       if (-3 == nIndex || -1 == nIndex) return FALSE;\r
-       return TRUE;\r
-}\r
-\r
-void CReaderVCView::CreateCaret(CPoint pt)\r
-{\r
-       double a, b, c, d;\r
-       int nIndex = 0;\r
-       int nAcent = 0, nDecent = 0;\r
-       double orgx = 0.0f, orgy = 0.0f;\r
-       double fontsize = 0.0f;\r
-       int left = 0, right = 0;\r
-       int top = 0, bottom = 0;\r
-       //double left_char, right_char, top_char, bottom_char;//char bounding box       \r
-       FPDF_FONT pfont = NULL;\r
-\r
-       if(!GetCharIndexByPoint(pt, nIndex)) return;\r
-       fontsize = FPDFText_GetFontSize(m_pTextPage, nIndex);\r
-//     FPDFText_GetOrigin(m_pTextPage, nIndex, &orgx, &orgy);\r
-//     pfont = FPDFText_GetFont(m_pTextPage, nIndex);\r
-//     if(NULL == pfont) return;\r
-//     nAcent = FPDFFont_GetAscent(pfont);\r
-//     nDecent = FPDFFont_GetDescent(pfont);\r
-//     FPDFText_GetMatrix(m_pTextPage, nIndex, &a, &b, &c, &d);\r
-//     nAcent =(int)((nAcent * fontsize / 1000.0f) * d + orgy + 0.5f);\r
-//     nDecent = (int)((nDecent * fontsize / 1000.0f) * d + orgy + 0.5f);\r
-// \r
-//     int nActualRangeX = 0;\r
-//     int nActualRangeY = 0;\r
-//     if ( m_nRotateFlag % 2 == 0 )\r
-//     {\r
-//             nActualRangeX = m_nActualSizeX;\r
-//             nActualRangeY = m_nActualSizeY;\r
-//     }else{\r
-//             nActualRangeX = m_nActualSizeY;\r
-//             nActualRangeY = m_nActualSizeX;\r
-//     }\r
-//     FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-//             (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, orgx, nAcent, &left, &top);\r
-// \r
-//     FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-//             (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, orgx, nDecent, &right, &bottom);\r
-// \r
-// //  FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-// //          m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, orgx, nAcent, &left, &top);\r
-// // \r
-// //  FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-// //          m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, orgx, nDecent, &right, &bottom);\r
-// \r
-//     this->CreateSolidCaret(2, abs(top - bottom));\r
-//     \r
-// /*  FPDFText_GetCharBox(m_pTextPage, nIndex, &left_char, &right_char, &bottom_char, &top_char);\r
-// \r
-//     FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-//             m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, left_char, top_char, &left, &top);\r
-//     FPDF_PageToDevice(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-//             m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, right_char, bottom_char, &right, &bottom);*/\r
-//     this->SetCaretPos(CPoint(left, top-2));\r
-//     this->ShowCaret();\r
-       \r
-\r
-}\r
-\r
-void CReaderVCView::GetRects(int nStart, int nEnd)\r
-{\r
-       int temp, nCount;\r
-       nCount = nEnd - nStart;\r
-       if (nCount < 0)\r
-       {\r
-               temp = nEnd;\r
-               nEnd = nStart;\r
-               nStart = temp;\r
-\r
-               nCount = abs(nCount);\r
-       }\r
-        nCount ++;\r
-\r
-        int num = FPDFText_CountRects(m_pTextPage, nStart, nCount);\r
-        if(num == 0) return;\r
-        \r
-        if (m_rtArray.GetSize() > 0)\r
-        {\r
-                m_rtArray.RemoveAll();\r
-        }\r
-        PDFRect rect;\r
-        for (int i=0; i<num; i++)\r
-        {\r
-                FPDFText_GetRect(m_pTextPage, i, &rect.m_dbLeft, &rect.m_dbTop, &rect.m_dbRight, &rect.m_dbBottom);\r
-                m_rtArray.Add(rect);\r
-        }\r
-       return;\r
-}\r
-\r
-CRect CReaderVCView::SelectSegment(CPoint pt_lt, CPoint pt_rb)\r
-{\r
-       CRect rect(pt_lt, pt_rb);\r
-//     double left, top, right, bottom;\r
-//     int start_index = 0, nCount = 0;\r
-//     int nRect = 0;\r
-// \r
-//     int nActualRangeX = 0;\r
-//     int nActualRangeY = 0;\r
-//     if ( m_nRotateFlag % 2 == 0 )\r
-//     {\r
-//             nActualRangeX = m_nActualSizeX;\r
-//             nActualRangeY = m_nActualSizeY;\r
-//     }else{\r
-//             nActualRangeX = m_nActualSizeY;\r
-//             nActualRangeY = m_nActualSizeX;\r
-//     }\r
-//     FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-//             (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, rect.left, rect.top, &left, &top);\r
-//     FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, (int)(nActualRangeX * m_dbScaleFactor),\r
-//             (int)(nActualRangeY * m_dbScaleFactor), m_nRotateFlag, rect.right, rect.bottom, &right, &bottom);\r
-// \r
-// //  FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-// //          m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, rect.left, rect.top, &left, &top);\r
-// //  FPDF_DeviceToPage(m_pPage, m_nStartX, m_nStartY, m_nActualSizeX * m_dbScaleFactor,\r
-// //          m_nActualSizeY * m_dbScaleFactor, m_nRotateFlag, rect.right, rect.bottom, &right, &bottom);\r
-// \r
-//     int num = FPDFText_CountBoundedSegments(m_pTextPage, left, top, right, bottom);\r
-// \r
-//     if (m_rtArray.GetSize() > 0)\r
-//     {\r
-//             m_rtArray.RemoveAll();\r
-//     }\r
-// \r
-//     CDC *pDC = GetDC();\r
-//     for (int i=0; i<num; i++)\r
-//     {\r
-//             FPDFText_GetBoundedSegment(m_pTextPage, i, &start_index, &nCount);\r
-//             nRect = FPDFText_CountRects(m_pTextPage, start_index, nCount);\r
-// \r
-//             PDFRect rect_select;\r
-//             for (int j=0; j<num; j++)\r
-//             {\r
-//                     FPDFText_GetRect(m_pTextPage, j, &rect_select.m_dbLeft, &rect_select.m_dbTop, &rect_select.m_dbRight, &rect_select.m_dbBottom);\r
-//                     m_rtArray.Add(rect_select);\r
-//             }\r
-//     }\r
-//     ReleaseDC(pDC);\r
-       return rect;\r
-}\r
-\r
-void CReaderVCView::OnToolPdf2txt() \r
-{\r
-       // TODO: Add your command handler code here\r
-       if(m_pTextPage == NULL)\r
-       {\r
-               AfxMessageBox("Sorry, the fpdftext.dll may has expired. For keeping on using the dll, please contact sales@foxitsoftware.com.");\r
-               return;\r
-       }\r
-       CConvertDlg condlg;\r
-       if(condlg.DoModal() == IDOK)\r
-       {\r
-               int nFlag=condlg.m_nFlag;\r
-               CReaderVCDoc *pDoc = this->GetDocument();\r
-               CString pdfname=pDoc->m_strPDFName;\r
-               CString strname=pdfname,stem;\r
-               if (strname.Find(".pdf") != -1 || strname.Find(".PDF") != -1)\r
-               {\r
-                       int startatr=strname.ReverseFind('\\');\r
-                       stem=strname.Mid(startatr+1,strname.GetLength()-startatr-5);\r
-               }\r
-               CString defaultname=stem+".txt";\r
-\r
-               char szFilter[] = "Text File(*.txt)|*.txt";\r
-               CFileDialog dlg(FALSE, ".txt", defaultname, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter, NULL);\r
-\r
-               if (dlg.DoModal() == IDOK)\r
-               {\r
-//                     CString txtname=dlg.GetPathName();\r
-//                     BOOL bFlag=FPDFText_PDFToText(pdfname,txtname,nFlag,NULL);\r
-//                     if(! bFlag) \r
-//                             MessageBox("Convert Failure!");\r
-               }\r
-       }       \r
-}\r
-\r
-void CReaderVCView::SyncScroll()\r
-{\r
-       CRect rect;                                                               \r
-       GetClientRect(rect);                                                      \r
-       \r
-       int nSizeX = 0; \r
-       int nSizeY = 0;\r
-       //int temp = 0;\r
-\r
-       if (1 == m_nRotateFlag || 3 == m_nRotateFlag)\r
-       {\r
-               nSizeX = m_nActualSizeY;\r
-               nSizeY = m_nActualSizeX;\r
-       }\r
-       else\r
-       {\r
-               nSizeX = m_nActualSizeX;\r
-               nSizeY = m_nActualSizeY;\r
-       }\r
-       \r
-       SCROLLINFO scrinfo;                                                       \r
-       scrinfo.cbSize = sizeof(SCROLLINFO);                                      \r
-       GetScrollInfo(SB_HORZ, &scrinfo);                                         \r
-       scrinfo.nMin =0;                                                          \r
-       scrinfo.nMax = (int)(nSizeX * m_dbScaleFactor);                                                 \r
-       scrinfo.nPage = (unsigned int)(__min(nSizeX * m_dbScaleFactor, rect.Width()));                              \r
-       if (nSizeX * m_dbScaleFactor < rect.Width()){scrinfo.fMask |= SIF_DISABLENOSCROLL;}         \r
-       SetScrollInfo(SB_HORZ, &scrinfo);                                         \r
-       SetScrollPos(SB_HORZ, 0);                                           \r
-       //m_nPosH = nPosH;                                                          \r
-       \r
-       GetScrollInfo(SB_VERT, &scrinfo);                                         \r
-       scrinfo.nMin = 0;                                                         \r
-       scrinfo.nMax = (int)(nSizeY * m_dbScaleFactor);                                             \r
-       scrinfo.nPage =(unsigned int)( __min(nSizeY * m_dbScaleFactor, rect.Height()));                             \r
-       if (nSizeY * m_dbScaleFactor < rect.Height()){scrinfo.fMask |= SIF_DISABLENOSCROLL;}        \r
-       SetScrollInfo(SB_VERT, &scrinfo);                                         \r
-       SetScrollPos(SB_VERT, 0);                                             \r
-                                                            \r
-}\r
-\r
-void CReaderVCView::OnSize(UINT nType, int cx, int cy) \r
-{\r
-       CView::OnSize(nType, cx, cy);\r
-       SyncScroll();\r
-       if(m_bmp)\r
-       {\r
-               FPDFBitmap_Destroy(m_bmp);\r
-               m_bmp = NULL;\r
-       }\r
-\r
-       m_bmp = FPDFBitmap_Create(cx, cy, 0);\r
-\r
-       // TODO: Add your message handler code here     \r
-}\r
-\r
-void CReaderVCView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) \r
-{\r
-       // TODO: Add your message handler code here and/or call default\r
-       int prevPos = GetScrollPos(SB_HORZ);                               \r
-       int curPos = prevPos;                                              \r
-       int nMin, nMax, nPage;                                             \r
-       GetScrollRange(SB_HORZ, &nMin, &nMax);                             \r
-       SCROLLINFO si;                                                     \r
-       GetScrollInfo(SB_HORZ, &si);                                       \r
-       nPage = si.nPage;                                                  \r
-       \r
-       switch(nSBCode)                                                    \r
-       {                                                                  \r
-       case SB_TOP:                                                       \r
-               curPos = nMin;                                                   \r
-               break;                                                           \r
-       case SB_BOTTOM:                                                    \r
-               curPos = nMax;                                                   \r
-               break;                                                           \r
-       case SB_LINEUP:                                                    \r
-               curPos --;                                                       \r
-               break;                                                         \r
-       case SB_LINEDOWN:                                                  \r
-               curPos ++;                                                       \r
-               break;                                                         \r
-       case SB_ENDSCROLL:                                                 \r
-               return;                                                          \r
-       case SB_PAGEDOWN:                                                  \r
-               curPos += nPage;                                                 \r
-               break;                                                           \r
-       case SB_PAGEUP:                                                    \r
-               curPos -= nPage;                                                 \r
-               break;                                                         \r
-       case SB_THUMBPOSITION:                                             \r
-               curPos = si.nTrackPos;                                           \r
-               break;                                                         \r
-       case SB_THUMBTRACK:                                                \r
-               curPos = si.nTrackPos;                                           \r
-               break;                                                         \r
-       }                                                                  \r
-       \r
-       if (curPos < nMin) { curPos = nMin;}                               \r
-       if(curPos > nMax){ curPos = nMax;}                                 \r
-       SetScrollPos(SB_HORZ, curPos);                                     \r
-\r
-       int distance;                                                      \r
-       distance = prevPos - curPos;                                                                     \r
-       m_nStartX += distance;                                                                                \r
-       ScrollWindow(distance, 0);                                  \r
-       CRect rect;\r
-       GetClientRect(rect);\r
-       CRect rtnew(rect.left, rect.top, rect.left+distance, rect.bottom);\r
-       InvalidateRect(&rtnew);\r
-       \r
-       CView::OnHScroll(nSBCode, nPos, pScrollBar);\r
-}\r
-\r
-void CReaderVCView::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) \r
-{\r
-       // TODO: Add your message handler code here and/or call default                                   \r
-       int prevPos = GetScrollPos(SB_VERT);                                        \r
-       int curPos = prevPos;                                                       \r
-       int nMin, nMax, nPage;                                                      \r
-       GetScrollRange(SB_VERT, &nMin, &nMax);                                      \r
-       SCROLLINFO si;                                                              \r
-       GetScrollInfo(SB_VERT, &si);                                                \r
-       nPage = si.nPage;                                                           \r
-                                                                            \r
-       switch(nSBCode)                                                             \r
-       {                                                                           \r
-       case SB_TOP:                                                                \r
-               curPos = nMin;                                                            \r
-               break;                                                                    \r
-       case SB_BOTTOM:                                                             \r
-               curPos = nMax;                                                            \r
-               break;                                                                    \r
-       case SB_LINEUP:                                                             \r
-               curPos --;                                                                \r
-               break;                                                                  \r
-       case SB_LINEDOWN:                                                           \r
-               curPos ++;                                                                \r
-               break;                                                                  \r
-       case SB_ENDSCROLL:                                                          \r
-               return;                                                                   \r
-       case SB_PAGEDOWN:                                                           \r
-               curPos += nPage;                                                          \r
-               break;                                                                    \r
-       case SB_PAGEUP:                                                             \r
-               curPos -= nPage;                                                          \r
-               break;                                                                  \r
-       case SB_THUMBPOSITION:                                                      \r
-               curPos = si.nTrackPos;                                                    \r
-               break;                                                                  \r
-       case SB_THUMBTRACK:                                                         \r
-               curPos = si.nTrackPos;                                                    \r
-               break;                                                                  \r
-       }                                                                           \r
-                                                                            \r
-       if (curPos < nMin) { curPos = nMin;}                                        \r
-       if(curPos > nMax){ curPos = nMax;}                                          \r
-       SetScrollPos(SB_VERT, curPos);                                                                                                      \r
-                                                                            \r
-       int distance;                                                                                                        \r
-       distance = prevPos - curPos;                                                \r
-       m_nStartY += distance;