Ejemplo n.º 1
0
        /// <summary>
        /// Open a Wintab context that will send packet events to a message window.
        /// </summary>
        /// <returns>Returns true if successful.</returns>
        public bool Open()
        {
            // Get the handle of the anonymous MessageEvents window. This is a
            // static (global) object, so there's only one of these at a time.
            HWND hwnd = MessageEvents.WindowHandle;

            m_hCTX = CWintabFuncs.WTOpen(hwnd, ref m_logContext, true);

            return(m_hCTX.IsValid);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Open a Wintab context to the specified hwnd.
        /// </summary>
        /// <param name="hwnd_I">parent window for the context</param>
        /// <param name="enable_I">true to enable, false to disable</param>
        /// <returns>Returns non-zero context handle if successful.</returns>
        public HCTX Open(HWND hwnd_I, bool enable_I)
        {
            try
            {
                m_hCTX = CWintabFuncs.WTOpen(hwnd_I, ref m_logContext, enable_I);
            }
            catch (Exception ex)
            {
                MessageBox.Show("FAILED OpenContext: " + ex.ToString());
            }

            return(m_hCTX);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Open a Wintab context that will send packet events to a message window.
        /// </summary>
        /// <returns>Returns true if successful.</returns>
        public bool Open()
        {
            // Get the handle of the anonymous MessageEvents window. This is a
            // static (global) object, so there's only one of these at a time.
            HWND hwnd = MessageEvents.WindowHandle;

            try
            {
                m_hCTX = CWintabFuncs.WTOpen(hwnd, ref m_logContext, true);
            }
            catch (Exception ex)
            {
                MessageBox.Show("FAILED OpenContext: " + ex.ToString());
            }

            return(m_hCTX.IsValid);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Open a Wintab context to the specified hwnd.
        /// </summary>
        /// <param name="hwnd_I">parent window for the context</param>
        /// <param name="enable_I">true to enable, false to disable</param>
        /// <returns>Returns non-zero context handle if successful.</returns>
        public HCTX Open(HWND hwnd_I, bool enable_I)
        {
            m_hCTX = CWintabFuncs.WTOpen(hwnd_I, ref m_logContext, enable_I);

            return(m_hCTX);
        }