コード例 #1
0
ファイル: TheWordAPI.cs プロジェクト: rubiot/TheWordTools
            public COPYDATASTRUCT_REF(uint op, GoToRefMessage msg)
            {
                IntPtr structPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(msg));

                Marshal.StructureToPtr(msg, structPtr, false);

                dwData = op;
                lpData = structPtr;
                cbData = Marshal.SizeOf(msg);
            }
コード例 #2
0
ファイル: TheWordAPI.cs プロジェクト: rubiot/TheWordTools
        static public int SynchronizeRef(byte book, byte chapter, byte verse)
        {
            int            hWnd = FindWindow(TheWordClassName, null);
            GoToRefMessage msg  = new GoToRefMessage()
            {
                span = 0, bi = book, ci = chapter, vi = verse
            };
            COPYDATASTRUCT_REF cds = new COPYDATASTRUCT_REF(COPYDATA_OP_GOTOVERSE, msg);

            return(SendMessage(hWnd, WM_COPYDATA, 0, ref cds));
        }