示例#1
0
        ////////////////
        /// Get/Put BorderColor
        private void TestBorderColor()
        {
            int hr;
            int ColorRef1, ColorRef2;

            // Read the current value
            hr = m_ivw.get_BorderColor(out ColorRef1);
            Marshal.ThrowExceptionForHR(hr);

            ColorRef1++;

            // Change it
            hr = m_ivw.put_BorderColor(ColorRef1);
            Marshal.ThrowExceptionForHR(hr);

            // Re-read
            hr = m_ivw.get_BorderColor(out ColorRef2);
            Marshal.ThrowExceptionForHR(hr);

            // Make sure the value we set is what we just read
            Debug.Assert(ColorRef1 == ColorRef2, "Put/Get Border Color");
        }