调用Office2003的OCR功能识别图片上的文字
int
miLANG_CHINESE_SIMPLIFIED
=
2052
;
IDocument * pDoc = new IDocument;
pDoc -> CreateDispatch( _T( " MODI.Document " ) );
pDoc -> Create(GetAppPath() + _T( " out.bmp " ));
pDoc -> OCR( miLANG_CHINESE_SIMPLIFIED, 0 , 0 );
IImages images = pDoc -> GetImages();
long num = images.GetCount();
for ( int i = 0 ; i < num; i ++ )
{
IImage image = images.GetItem(i);
ILayout layout = image.GetLayout();
strTemp.Append( layout.GetText());
}
pDoc -> Close( 0 );
pDoc -> ReleaseDispatch();
delete pDoc;
IDocument * pDoc = new IDocument;
pDoc -> CreateDispatch( _T( " MODI.Document " ) );
pDoc -> Create(GetAppPath() + _T( " out.bmp " ));
pDoc -> OCR( miLANG_CHINESE_SIMPLIFIED, 0 , 0 );
IImages images = pDoc -> GetImages();
long num = images.GetCount();
for ( int i = 0 ; i < num; i ++ )
{
IImage image = images.GetItem(i);
ILayout layout = image.GetLayout();
strTemp.Append( layout.GetText());
}
pDoc -> Close( 0 );
pDoc -> ReleaseDispatch();
delete pDoc;
还需要导入Office2003的Dispatch接口包装类
mdivwctl.h
1// Machine generated IDispatch wrapper class(es) created with ClassWizard
2/////////////////////////////////////////////////////////////////////////////
3// IMiFont wrapper class
4
5class IMiFont : public COleDispatchDriver
6{
7public:
8 IMiFont() {} // Calls COleDispatchDriver default constructor
9 IMiFont(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 IMiFont(const IMiFont& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11
12// Attributes
13public:
14
15// Operations
16public:
17 long GetFamily();
18 long GetFaceStyle();
19 long GetSerifStyle();
20 short GetFontSize();
21};
22/////////////////////////////////////////////////////////////////////////////
23// IMiRect wrapper class
24
25class IMiRect : public COleDispatchDriver
26{
27public:
28 IMiRect() {} // Calls COleDispatchDriver default constructor
29 IMiRect(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
30 IMiRect(const IMiRect& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
31
32// Attributes
33public:
34
35// Operations
36public:
37 long GetTop();
38 long GetLeft();
39 long GetRight();
40 long GetBottom();
41};
42/////////////////////////////////////////////////////////////////////////////
43// IMiRects wrapper class
44
45class IMiRects : public COleDispatchDriver
46{
47public:
48 IMiRects() {} // Calls COleDispatchDriver default constructor
49 IMiRects(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
50 IMiRects(const IMiRects& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
51
52// Attributes
53public:
54
55// Operations
56public:
57 long GetCount();
58 LPUNKNOWN Get_NewEnum();
59 LPDISPATCH GetItem(long Index);
60};
61/////////////////////////////////////////////////////////////////////////////
62// IWord wrapper class
63
64class IWord : public COleDispatchDriver
65{
66public:
67 IWord() {} // Calls COleDispatchDriver default constructor
68 IWord(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
69 IWord(const IWord& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
70
71// Attributes
72public:
73
74// Operations
75public:
76 short GetRecognitionConfidence();
77 long GetFontId();
78 long GetLineId();
79 long GetRegionId();
80 CString GetText();
81 LPDISPATCH GetFont();
82 long GetId();
83 LPDISPATCH GetRects();
84};
85/////////////////////////////////////////////////////////////////////////////
86// IWords wrapper class
87
88class IWords : public COleDispatchDriver
89{
90public:
91 IWords() {} // Calls COleDispatchDriver default constructor
92 IWords(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
93 IWords(const IWords& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
94
95// Attributes
96public:
97
98// Operations
99public:
100 long GetCount();
101 LPUNKNOWN Get_NewEnum();
102 LPDISPATCH GetItem(long Index);
103};
104/////////////////////////////////////////////////////////////////////////////
105// ILayout wrapper class
106
107class ILayout : public COleDispatchDriver
108{
109public:
110 ILayout() {} // Calls COleDispatchDriver default constructor
111 ILayout(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
112 ILayout(const ILayout& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
113
114// Attributes
115public:
116
117// Operations
118public:
119 long GetLanguage();//获得OCR处理时的使用的语言设置
120 long GetNumChars();//获得已经辨认文本的字符数目
121 long GetNumWords();
122 long GetNumFonts();//获得字体
123 CString GetText();//以单CString方式获得辨认文本
124 LPDISPATCH GetWords();
125};
126/////////////////////////////////////////////////////////////////////////////
127// IImage wrapper class
128
129class IImage : public COleDispatchDriver
130{
131public:
132 IImage() {} // Calls COleDispatchDriver default constructor
133 IImage(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
134 IImage(const IImage& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
135
136// Attributes
137public:
138
139// Operations
140public:
141 LPDISPATCH GetLayout(); //获得OCR页面结果
142 long GetPixelWidth(); //获取像素的宽
143 long GetPixelHeight(); //获取像素的高
144 long GetXdpi(); //获取每英寸X轴像素
145 long GetYdpi(); //获取每英寸Y轴像素
146 long GetBitsPerPixel(); //获取每像素的位数
147 LPDISPATCH GetThumbnail(long ThumbSize);//返回IPictureDisp,获取图象指图
148 LPDISPATCH GetPicture();//获取图象返回IPictureDisp
149 long GetCompression(); //获取图片压缩程度
150 void OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage);//对页面执行OCR
151 void Rotate(long Angle);//转动页面增加90度
152};
153/////////////////////////////////////////////////////////////////////////////
154// IImages wrapper class
155
156class IImages : public COleDispatchDriver
157{
158public:
159 IImages() {} // Calls COleDispatchDriver default constructor
160 IImages(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
161 IImages(const IImages& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
162
163// Attributes
164public:
165
166// Operations
167public:
168 long GetCount();
169 void Add(LPDISPATCH Page, LPDISPATCH BeforePage);
170 LPUNKNOWN Get_NewEnum();
171 LPDISPATCH GetItem(long Index);
172 void Remove(LPDISPATCH Page);
173};
174/////////////////////////////////////////////////////////////////////////////
175// IDocument wrapper class
176
177class IDocument : public COleDispatchDriver
178{
179public:
180 IDocument() {} // Calls COleDispatchDriver default constructor
181 IDocument(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
182 IDocument(const IDocument& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
183
184// Attributes
185public:
186
187// Operations
188public:
189 void Save(); //保存文挡
190 void Close(BOOL SaveChanges); //关闭文挡
191 void SaveAs(LPCTSTR FileName, long FileFormat, long CompLevel);//以指定文件名,图片格式,压缩程度来保存文挡
192 LPDISPATCH GetImages(); //获取文挡页面收集
193 LPDISPATCH GetBuiltInDocumentProperties();//获取Office 文挡属性
194 LPDISPATCH GetCustomDocumentProperties();//获取Office 文挡属性
195 void Create(LPCTSTR FileOpen); //创建新的文挡
196 BOOL GetDirty(); //获得一个值,看是否不保存所修改过的文挡
197 void OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage);//对整个文挡执行OCR
198 void PrintOut(long From, long To, long Copies, LPCTSTR PrinterName, LPCTSTR PrintToFileName, BOOL PrintAnnotation, long FitMode);//打印文挡到打印机或者文件
199};
200/////////////////////////////////////////////////////////////////////////////
201// _IDocumentEvents wrapper class
202
203class _IDocumentEvents : public COleDispatchDriver
204{
205public:
206 _IDocumentEvents() {} // Calls COleDispatchDriver default constructor
207 _IDocumentEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
208 _IDocumentEvents(const _IDocumentEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
209
210// Attributes
211public:
212
213// Operations
214public:
215 // method 'OnOCRProgress' not emitted because of invalid return type or parameter type
216};
217/////////////////////////////////////////////////////////////////////////////
218// _IImageEvents wrapper class
219
220class _IImageEvents : public COleDispatchDriver
221{
222public:
223 _IImageEvents() {} // Calls COleDispatchDriver default constructor
224 _IImageEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
225 _IImageEvents(const _IImageEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
226
227// Attributes
228public:
229
230// Operations
231public:
232};
233/////////////////////////////////////////////////////////////////////////////
234// IMiSelectRect wrapper class
235
236class IMiSelectRect : public COleDispatchDriver
237{
238public:
239 IMiSelectRect() {} // Calls COleDispatchDriver default constructor
240 IMiSelectRect(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
241 IMiSelectRect(const IMiSelectRect& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
242
243// Attributes
244public:
245
246// Operations
247public:
248 long GetPageNumber();//获取当前所显示页面
249 long GetLeft();
250 long GetTop();
251 long GetRight();
252 long GetBottom();
253};
254/////////////////////////////////////////////////////////////////////////////
255// IMiSelectRects wrapper class
256
257class IMiSelectRects : public COleDispatchDriver
258{
259public:
260 IMiSelectRects() {} // Calls COleDispatchDriver default constructor
261 IMiSelectRects(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
262 IMiSelectRects(const IMiSelectRects& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
263
264// Attributes
265public:
266
267// Operations
268public:
269 long GetCount();
270 LPUNKNOWN Get_NewEnum();
271 LPDISPATCH GetItem(long Index);
272};
273/////////////////////////////////////////////////////////////////////////////
274// IMiSelectableItem wrapper class
275
276class IMiSelectableItem : public COleDispatchDriver
277{
278public:
279 IMiSelectableItem() {} // Calls COleDispatchDriver default constructor
280 IMiSelectableItem(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
281 IMiSelectableItem(const IMiSelectableItem& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
282
283// Attributes
284public:
285
286// Operations
287public:
288 void CopyToClipboard(); //拷贝所选择文本到剪贴板
289 CString GetText(); //获取选择区域所辨认出的文本
290 LPDISPATCH GetWords(); //获得所辨认出的文本的字符集合
291 LPDISPATCH GetSelectRects();//返回一个选择区域
292};
293/////////////////////////////////////////////////////////////////////////////
294// IMiSelectableImage wrapper class
295
296class IMiSelectableImage : public COleDispatchDriver
297{
298public:
299 IMiSelectableImage() {} // Calls COleDispatchDriver default constructor
300 IMiSelectableImage(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
301 IMiSelectableImage(const IMiSelectableImage& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
302
303// Attributes
304public:
305
306// Operations
307public:
308 void CopyToClipboard(long CopyAnnotation, long AlwaysKeepAnnotationColor);//拷贝所选择文本到剪贴板
309 LPDISPATCH ExportToPicture(long CopyAnnotation, long AlwaysKeepAnnotationColor);//返回一个IPictureDisp图形选择
310 void GetBoundingRect(long* plPageNum, long* Left, long* Top, long* Right, long* Bottom);//返回一个矩形区域
311};
312/////////////////////////////////////////////////////////////////////////////
313// IMiDocView wrapper class
314
315class IMiDocView : public COleDispatchDriver
316{
317public:
318 IMiDocView() {} // Calls COleDispatchDriver default constructor
319 IMiDocView(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
320 IMiDocView(const IMiDocView& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
321
322// Attributes
323public:
324
325// Operations
326public:
327 LPUNKNOWN GetDocument(); //获取文挡
328 void SetDocument(LPUNKNOWN newValue); //设置文挡
329 CString GetFileName(); //获取文件名
330 void SetFileName(LPCTSTR lpszNewValue); //设置文件名
331 long GetNumPages(); //获取文挡的页数
332 void ClientToDocument(long* plX, long* plY);//转换视图坐标到文挡坐标
333 void DocumentToClient(long* plX, long* plY);//转换文挡坐标到视图坐标
334 void ClientToImage(long lSX, long lSY, long* pnPage, long* plX, long* plY);//转换视图坐标到页面坐标
335 void ImageToClient(long nPage, long lX, long lY, long* plSX, long* plSY); //页面坐标转换为视图坐标
336 void GetVisibleRect(long* Left, long* Top, long* Right, long* Bottom);//返回可视矩形坐标
337 void MoveRectIntoView(long Left, long Top, long Right, long Bottom); //移动指定的矩形区域到视图
338 long GetDocViewMode(); //获得决定显示页面的方式
339 void SetDocViewMode(long nNewValue); //设置决定以什么的方式去显示页面
340 long GetPageNum(); //获取当前所显示页面
341 void SetPageNum(long nNewValue); //设置当前所显示页面
342 void GetScale(double* pdScaleX, double* pdScaleY);//获取被使用坐标因素
343 void SetScale(double dScaleX, double dScaleY);//设置被使用坐标因素
344 long GetFitMode(); //设置确定怎么适合页面到视图窗口值
345 void SetFitMode(long nNewValue); //获取确定怎么适合页面到视图窗口值
346 long GetActionState(); //获取运行操作状态
347 void SetActionState(long nNewValue); //设置允许操作状态
348 LPDISPATCH GetTextSelection(); //获取用户选择区域
349 void SetTextSelection(LPDISPATCH newValue);//设置用户选择区域
350 LPDISPATCH GetImageSelection(); //获取用户选择,并以Image返回
351 void SetImageSelection(LPDISPATCH newValue);//设置用户选择,并以Image返回
352 void SelectAll(long nPage); //在页面上选择所有东西
353 void MoveSelectionToView(LPDISPATCH pdispSelection); //移动用户所选对象到视图
354 void SetLayerVisible(long Index, BOOL bNewValue);//设置文挡可视图层
355 BOOL GetLayerVisible(long Index); //获取文挡可视图层
356};
357/////////////////////////////////////////////////////////////////////////////
358// _IMiDocViewEvents wrapper class
359
360class _IMiDocViewEvents : public COleDispatchDriver
361{
362public:
363 _IMiDocViewEvents() {} // Calls COleDispatchDriver default constructor
364 _IMiDocViewEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
365 _IMiDocViewEvents(const _IMiDocViewEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
366
367// Attributes
368public:
369
370// Operations
371public:
372 // method 'FitmodeChanged' not emitted because of invalid return type or parameter type
373 // method 'ScaleChanged' not emitted because of invalid return type or parameter type
374 // method 'SelectionChanged' not emitted because of invalid return type or parameter type
375 // method 'PageChanged' not emitted because of invalid return type or parameter type
376 // method 'PageCountChanged' not emitted because of invalid return type or parameter type
377 // method 'CurPageNumChanged' not emitted because of invalid return type or parameter type
378 // method 'VisibleRectChanged' not emitted because of invalid return type or parameter type
379};
380/////////////////////////////////////////////////////////////////////////////
381// IMiDocSearch wrapper class
382
383class IMiDocSearch : public COleDispatchDriver
384{
385public:
386 IMiDocSearch() {} // Calls COleDispatchDriver default constructor
387 IMiDocSearch(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
388 IMiDocSearch(const IMiDocSearch& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
389
390// Attributes
391public:
392
393// Operations
394public:
395 void Initialize(LPUNKNOWN piDoc, LPCTSTR strPattern, VARIANT* PageNum, VARIANT* WordIndex, VARIANT* StartAfterIndex, VARIANT* Backward, BOOL MatchMinus, BOOL MatchFullHalfWidthForm, BOOL MatchHiraganaKatakana, BOOL IgnoreSpace);
396 void Search(LPUNKNOWN pSearchCallback, LPDISPATCH* ppiSearchResult);
397};
398
1// Machine generated IDispatch wrapper class(es) created with ClassWizard
2/////////////////////////////////////////////////////////////////////////////
3// IMiFont wrapper class
4
5class IMiFont : public COleDispatchDriver
6{
7public:
8 IMiFont() {} // Calls COleDispatchDriver default constructor
9 IMiFont(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
10 IMiFont(const IMiFont& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
11
12// Attributes
13public:
14
15// Operations
16public:
17 long GetFamily();
18 long GetFaceStyle();
19 long GetSerifStyle();
20 short GetFontSize();
21};
22/////////////////////////////////////////////////////////////////////////////
23// IMiRect wrapper class
24
25class IMiRect : public COleDispatchDriver
26{
27public:
28 IMiRect() {} // Calls COleDispatchDriver default constructor
29 IMiRect(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
30 IMiRect(const IMiRect& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
31
32// Attributes
33public:
34
35// Operations
36public:
37 long GetTop();
38 long GetLeft();
39 long GetRight();
40 long GetBottom();
41};
42/////////////////////////////////////////////////////////////////////////////
43// IMiRects wrapper class
44
45class IMiRects : public COleDispatchDriver
46{
47public:
48 IMiRects() {} // Calls COleDispatchDriver default constructor
49 IMiRects(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
50 IMiRects(const IMiRects& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
51
52// Attributes
53public:
54
55// Operations
56public:
57 long GetCount();
58 LPUNKNOWN Get_NewEnum();
59 LPDISPATCH GetItem(long Index);
60};
61/////////////////////////////////////////////////////////////////////////////
62// IWord wrapper class
63
64class IWord : public COleDispatchDriver
65{
66public:
67 IWord() {} // Calls COleDispatchDriver default constructor
68 IWord(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
69 IWord(const IWord& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
70
71// Attributes
72public:
73
74// Operations
75public:
76 short GetRecognitionConfidence();
77 long GetFontId();
78 long GetLineId();
79 long GetRegionId();
80 CString GetText();
81 LPDISPATCH GetFont();
82 long GetId();
83 LPDISPATCH GetRects();
84};
85/////////////////////////////////////////////////////////////////////////////
86// IWords wrapper class
87
88class IWords : public COleDispatchDriver
89{
90public:
91 IWords() {} // Calls COleDispatchDriver default constructor
92 IWords(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
93 IWords(const IWords& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
94
95// Attributes
96public:
97
98// Operations
99public:
100 long GetCount();
101 LPUNKNOWN Get_NewEnum();
102 LPDISPATCH GetItem(long Index);
103};
104/////////////////////////////////////////////////////////////////////////////
105// ILayout wrapper class
106
107class ILayout : public COleDispatchDriver
108{
109public:
110 ILayout() {} // Calls COleDispatchDriver default constructor
111 ILayout(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
112 ILayout(const ILayout& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
113
114// Attributes
115public:
116
117// Operations
118public:
119 long GetLanguage();//获得OCR处理时的使用的语言设置
120 long GetNumChars();//获得已经辨认文本的字符数目
121 long GetNumWords();
122 long GetNumFonts();//获得字体
123 CString GetText();//以单CString方式获得辨认文本
124 LPDISPATCH GetWords();
125};
126/////////////////////////////////////////////////////////////////////////////
127// IImage wrapper class
128
129class IImage : public COleDispatchDriver
130{
131public:
132 IImage() {} // Calls COleDispatchDriver default constructor
133 IImage(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
134 IImage(const IImage& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
135
136// Attributes
137public:
138
139// Operations
140public:
141 LPDISPATCH GetLayout(); //获得OCR页面结果
142 long GetPixelWidth(); //获取像素的宽
143 long GetPixelHeight(); //获取像素的高
144 long GetXdpi(); //获取每英寸X轴像素
145 long GetYdpi(); //获取每英寸Y轴像素
146 long GetBitsPerPixel(); //获取每像素的位数
147 LPDISPATCH GetThumbnail(long ThumbSize);//返回IPictureDisp,获取图象指图
148 LPDISPATCH GetPicture();//获取图象返回IPictureDisp
149 long GetCompression(); //获取图片压缩程度
150 void OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage);//对页面执行OCR
151 void Rotate(long Angle);//转动页面增加90度
152};
153/////////////////////////////////////////////////////////////////////////////
154// IImages wrapper class
155
156class IImages : public COleDispatchDriver
157{
158public:
159 IImages() {} // Calls COleDispatchDriver default constructor
160 IImages(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
161 IImages(const IImages& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
162
163// Attributes
164public:
165
166// Operations
167public:
168 long GetCount();
169 void Add(LPDISPATCH Page, LPDISPATCH BeforePage);
170 LPUNKNOWN Get_NewEnum();
171 LPDISPATCH GetItem(long Index);
172 void Remove(LPDISPATCH Page);
173};
174/////////////////////////////////////////////////////////////////////////////
175// IDocument wrapper class
176
177class IDocument : public COleDispatchDriver
178{
179public:
180 IDocument() {} // Calls COleDispatchDriver default constructor
181 IDocument(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
182 IDocument(const IDocument& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
183
184// Attributes
185public:
186
187// Operations
188public:
189 void Save(); //保存文挡
190 void Close(BOOL SaveChanges); //关闭文挡
191 void SaveAs(LPCTSTR FileName, long FileFormat, long CompLevel);//以指定文件名,图片格式,压缩程度来保存文挡
192 LPDISPATCH GetImages(); //获取文挡页面收集
193 LPDISPATCH GetBuiltInDocumentProperties();//获取Office 文挡属性
194 LPDISPATCH GetCustomDocumentProperties();//获取Office 文挡属性
195 void Create(LPCTSTR FileOpen); //创建新的文挡
196 BOOL GetDirty(); //获得一个值,看是否不保存所修改过的文挡
197 void OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage);//对整个文挡执行OCR
198 void PrintOut(long From, long To, long Copies, LPCTSTR PrinterName, LPCTSTR PrintToFileName, BOOL PrintAnnotation, long FitMode);//打印文挡到打印机或者文件
199};
200/////////////////////////////////////////////////////////////////////////////
201// _IDocumentEvents wrapper class
202
203class _IDocumentEvents : public COleDispatchDriver
204{
205public:
206 _IDocumentEvents() {} // Calls COleDispatchDriver default constructor
207 _IDocumentEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
208 _IDocumentEvents(const _IDocumentEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
209
210// Attributes
211public:
212
213// Operations
214public:
215 // method 'OnOCRProgress' not emitted because of invalid return type or parameter type
216};
217/////////////////////////////////////////////////////////////////////////////
218// _IImageEvents wrapper class
219
220class _IImageEvents : public COleDispatchDriver
221{
222public:
223 _IImageEvents() {} // Calls COleDispatchDriver default constructor
224 _IImageEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
225 _IImageEvents(const _IImageEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
226
227// Attributes
228public:
229
230// Operations
231public:
232};
233/////////////////////////////////////////////////////////////////////////////
234// IMiSelectRect wrapper class
235
236class IMiSelectRect : public COleDispatchDriver
237{
238public:
239 IMiSelectRect() {} // Calls COleDispatchDriver default constructor
240 IMiSelectRect(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
241 IMiSelectRect(const IMiSelectRect& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
242
243// Attributes
244public:
245
246// Operations
247public:
248 long GetPageNumber();//获取当前所显示页面
249 long GetLeft();
250 long GetTop();
251 long GetRight();
252 long GetBottom();
253};
254/////////////////////////////////////////////////////////////////////////////
255// IMiSelectRects wrapper class
256
257class IMiSelectRects : public COleDispatchDriver
258{
259public:
260 IMiSelectRects() {} // Calls COleDispatchDriver default constructor
261 IMiSelectRects(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
262 IMiSelectRects(const IMiSelectRects& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
263
264// Attributes
265public:
266
267// Operations
268public:
269 long GetCount();
270 LPUNKNOWN Get_NewEnum();
271 LPDISPATCH GetItem(long Index);
272};
273/////////////////////////////////////////////////////////////////////////////
274// IMiSelectableItem wrapper class
275
276class IMiSelectableItem : public COleDispatchDriver
277{
278public:
279 IMiSelectableItem() {} // Calls COleDispatchDriver default constructor
280 IMiSelectableItem(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
281 IMiSelectableItem(const IMiSelectableItem& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
282
283// Attributes
284public:
285
286// Operations
287public:
288 void CopyToClipboard(); //拷贝所选择文本到剪贴板
289 CString GetText(); //获取选择区域所辨认出的文本
290 LPDISPATCH GetWords(); //获得所辨认出的文本的字符集合
291 LPDISPATCH GetSelectRects();//返回一个选择区域
292};
293/////////////////////////////////////////////////////////////////////////////
294// IMiSelectableImage wrapper class
295
296class IMiSelectableImage : public COleDispatchDriver
297{
298public:
299 IMiSelectableImage() {} // Calls COleDispatchDriver default constructor
300 IMiSelectableImage(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
301 IMiSelectableImage(const IMiSelectableImage& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
302
303// Attributes
304public:
305
306// Operations
307public:
308 void CopyToClipboard(long CopyAnnotation, long AlwaysKeepAnnotationColor);//拷贝所选择文本到剪贴板
309 LPDISPATCH ExportToPicture(long CopyAnnotation, long AlwaysKeepAnnotationColor);//返回一个IPictureDisp图形选择
310 void GetBoundingRect(long* plPageNum, long* Left, long* Top, long* Right, long* Bottom);//返回一个矩形区域
311};
312/////////////////////////////////////////////////////////////////////////////
313// IMiDocView wrapper class
314
315class IMiDocView : public COleDispatchDriver
316{
317public:
318 IMiDocView() {} // Calls COleDispatchDriver default constructor
319 IMiDocView(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
320 IMiDocView(const IMiDocView& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
321
322// Attributes
323public:
324
325// Operations
326public:
327 LPUNKNOWN GetDocument(); //获取文挡
328 void SetDocument(LPUNKNOWN newValue); //设置文挡
329 CString GetFileName(); //获取文件名
330 void SetFileName(LPCTSTR lpszNewValue); //设置文件名
331 long GetNumPages(); //获取文挡的页数
332 void ClientToDocument(long* plX, long* plY);//转换视图坐标到文挡坐标
333 void DocumentToClient(long* plX, long* plY);//转换文挡坐标到视图坐标
334 void ClientToImage(long lSX, long lSY, long* pnPage, long* plX, long* plY);//转换视图坐标到页面坐标
335 void ImageToClient(long nPage, long lX, long lY, long* plSX, long* plSY); //页面坐标转换为视图坐标
336 void GetVisibleRect(long* Left, long* Top, long* Right, long* Bottom);//返回可视矩形坐标
337 void MoveRectIntoView(long Left, long Top, long Right, long Bottom); //移动指定的矩形区域到视图
338 long GetDocViewMode(); //获得决定显示页面的方式
339 void SetDocViewMode(long nNewValue); //设置决定以什么的方式去显示页面
340 long GetPageNum(); //获取当前所显示页面
341 void SetPageNum(long nNewValue); //设置当前所显示页面
342 void GetScale(double* pdScaleX, double* pdScaleY);//获取被使用坐标因素
343 void SetScale(double dScaleX, double dScaleY);//设置被使用坐标因素
344 long GetFitMode(); //设置确定怎么适合页面到视图窗口值
345 void SetFitMode(long nNewValue); //获取确定怎么适合页面到视图窗口值
346 long GetActionState(); //获取运行操作状态
347 void SetActionState(long nNewValue); //设置允许操作状态
348 LPDISPATCH GetTextSelection(); //获取用户选择区域
349 void SetTextSelection(LPDISPATCH newValue);//设置用户选择区域
350 LPDISPATCH GetImageSelection(); //获取用户选择,并以Image返回
351 void SetImageSelection(LPDISPATCH newValue);//设置用户选择,并以Image返回
352 void SelectAll(long nPage); //在页面上选择所有东西
353 void MoveSelectionToView(LPDISPATCH pdispSelection); //移动用户所选对象到视图
354 void SetLayerVisible(long Index, BOOL bNewValue);//设置文挡可视图层
355 BOOL GetLayerVisible(long Index); //获取文挡可视图层
356};
357/////////////////////////////////////////////////////////////////////////////
358// _IMiDocViewEvents wrapper class
359
360class _IMiDocViewEvents : public COleDispatchDriver
361{
362public:
363 _IMiDocViewEvents() {} // Calls COleDispatchDriver default constructor
364 _IMiDocViewEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
365 _IMiDocViewEvents(const _IMiDocViewEvents& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
366
367// Attributes
368public:
369
370// Operations
371public:
372 // method 'FitmodeChanged' not emitted because of invalid return type or parameter type
373 // method 'ScaleChanged' not emitted because of invalid return type or parameter type
374 // method 'SelectionChanged' not emitted because of invalid return type or parameter type
375 // method 'PageChanged' not emitted because of invalid return type or parameter type
376 // method 'PageCountChanged' not emitted because of invalid return type or parameter type
377 // method 'CurPageNumChanged' not emitted because of invalid return type or parameter type
378 // method 'VisibleRectChanged' not emitted because of invalid return type or parameter type
379};
380/////////////////////////////////////////////////////////////////////////////
381// IMiDocSearch wrapper class
382
383class IMiDocSearch : public COleDispatchDriver
384{
385public:
386 IMiDocSearch() {} // Calls COleDispatchDriver default constructor
387 IMiDocSearch(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
388 IMiDocSearch(const IMiDocSearch& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
389
390// Attributes
391public:
392
393// Operations
394public:
395 void Initialize(LPUNKNOWN piDoc, LPCTSTR strPattern, VARIANT* PageNum, VARIANT* WordIndex, VARIANT* StartAfterIndex, VARIANT* Backward, BOOL MatchMinus, BOOL MatchFullHalfWidthForm, BOOL MatchHiraganaKatakana, BOOL IgnoreSpace);
396 void Search(LPUNKNOWN pSearchCallback, LPDISPATCH* ppiSearchResult);
397};
398
mdivwctl.cpp
1// Machine generated IDispatch wrapper class(es) created with ClassWizard
2
3#include "stdafx.h"
4#include "mdivwctl.h"
5
6#ifdef _DEBUG
7#define new DEBUG_NEW
8#undef THIS_FILE
9static char THIS_FILE[] = __FILE__;
10#endif
11
12
13
14/////////////////////////////////////////////////////////////////////////////
15// IMiFont properties
16
17/////////////////////////////////////////////////////////////////////////////
18// IMiFont operations
19
20long IMiFont::GetFamily()
21{
22 long result;
23 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
24 return result;
25}
26
27long IMiFont::GetFaceStyle()
28{
29 long result;
30 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 return result;
32}
33
34long IMiFont::GetSerifStyle()
35{
36 long result;
37 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
38 return result;
39}
40
41short IMiFont::GetFontSize()
42{
43 short result;
44 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
45 return result;
46}
47
48
49/////////////////////////////////////////////////////////////////////////////
50// IMiRect properties
51
52/////////////////////////////////////////////////////////////////////////////
53// IMiRect operations
54
55long IMiRect::GetTop()
56{
57 long result;
58 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
59 return result;
60}
61
62long IMiRect::GetLeft()
63{
64 long result;
65 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
66 return result;
67}
68
69long IMiRect::GetRight()
70{
71 long result;
72 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
73 return result;
74}
75
76long IMiRect::GetBottom()
77{
78 long result;
79 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
80 return result;
81}
82
83
84/////////////////////////////////////////////////////////////////////////////
85// IMiRects properties
86
87/////////////////////////////////////////////////////////////////////////////
88// IMiRects operations
89
90long IMiRects::GetCount()
91{
92 long result;
93 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
94 return result;
95}
96
97LPUNKNOWN IMiRects::Get_NewEnum()
98{
99 LPUNKNOWN result;
100 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
101 return result;
102}
103
104LPDISPATCH IMiRects::GetItem(long Index)
105{
106 LPDISPATCH result;
107 static BYTE parms[] =
108 VTS_I4;
109 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
110 Index);
111 return result;
112}
113
114
115/////////////////////////////////////////////////////////////////////////////
116// IWord properties
117
118/////////////////////////////////////////////////////////////////////////////
119// IWord operations
120
121short IWord::GetRecognitionConfidence()
122{
123 short result;
124 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
125 return result;
126}
127
128long IWord::GetFontId()
129{
130 long result;
131 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
132 return result;
133}
134
135long IWord::GetLineId()
136{
137 long result;
138 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
139 return result;
140}
141
142long IWord::GetRegionId()
143{
144 long result;
145 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
146 return result;
147}
148
149CString IWord::GetText()
150{
151 CString result;
152 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
153 return result;
154}
155
156LPDISPATCH IWord::GetFont()
157{
158 LPDISPATCH result;
159 InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
160 return result;
161}
162
163long IWord::GetId()
164{
165 long result;
166 InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
167 return result;
168}
169
170LPDISPATCH IWord::GetRects()
171{
172 LPDISPATCH result;
173 InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
174 return result;
175}
176
177
178/////////////////////////////////////////////////////////////////////////////
179// IWords properties
180
181/////////////////////////////////////////////////////////////////////////////
182// IWords operations
183
184long IWords::GetCount()
185{
186 long result;
187 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
188 return result;
189}
190
191LPUNKNOWN IWords::Get_NewEnum()
192{
193 LPUNKNOWN result;
194 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
195 return result;
196}
197
198LPDISPATCH IWords::GetItem(long Index)
199{
200 LPDISPATCH result;
201 static BYTE parms[] =
202 VTS_I4;
203 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
204 Index);
205 return result;
206}
207
208
209/////////////////////////////////////////////////////////////////////////////
210// ILayout properties
211
212/////////////////////////////////////////////////////////////////////////////
213// ILayout operations
214
215long ILayout::GetLanguage()
216{
217 long result;
218 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
219 return result;
220}
221
222long ILayout::GetNumChars()
223{
224 long result;
225 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
226 return result;
227}
228
229long ILayout::GetNumWords()
230{
231 long result;
232 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
233 return result;
234}
235
236long ILayout::GetNumFonts()
237{
238 long result;
239 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
240 return result;
241}
242
243CString ILayout::GetText()
244{
245 CString result;
246 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
247 return result;
248}
249
250LPDISPATCH ILayout::GetWords()
251{
252 LPDISPATCH result;
253 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
254 return result;
255}
256
257
258/////////////////////////////////////////////////////////////////////////////
259// IImage properties
260
261/////////////////////////////////////////////////////////////////////////////
262// IImage operations
263
264LPDISPATCH IImage::GetLayout()
265{
266 LPDISPATCH result;
267 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
268 return result;
269}
270
271long IImage::GetPixelWidth()
272{
273 long result;
274 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
275 return result;
276}
277
278long IImage::GetPixelHeight()
279{
280 long result;
281 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
282 return result;
283}
284
285long IImage::GetXdpi()
286{
287 long result;
288 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
289 return result;
290}
291
292long IImage::GetYdpi()
293{
294 long result;
295 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
296 return result;
297}
298
299long IImage::GetBitsPerPixel()
300{
301 long result;
302 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
303 return result;
304}
305
306LPDISPATCH IImage::GetThumbnail(long ThumbSize)
307{
308 LPDISPATCH result;
309 static BYTE parms[] =
310 VTS_I4;
311 InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
312 ThumbSize);
313 return result;
314}
315
316LPDISPATCH IImage::GetPicture()
317{
318 LPDISPATCH result;
319 InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
320 return result;
321}
322
323long IImage::GetCompression()
324{
325 long result;
326 InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
327 return result;
328}
329
330void IImage::OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage)
331{
332 static BYTE parms[] =
333 VTS_I4 VTS_BOOL VTS_BOOL;
334 InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
335 LangId, OCROrientImage, OCRStraightenImage);
336}
337
338void IImage::Rotate(long Angle)
339{
340 static BYTE parms[] =
341 VTS_I4;
342 InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
343 Angle);
344}
345
346
347/////////////////////////////////////////////////////////////////////////////
348// IImages properties
349
350/////////////////////////////////////////////////////////////////////////////
351// IImages operations
352
353long IImages::GetCount()
354{
355 long result;
356 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
357 return result;
358}
359
360void IImages::Add(LPDISPATCH Page, LPDISPATCH BeforePage)
361{
362 static BYTE parms[] =
363 VTS_DISPATCH VTS_DISPATCH;
364 InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
365 Page, BeforePage);
366}
367
368LPUNKNOWN IImages::Get_NewEnum()
369{
370 LPUNKNOWN result;
371 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
372 return result;
373}
374
375LPDISPATCH IImages::GetItem(long Index)
376{
377 LPDISPATCH result;
378 static BYTE parms[] =
379 VTS_I4;
380 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
381 Index);
382 return result;
383}
384
385void IImages::Remove(LPDISPATCH Page)
386{
387 static BYTE parms[] =
388 VTS_DISPATCH;
389 InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
390 Page);
391}
392
393
394/////////////////////////////////////////////////////////////////////////////
395// IDocument properties
396
397/////////////////////////////////////////////////////////////////////////////
398// IDocument operations
399
400void IDocument::Save()
401{
402 InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
403}
404
405void IDocument::Close(BOOL SaveChanges)
406{
407 static BYTE parms[] =
408 VTS_BOOL;
409 InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
410 SaveChanges);
411}
412
413void IDocument::SaveAs(LPCTSTR FileName, long FileFormat, long CompLevel)
414{
415 static BYTE parms[] =
416 VTS_BSTR VTS_I4 VTS_I4;
417 InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
418 FileName, FileFormat, CompLevel);
419}
420
421LPDISPATCH IDocument::GetImages()
422{
423 LPDISPATCH result;
424 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
425 return result;
426}
427
428LPDISPATCH IDocument::GetBuiltInDocumentProperties()
429{
430 LPDISPATCH result;
431 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
432 return result;
433}
434
435LPDISPATCH IDocument::GetCustomDocumentProperties()
436{
437 LPDISPATCH result;
438 InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
439 return result;
440}
441
442void IDocument::Create(LPCTSTR FileOpen)
443{
444 static BYTE parms[] =
445 VTS_BSTR;
446 InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
447 FileOpen);
448}
449
450BOOL IDocument::GetDirty()
451{
452 BOOL result;
453 InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
454 return result;
455}
456
457void IDocument::OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage)
458{
459 static BYTE parms[] =
460 VTS_I4 VTS_BOOL VTS_BOOL;
461 InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
462 LangId, OCROrientImage, OCRStraightenImage);
463}
464
465void IDocument::PrintOut(long From, long To, long Copies, LPCTSTR PrinterName, LPCTSTR PrintToFileName, BOOL PrintAnnotation, long FitMode)
466{
467 static BYTE parms[] =
468 VTS_I4 VTS_I4 VTS_I4 VTS_BSTR VTS_BSTR VTS_BOOL VTS_I4;
469 InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
470 From, To, Copies, PrinterName, PrintToFileName, PrintAnnotation, FitMode);
471}
472
473
474/////////////////////////////////////////////////////////////////////////////
475// _IDocumentEvents properties
476
477/////////////////////////////////////////////////////////////////////////////
478// _IDocumentEvents operations
479
480
481/////////////////////////////////////////////////////////////////////////////
482// _IImageEvents properties
483
484/////////////////////////////////////////////////////////////////////////////
485// _IImageEvents operations
486
487
488/////////////////////////////////////////////////////////////////////////////
489// IMiSelectRect properties
490
491/////////////////////////////////////////////////////////////////////////////
492// IMiSelectRect operations
493
494long IMiSelectRect::GetPageNumber()
495{
496 long result;
497 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
498 return result;
499}
500
501long IMiSelectRect::GetLeft()
502{
503 long result;
504 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
505 return result;
506}
507
508long IMiSelectRect::GetTop()
509{
510 long result;
511 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
512 return result;
513}
514
515long IMiSelectRect::GetRight()
516{
517 long result;
518 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
519 return result;
520}
521
522long IMiSelectRect::GetBottom()
523{
524 long result;
525 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
526 return result;
527}
528
529
530/////////////////////////////////////////////////////////////////////////////
531// IMiSelectRects properties
532
533/////////////////////////////////////////////////////////////////////////////
534// IMiSelectRects operations
535
536long IMiSelectRects::GetCount()
537{
538 long result;
539 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
540 return result;
541}
542
543LPUNKNOWN IMiSelectRects::Get_NewEnum()
544{
545 LPUNKNOWN result;
546 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
547 return result;
548}
549
550LPDISPATCH IMiSelectRects::GetItem(long Index)
551{
552 LPDISPATCH result;
553 static BYTE parms[] =
554 VTS_I4;
555 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
556 Index);
557 return result;
558}
559
560
561/////////////////////////////////////////////////////////////////////////////
562// IMiSelectableItem properties
563
564/////////////////////////////////////////////////////////////////////////////
565// IMiSelectableItem operations
566
567void IMiSelectableItem::CopyToClipboard()
568{
569 InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
570}
571
572CString IMiSelectableItem::GetText()
573{
574 CString result;
575 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
576 return result;
577}
578
579LPDISPATCH IMiSelectableItem::GetWords()
580{
581 LPDISPATCH result;
582 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
583 return result;
584}
585
586LPDISPATCH IMiSelectableItem::GetSelectRects()
587{
588 LPDISPATCH result;
589 InvokeHelper(0x4, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL);
590 return result;
591}
592
593
594/////////////////////////////////////////////////////////////////////////////
595// IMiSelectableImage properties
596
597/////////////////////////////////////////////////////////////////////////////
598// IMiSelectableImage operations
599
600void IMiSelectableImage::CopyToClipboard(long CopyAnnotation, long AlwaysKeepAnnotationColor)
601{
602 static BYTE parms[] =
603 VTS_I4 VTS_I4;
604 InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
605 CopyAnnotation, AlwaysKeepAnnotationColor);
606}
607
608LPDISPATCH IMiSelectableImage::ExportToPicture(long CopyAnnotation, long AlwaysKeepAnnotationColor)
609{
610 LPDISPATCH result;
611 static BYTE parms[] =
612 VTS_I4 VTS_I4;
613 InvokeHelper(0x2, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
614 CopyAnnotation, AlwaysKeepAnnotationColor);
615 return result;
616}
617
618void IMiSelectableImage::GetBoundingRect(long* plPageNum, long* Left, long* Top, long* Right, long* Bottom)
619{
620 static BYTE parms[] =
621 VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4;
622 InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
623 plPageNum, Left, Top, Right, Bottom);
624}
625
626
627/////////////////////////////////////////////////////////////////////////////
628// IMiDocView properties
629
630/////////////////////////////////////////////////////////////////////////////
631// IMiDocView operations
632
633LPUNKNOWN IMiDocView::GetDocument()
634{
635 LPUNKNOWN result;
636 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
637 return result;
638}
639
640void IMiDocView::SetDocument(LPUNKNOWN newValue)
641{
642 static BYTE parms[] =
643 VTS_UNKNOWN;
644 InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
645 newValue);
646}
647
648CString IMiDocView::GetFileName()
649{
650 CString result;
651 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
652 return result;
653}
654
655void IMiDocView::SetFileName(LPCTSTR lpszNewValue)
656{
657 static BYTE parms[] =
658 VTS_BSTR;
659 InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
660 lpszNewValue);
661}
662
663long IMiDocView::GetNumPages()
664{
665 long result;
666 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
667 return result;
668}
669
670void IMiDocView::ClientToDocument(long* plX, long* plY)
671{
672 static BYTE parms[] =
673 VTS_PI4 VTS_PI4;
674 InvokeHelper(0x30, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
675 plX, plY);
676}
677
678void IMiDocView::DocumentToClient(long* plX, long* plY)
679{
680 static BYTE parms[] =
681 VTS_PI4 VTS_PI4;
682 InvokeHelper(0x31, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
683 plX, plY);
684}
685
686void IMiDocView::ClientToImage(long lSX, long lSY, long* pnPage, long* plX, long* plY)
687{
688 static BYTE parms[] =
689 VTS_I4 VTS_I4 VTS_PI4 VTS_PI4 VTS_PI4;
690 InvokeHelper(0x34, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
691 lSX, lSY, pnPage, plX, plY);
692}
693
694void IMiDocView::ImageToClient(long nPage, long lX, long lY, long* plSX, long* plSY)
695{
696 static BYTE parms[] =
697 VTS_I4 VTS_I4 VTS_I4 VTS_PI4 VTS_PI4;
698 InvokeHelper(0x35, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
699 nPage, lX, lY, plSX, plSY);
700}
701
702void IMiDocView::GetVisibleRect(long* Left, long* Top, long* Right, long* Bottom)
703{
704 static BYTE parms[] =
705 VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4;
706 InvokeHelper(0x32, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
707 Left, Top, Right, Bottom);
708}
709
710void IMiDocView::MoveRectIntoView(long Left, long Top, long Right, long Bottom)
711{
712 static BYTE parms[] =
713 VTS_I4 VTS_I4 VTS_I4 VTS_I4;
714 InvokeHelper(0x33, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
715 Left, Top, Right, Bottom);
716}
717
718long IMiDocView::GetDocViewMode()
719{
720 long result;
721 InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
722 return result;
723}
724
725void IMiDocView::SetDocViewMode(long nNewValue)
726{
727 static BYTE parms[] =
728 VTS_I4;
729 InvokeHelper(0x17, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
730 nNewValue);
731}
732
733long IMiDocView::GetPageNum()
734{
735 long result;
736 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
737 return result;
738}
739
740void IMiDocView::SetPageNum(long nNewValue)
741{
742 static BYTE parms[] =
743 VTS_I4;
744 InvokeHelper(0x3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
745 nNewValue);
746}
747
748void IMiDocView::GetScale(double* pdScaleX, double* pdScaleY)
749{
750 static BYTE parms[] =
751 VTS_PR8 VTS_PR8;
752 InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
753 pdScaleX, pdScaleY);
754}
755
756void IMiDocView::SetScale(double dScaleX, double dScaleY)
757{
758 static BYTE parms[] =
759 VTS_R8 VTS_R8;
760 InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
761 dScaleX, dScaleY);
762}
763
764long IMiDocView::GetFitMode()
765{
766 long result;
767 InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
768 return result;
769}
770
771void IMiDocView::SetFitMode(long nNewValue)
772{
773 static BYTE parms[] =
774 VTS_I4;
775 InvokeHelper(0xa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
776 nNewValue);
777}
778
779long IMiDocView::GetActionState()
780{
781 long result;
782 InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
783 return result;
784}
785
786void IMiDocView::SetActionState(long nNewValue)
787{
788 static BYTE parms[] =
789 VTS_I4;
790 InvokeHelper(0xb, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
791 nNewValue);
792}
793
794LPDISPATCH IMiDocView::GetTextSelection()
795{
796 LPDISPATCH result;
797 InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
798 return result;
799}
800
801void IMiDocView::SetTextSelection(LPDISPATCH newValue)
802{
803 static BYTE parms[] =
804 VTS_DISPATCH;
805 InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
806 newValue);
807}
808
809LPDISPATCH IMiDocView::GetImageSelection()
810{
811 LPDISPATCH result;
812 InvokeHelper(0x2f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
813 return result;
814}
815
816void IMiDocView::SetImageSelection(LPDISPATCH newValue)
817{
818 static BYTE parms[] =
819 VTS_DISPATCH;
820 InvokeHelper(0x2f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
821 newValue);
822}
823
824void IMiDocView::SelectAll(long nPage)
825{
826 static BYTE parms[] =
827 VTS_I4;
828 InvokeHelper(0x21, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
829 nPage);
830}
831
832void IMiDocView::MoveSelectionToView(LPDISPATCH pdispSelection)
833{
834 static BYTE parms[] =
835 VTS_DISPATCH;
836 InvokeHelper(0xd, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
837 pdispSelection);
838}
839
840void IMiDocView::SetLayerVisible(long Index, BOOL bNewValue)
841{
842 static BYTE parms[] =
843 VTS_I4 VTS_BOOL;
844 InvokeHelper(0x1d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
845 Index, bNewValue);
846}
847
848BOOL IMiDocView::GetLayerVisible(long Index)
849{
850 BOOL result;
851 static BYTE parms[] =
852 VTS_I4;
853 InvokeHelper(0x1d, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, parms,
854 Index);
855 return result;
856}
857
858
859/////////////////////////////////////////////////////////////////////////////
860// _IMiDocViewEvents properties
861
862/////////////////////////////////////////////////////////////////////////////
863// _IMiDocViewEvents operations
864
865
866/////////////////////////////////////////////////////////////////////////////
867// IMiDocSearch properties
868
869/////////////////////////////////////////////////////////////////////////////
870// IMiDocSearch operations
871
872void IMiDocSearch::Initialize(LPUNKNOWN piDoc, LPCTSTR strPattern, VARIANT* PageNum, VARIANT* WordIndex, VARIANT* StartAfterIndex, VARIANT* Backward, BOOL MatchMinus, BOOL MatchFullHalfWidthForm, BOOL MatchHiraganaKatakana, BOOL IgnoreSpace)
873{
874 static BYTE parms[] =
875 VTS_UNKNOWN VTS_BSTR VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_BOOL VTS_BOOL VTS_BOOL VTS_BOOL;
876 InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
877 piDoc, strPattern, PageNum, WordIndex, StartAfterIndex, Backward, MatchMinus, MatchFullHalfWidthForm, MatchHiraganaKatakana, IgnoreSpace);
878}
879
880void IMiDocSearch::Search(LPUNKNOWN pSearchCallback, LPDISPATCH* ppiSearchResult)
881{
882 static BYTE parms[] =
883 VTS_UNKNOWN VTS_PDISPATCH;
884 InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
885 pSearchCallback, ppiSearchResult);
886}
887
1// Machine generated IDispatch wrapper class(es) created with ClassWizard
2
3#include "stdafx.h"
4#include "mdivwctl.h"
5
6#ifdef _DEBUG
7#define new DEBUG_NEW
8#undef THIS_FILE
9static char THIS_FILE[] = __FILE__;
10#endif
11
12
13
14/////////////////////////////////////////////////////////////////////////////
15// IMiFont properties
16
17/////////////////////////////////////////////////////////////////////////////
18// IMiFont operations
19
20long IMiFont::GetFamily()
21{
22 long result;
23 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
24 return result;
25}
26
27long IMiFont::GetFaceStyle()
28{
29 long result;
30 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
31 return result;
32}
33
34long IMiFont::GetSerifStyle()
35{
36 long result;
37 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
38 return result;
39}
40
41short IMiFont::GetFontSize()
42{
43 short result;
44 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
45 return result;
46}
47
48
49/////////////////////////////////////////////////////////////////////////////
50// IMiRect properties
51
52/////////////////////////////////////////////////////////////////////////////
53// IMiRect operations
54
55long IMiRect::GetTop()
56{
57 long result;
58 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
59 return result;
60}
61
62long IMiRect::GetLeft()
63{
64 long result;
65 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
66 return result;
67}
68
69long IMiRect::GetRight()
70{
71 long result;
72 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
73 return result;
74}
75
76long IMiRect::GetBottom()
77{
78 long result;
79 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
80 return result;
81}
82
83
84/////////////////////////////////////////////////////////////////////////////
85// IMiRects properties
86
87/////////////////////////////////////////////////////////////////////////////
88// IMiRects operations
89
90long IMiRects::GetCount()
91{
92 long result;
93 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
94 return result;
95}
96
97LPUNKNOWN IMiRects::Get_NewEnum()
98{
99 LPUNKNOWN result;
100 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
101 return result;
102}
103
104LPDISPATCH IMiRects::GetItem(long Index)
105{
106 LPDISPATCH result;
107 static BYTE parms[] =
108 VTS_I4;
109 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
110 Index);
111 return result;
112}
113
114
115/////////////////////////////////////////////////////////////////////////////
116// IWord properties
117
118/////////////////////////////////////////////////////////////////////////////
119// IWord operations
120
121short IWord::GetRecognitionConfidence()
122{
123 short result;
124 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
125 return result;
126}
127
128long IWord::GetFontId()
129{
130 long result;
131 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
132 return result;
133}
134
135long IWord::GetLineId()
136{
137 long result;
138 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
139 return result;
140}
141
142long IWord::GetRegionId()
143{
144 long result;
145 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
146 return result;
147}
148
149CString IWord::GetText()
150{
151 CString result;
152 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
153 return result;
154}
155
156LPDISPATCH IWord::GetFont()
157{
158 LPDISPATCH result;
159 InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
160 return result;
161}
162
163long IWord::GetId()
164{
165 long result;
166 InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
167 return result;
168}
169
170LPDISPATCH IWord::GetRects()
171{
172 LPDISPATCH result;
173 InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
174 return result;
175}
176
177
178/////////////////////////////////////////////////////////////////////////////
179// IWords properties
180
181/////////////////////////////////////////////////////////////////////////////
182// IWords operations
183
184long IWords::GetCount()
185{
186 long result;
187 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
188 return result;
189}
190
191LPUNKNOWN IWords::Get_NewEnum()
192{
193 LPUNKNOWN result;
194 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
195 return result;
196}
197
198LPDISPATCH IWords::GetItem(long Index)
199{
200 LPDISPATCH result;
201 static BYTE parms[] =
202 VTS_I4;
203 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
204 Index);
205 return result;
206}
207
208
209/////////////////////////////////////////////////////////////////////////////
210// ILayout properties
211
212/////////////////////////////////////////////////////////////////////////////
213// ILayout operations
214
215long ILayout::GetLanguage()
216{
217 long result;
218 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
219 return result;
220}
221
222long ILayout::GetNumChars()
223{
224 long result;
225 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
226 return result;
227}
228
229long ILayout::GetNumWords()
230{
231 long result;
232 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
233 return result;
234}
235
236long ILayout::GetNumFonts()
237{
238 long result;
239 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
240 return result;
241}
242
243CString ILayout::GetText()
244{
245 CString result;
246 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
247 return result;
248}
249
250LPDISPATCH ILayout::GetWords()
251{
252 LPDISPATCH result;
253 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
254 return result;
255}
256
257
258/////////////////////////////////////////////////////////////////////////////
259// IImage properties
260
261/////////////////////////////////////////////////////////////////////////////
262// IImage operations
263
264LPDISPATCH IImage::GetLayout()
265{
266 LPDISPATCH result;
267 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
268 return result;
269}
270
271long IImage::GetPixelWidth()
272{
273 long result;
274 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
275 return result;
276}
277
278long IImage::GetPixelHeight()
279{
280 long result;
281 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
282 return result;
283}
284
285long IImage::GetXdpi()
286{
287 long result;
288 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
289 return result;
290}
291
292long IImage::GetYdpi()
293{
294 long result;
295 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
296 return result;
297}
298
299long IImage::GetBitsPerPixel()
300{
301 long result;
302 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
303 return result;
304}
305
306LPDISPATCH IImage::GetThumbnail(long ThumbSize)
307{
308 LPDISPATCH result;
309 static BYTE parms[] =
310 VTS_I4;
311 InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
312 ThumbSize);
313 return result;
314}
315
316LPDISPATCH IImage::GetPicture()
317{
318 LPDISPATCH result;
319 InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
320 return result;
321}
322
323long IImage::GetCompression()
324{
325 long result;
326 InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
327 return result;
328}
329
330void IImage::OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage)
331{
332 static BYTE parms[] =
333 VTS_I4 VTS_BOOL VTS_BOOL;
334 InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
335 LangId, OCROrientImage, OCRStraightenImage);
336}
337
338void IImage::Rotate(long Angle)
339{
340 static BYTE parms[] =
341 VTS_I4;
342 InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
343 Angle);
344}
345
346
347/////////////////////////////////////////////////////////////////////////////
348// IImages properties
349
350/////////////////////////////////////////////////////////////////////////////
351// IImages operations
352
353long IImages::GetCount()
354{
355 long result;
356 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
357 return result;
358}
359
360void IImages::Add(LPDISPATCH Page, LPDISPATCH BeforePage)
361{
362 static BYTE parms[] =
363 VTS_DISPATCH VTS_DISPATCH;
364 InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
365 Page, BeforePage);
366}
367
368LPUNKNOWN IImages::Get_NewEnum()
369{
370 LPUNKNOWN result;
371 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
372 return result;
373}
374
375LPDISPATCH IImages::GetItem(long Index)
376{
377 LPDISPATCH result;
378 static BYTE parms[] =
379 VTS_I4;
380 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
381 Index);
382 return result;
383}
384
385void IImages::Remove(LPDISPATCH Page)
386{
387 static BYTE parms[] =
388 VTS_DISPATCH;
389 InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
390 Page);
391}
392
393
394/////////////////////////////////////////////////////////////////////////////
395// IDocument properties
396
397/////////////////////////////////////////////////////////////////////////////
398// IDocument operations
399
400void IDocument::Save()
401{
402 InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
403}
404
405void IDocument::Close(BOOL SaveChanges)
406{
407 static BYTE parms[] =
408 VTS_BOOL;
409 InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
410 SaveChanges);
411}
412
413void IDocument::SaveAs(LPCTSTR FileName, long FileFormat, long CompLevel)
414{
415 static BYTE parms[] =
416 VTS_BSTR VTS_I4 VTS_I4;
417 InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
418 FileName, FileFormat, CompLevel);
419}
420
421LPDISPATCH IDocument::GetImages()
422{
423 LPDISPATCH result;
424 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
425 return result;
426}
427
428LPDISPATCH IDocument::GetBuiltInDocumentProperties()
429{
430 LPDISPATCH result;
431 InvokeHelper(0x6, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
432 return result;
433}
434
435LPDISPATCH IDocument::GetCustomDocumentProperties()
436{
437 LPDISPATCH result;
438 InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
439 return result;
440}
441
442void IDocument::Create(LPCTSTR FileOpen)
443{
444 static BYTE parms[] =
445 VTS_BSTR;
446 InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
447 FileOpen);
448}
449
450BOOL IDocument::GetDirty()
451{
452 BOOL result;
453 InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
454 return result;
455}
456
457void IDocument::OCR(long LangId, BOOL OCROrientImage, BOOL OCRStraightenImage)
458{
459 static BYTE parms[] =
460 VTS_I4 VTS_BOOL VTS_BOOL;
461 InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
462 LangId, OCROrientImage, OCRStraightenImage);
463}
464
465void IDocument::PrintOut(long From, long To, long Copies, LPCTSTR PrinterName, LPCTSTR PrintToFileName, BOOL PrintAnnotation, long FitMode)
466{
467 static BYTE parms[] =
468 VTS_I4 VTS_I4 VTS_I4 VTS_BSTR VTS_BSTR VTS_BOOL VTS_I4;
469 InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
470 From, To, Copies, PrinterName, PrintToFileName, PrintAnnotation, FitMode);
471}
472
473
474/////////////////////////////////////////////////////////////////////////////
475// _IDocumentEvents properties
476
477/////////////////////////////////////////////////////////////////////////////
478// _IDocumentEvents operations
479
480
481/////////////////////////////////////////////////////////////////////////////
482// _IImageEvents properties
483
484/////////////////////////////////////////////////////////////////////////////
485// _IImageEvents operations
486
487
488/////////////////////////////////////////////////////////////////////////////
489// IMiSelectRect properties
490
491/////////////////////////////////////////////////////////////////////////////
492// IMiSelectRect operations
493
494long IMiSelectRect::GetPageNumber()
495{
496 long result;
497 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
498 return result;
499}
500
501long IMiSelectRect::GetLeft()
502{
503 long result;
504 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
505 return result;
506}
507
508long IMiSelectRect::GetTop()
509{
510 long result;
511 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
512 return result;
513}
514
515long IMiSelectRect::GetRight()
516{
517 long result;
518 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
519 return result;
520}
521
522long IMiSelectRect::GetBottom()
523{
524 long result;
525 InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
526 return result;
527}
528
529
530/////////////////////////////////////////////////////////////////////////////
531// IMiSelectRects properties
532
533/////////////////////////////////////////////////////////////////////////////
534// IMiSelectRects operations
535
536long IMiSelectRects::GetCount()
537{
538 long result;
539 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
540 return result;
541}
542
543LPUNKNOWN IMiSelectRects::Get_NewEnum()
544{
545 LPUNKNOWN result;
546 InvokeHelper(0xfffffffc, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
547 return result;
548}
549
550LPDISPATCH IMiSelectRects::GetItem(long Index)
551{
552 LPDISPATCH result;
553 static BYTE parms[] =
554 VTS_I4;
555 InvokeHelper(0x0, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
556 Index);
557 return result;
558}
559
560
561/////////////////////////////////////////////////////////////////////////////
562// IMiSelectableItem properties
563
564/////////////////////////////////////////////////////////////////////////////
565// IMiSelectableItem operations
566
567void IMiSelectableItem::CopyToClipboard()
568{
569 InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
570}
571
572CString IMiSelectableItem::GetText()
573{
574 CString result;
575 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
576 return result;
577}
578
579LPDISPATCH IMiSelectableItem::GetWords()
580{
581 LPDISPATCH result;
582 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
583 return result;
584}
585
586LPDISPATCH IMiSelectableItem::GetSelectRects()
587{
588 LPDISPATCH result;
589 InvokeHelper(0x4, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL);
590 return result;
591}
592
593
594/////////////////////////////////////////////////////////////////////////////
595// IMiSelectableImage properties
596
597/////////////////////////////////////////////////////////////////////////////
598// IMiSelectableImage operations
599
600void IMiSelectableImage::CopyToClipboard(long CopyAnnotation, long AlwaysKeepAnnotationColor)
601{
602 static BYTE parms[] =
603 VTS_I4 VTS_I4;
604 InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
605 CopyAnnotation, AlwaysKeepAnnotationColor);
606}
607
608LPDISPATCH IMiSelectableImage::ExportToPicture(long CopyAnnotation, long AlwaysKeepAnnotationColor)
609{
610 LPDISPATCH result;
611 static BYTE parms[] =
612 VTS_I4 VTS_I4;
613 InvokeHelper(0x2, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, parms,
614 CopyAnnotation, AlwaysKeepAnnotationColor);
615 return result;
616}
617
618void IMiSelectableImage::GetBoundingRect(long* plPageNum, long* Left, long* Top, long* Right, long* Bottom)
619{
620 static BYTE parms[] =
621 VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4;
622 InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
623 plPageNum, Left, Top, Right, Bottom);
624}
625
626
627/////////////////////////////////////////////////////////////////////////////
628// IMiDocView properties
629
630/////////////////////////////////////////////////////////////////////////////
631// IMiDocView operations
632
633LPUNKNOWN IMiDocView::GetDocument()
634{
635 LPUNKNOWN result;
636 InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_UNKNOWN, (void*)&result, NULL);
637 return result;
638}
639
640void IMiDocView::SetDocument(LPUNKNOWN newValue)
641{
642 static BYTE parms[] =
643 VTS_UNKNOWN;
644 InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
645 newValue);
646}
647
648CString IMiDocView::GetFileName()
649{
650 CString result;
651 InvokeHelper(0x2, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
652 return result;
653}
654
655void IMiDocView::SetFileName(LPCTSTR lpszNewValue)
656{
657 static BYTE parms[] =
658 VTS_BSTR;
659 InvokeHelper(0x2, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
660 lpszNewValue);
661}
662
663long IMiDocView::GetNumPages()
664{
665 long result;
666 InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
667 return result;
668}
669
670void IMiDocView::ClientToDocument(long* plX, long* plY)
671{
672 static BYTE parms[] =
673 VTS_PI4 VTS_PI4;
674 InvokeHelper(0x30, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
675 plX, plY);
676}
677
678void IMiDocView::DocumentToClient(long* plX, long* plY)
679{
680 static BYTE parms[] =
681 VTS_PI4 VTS_PI4;
682 InvokeHelper(0x31, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
683 plX, plY);
684}
685
686void IMiDocView::ClientToImage(long lSX, long lSY, long* pnPage, long* plX, long* plY)
687{
688 static BYTE parms[] =
689 VTS_I4 VTS_I4 VTS_PI4 VTS_PI4 VTS_PI4;
690 InvokeHelper(0x34, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
691 lSX, lSY, pnPage, plX, plY);
692}
693
694void IMiDocView::ImageToClient(long nPage, long lX, long lY, long* plSX, long* plSY)
695{
696 static BYTE parms[] =
697 VTS_I4 VTS_I4 VTS_I4 VTS_PI4 VTS_PI4;
698 InvokeHelper(0x35, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
699 nPage, lX, lY, plSX, plSY);
700}
701
702void IMiDocView::GetVisibleRect(long* Left, long* Top, long* Right, long* Bottom)
703{
704 static BYTE parms[] =
705 VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4;
706 InvokeHelper(0x32, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
707 Left, Top, Right, Bottom);
708}
709
710void IMiDocView::MoveRectIntoView(long Left, long Top, long Right, long Bottom)
711{
712 static BYTE parms[] =
713 VTS_I4 VTS_I4 VTS_I4 VTS_I4;
714 InvokeHelper(0x33, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
715 Left, Top, Right, Bottom);
716}
717
718long IMiDocView::GetDocViewMode()
719{
720 long result;
721 InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
722 return result;
723}
724
725void IMiDocView::SetDocViewMode(long nNewValue)
726{
727 static BYTE parms[] =
728 VTS_I4;
729 InvokeHelper(0x17, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
730 nNewValue);
731}
732
733long IMiDocView::GetPageNum()
734{
735 long result;
736 InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
737 return result;
738}
739
740void IMiDocView::SetPageNum(long nNewValue)
741{
742 static BYTE parms[] =
743 VTS_I4;
744 InvokeHelper(0x3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
745 nNewValue);
746}
747
748void IMiDocView::GetScale(double* pdScaleX, double* pdScaleY)
749{
750 static BYTE parms[] =
751 VTS_PR8 VTS_PR8;
752 InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
753 pdScaleX, pdScaleY);
754}
755
756void IMiDocView::SetScale(double dScaleX, double dScaleY)
757{
758 static BYTE parms[] =
759 VTS_R8 VTS_R8;
760 InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
761 dScaleX, dScaleY);
762}
763
764long IMiDocView::GetFitMode()
765{
766 long result;
767 InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
768 return result;
769}
770
771void IMiDocView::SetFitMode(long nNewValue)
772{
773 static BYTE parms[] =
774 VTS_I4;
775 InvokeHelper(0xa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
776 nNewValue);
777}
778
779long IMiDocView::GetActionState()
780{
781 long result;
782 InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
783 return result;
784}
785
786void IMiDocView::SetActionState(long nNewValue)
787{
788 static BYTE parms[] =
789 VTS_I4;
790 InvokeHelper(0xb, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
791 nNewValue);
792}
793
794LPDISPATCH IMiDocView::GetTextSelection()
795{
796 LPDISPATCH result;
797 InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
798 return result;
799}
800
801void IMiDocView::SetTextSelection(LPDISPATCH newValue)
802{
803 static BYTE parms[] =
804 VTS_DISPATCH;
805 InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
806 newValue);
807}
808
809LPDISPATCH IMiDocView::GetImageSelection()
810{
811 LPDISPATCH result;
812 InvokeHelper(0x2f, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL);
813 return result;
814}
815
816void IMiDocView::SetImageSelection(LPDISPATCH newValue)
817{
818 static BYTE parms[] =
819 VTS_DISPATCH;
820 InvokeHelper(0x2f, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
821 newValue);
822}
823
824void IMiDocView::SelectAll(long nPage)
825{
826 static BYTE parms[] =
827 VTS_I4;
828 InvokeHelper(0x21, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
829 nPage);
830}
831
832void IMiDocView::MoveSelectionToView(LPDISPATCH pdispSelection)
833{
834 static BYTE parms[] =
835 VTS_DISPATCH;
836 InvokeHelper(0xd, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
837 pdispSelection);
838}
839
840void IMiDocView::SetLayerVisible(long Index, BOOL bNewValue)
841{
842 static BYTE parms[] =
843 VTS_I4 VTS_BOOL;
844 InvokeHelper(0x1d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
845 Index, bNewValue);
846}
847
848BOOL IMiDocView::GetLayerVisible(long Index)
849{
850 BOOL result;
851 static BYTE parms[] =
852 VTS_I4;
853 InvokeHelper(0x1d, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, parms,
854 Index);
855 return result;
856}
857
858
859/////////////////////////////////////////////////////////////////////////////
860// _IMiDocViewEvents properties
861
862/////////////////////////////////////////////////////////////////////////////
863// _IMiDocViewEvents operations
864
865
866/////////////////////////////////////////////////////////////////////////////
867// IMiDocSearch properties
868
869/////////////////////////////////////////////////////////////////////////////
870// IMiDocSearch operations
871
872void IMiDocSearch::Initialize(LPUNKNOWN piDoc, LPCTSTR strPattern, VARIANT* PageNum, VARIANT* WordIndex, VARIANT* StartAfterIndex, VARIANT* Backward, BOOL MatchMinus, BOOL MatchFullHalfWidthForm, BOOL MatchHiraganaKatakana, BOOL IgnoreSpace)
873{
874 static BYTE parms[] =
875 VTS_UNKNOWN VTS_BSTR VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_BOOL VTS_BOOL VTS_BOOL VTS_BOOL;
876 InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
877 piDoc, strPattern, PageNum, WordIndex, StartAfterIndex, Backward, MatchMinus, MatchFullHalfWidthForm, MatchHiraganaKatakana, IgnoreSpace);
878}
879
880void IMiDocSearch::Search(LPUNKNOWN pSearchCallback, LPDISPATCH* ppiSearchResult)
881{
882 static BYTE parms[] =
883 VTS_UNKNOWN VTS_PDISPATCH;
884 InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
885 pSearchCallback, ppiSearchResult);
886}
887