⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msword8.c

📁 机械工业出版社 Lab Windows/CVI逐步深入与开发实例源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
#include <userint.h>
#include "sample16.h"
#include "msword8.h"

HRESULT CVIFUNC Word_GetProperty (CAObjHandle objectHandle, ERRORINFO *errorInfo,
                                  unsigned int propertyID,
                                  unsigned int propertyType, void *value)
{
	HRESULT __result;

	__result = CA_PropertyGet (objectHandle, errorInfo, propertyID,
	                           propertyType, value);

	return __result;
}

HRESULT CVIFUNC Word_SetProperty (CAObjHandle objectHandle, ERRORINFO *errorInfo,
                                  unsigned int propertyID,
                                  unsigned int propertyType, ...)
{
	HRESULT __result;
	va_list args;

	va_start (args, propertyType);

	__result = CA_PropertySetV (objectHandle, errorInfo, propertyID,
	                            propertyType, args);

	va_end (args);

	return __result;
}

HRESULT CVIFUNC Word_NewLetterContent (char *server, CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F1, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_CreateObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_OpenLetterContent (char *fileName, char *server,
                                        CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F1, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_LoadObjectFromFileByClassId (fileName, &clsid, server,
	                                           objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_ActiveLetterContent (char *server,
                                          CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F1, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_GetActiveObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_NewOLEControl (char *server, CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F2, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_CreateObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_OpenOLEControl (char *fileName, char *server,
                                     CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F2, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_LoadObjectFromFileByClassId (fileName, &clsid, server,
	                                           objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_ActiveOLEControl (char *server, CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F2, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_GetActiveObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_OLEControlSelect (CAObjHandle objectHandle,
                                       ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x80010220,
	                            CAVT_EMPTY, NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_OLEControlCopy (CAObjHandle objectHandle,
                                     ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x80010228,
	                            CAVT_EMPTY, NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_OLEControlCut (CAObjHandle objectHandle,
                                    ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x80010229,
	                            CAVT_EMPTY, NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_OLEControlDelete (CAObjHandle objectHandle,
                                       ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x80010250,
	                            CAVT_EMPTY, NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_OLEControlActivate (CAObjHandle objectHandle,
                                         ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x80010251,
	                            CAVT_EMPTY, NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_NewParagraphFmt (char *server, CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F4, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_CreateObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_OpenParagraphFmt (char *fileName, char *server,
                                       CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F4, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_LoadObjectFromFileByClassId (fileName, &clsid, server,
	                                           objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_ActiveParagraphFmt (char *server, CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F4, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_GetActiveObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtCloseUp (CAObjHandle objectHandle,
                                          ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x12D, CAVT_EMPTY,
	                            NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtOpenUp (CAObjHandle objectHandle,
                                         ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x12E, CAVT_EMPTY,
	                            NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtOpenOrCloseUp (CAObjHandle objectHandle,
                                                ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x12F, CAVT_EMPTY,
	                            NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtTabHangingIndent (CAObjHandle objectHandle,
                                                   ERRORINFO *errorInfo,
                                                   short count)
{
	HRESULT __result;
	unsigned int __paramTypes[] = {CAVT_SHORT};

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x130, CAVT_EMPTY,
	                            NULL, 1, __paramTypes, count);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtTabIndent (CAObjHandle objectHandle,
                                            ERRORINFO *errorInfo, short count)
{
	HRESULT __result;
	unsigned int __paramTypes[] = {CAVT_SHORT};

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x132, CAVT_EMPTY,
	                            NULL, 1, __paramTypes, count);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtReset (CAObjHandle objectHandle,
                                        ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x138, CAVT_EMPTY,
	                            NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtSpace1 (CAObjHandle objectHandle,
                                         ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x139, CAVT_EMPTY,
	                            NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtSpace15 (CAObjHandle objectHandle,
                                          ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x13A, CAVT_EMPTY,
	                            NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtSpace2 (CAObjHandle objectHandle,
                                         ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x13B, CAVT_EMPTY,
	                            NULL, 0, NULL);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtIndentCharWidth (CAObjHandle objectHandle,
                                                  ERRORINFO *errorInfo,
                                                  short count)
{
	HRESULT __result;
	unsigned int __paramTypes[] = {CAVT_SHORT};

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x140, CAVT_EMPTY,
	                            NULL, 1, __paramTypes, count);

	return __result;
}

HRESULT CVIFUNC Word_ParagraphFmtIndent1stLnChrWidth (CAObjHandle objectHandle,
                                                      ERRORINFO *errorInfo,
                                                      short count)
{
	HRESULT __result;
	unsigned int __paramTypes[] = {CAVT_SHORT};

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x142, CAVT_EMPTY,
	                            NULL, 1, __paramTypes, count);

	return __result;
}

HRESULT CVIFUNC Word_NewFont (char *server, CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F5, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_CreateObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_OpenFont (char *fileName, char *server,
                               CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F5, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_LoadObjectFromFileByClassId (fileName, &clsid, server,
	                                           objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_ActiveFont (char *server, CAObjHandle *objectHandle)
{
	HRESULT __result;
	GUID clsid = {0x209F5, 0x0, 0x0, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x46};

	__result = CA_GetActiveObjectByClassId (&clsid, server, objectHandle);

	return __result;
}

HRESULT CVIFUNC Word_FontGrow (CAObjHandle objectHandle, ERRORINFO *errorInfo)
{
	HRESULT __result;

	__result = CA_MethodInvoke (objectHandle, errorInfo, 0x64, CAVT_EMPTY,
	                            NULL, 0, NULL);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -