Beispiel #1
0
        public ExSkin(ExSkin pOwner, byte[] pLayout, int hTheme = 0)
        {
            IntPtr hWndParent = pOwner == null ? IntPtr.Zero : pOwner.Handle;

            if (ExAPI.Ex_DUICreateFromLayout(hWndParent, (IntPtr)hTheme, pLayout, pLayout.Length, out m_hWnd, out m_hExDUI))
            {
            }
            else
            {
                throw new ExException(ExStatus.HANDLE_INVALID, "绑定皮肤失败");
            }
        }
Beispiel #2
0
        public ExSkin(ExSkin pOwner, string sClassName, string sWindowName, int x, int y, int nWidth, int nHeight, int dwStyleDUI,
                      int dwStyle = 0, int dwStyleEx = 0, int hTheme = 0, ExWndProcDelegate pfnWndProc = null)
        {
            IntPtr hWndParent = pOwner == null ? IntPtr.Zero : pOwner.Handle;

            m_hWnd = ExWindow.Create(hWndParent, sClassName, sWindowName, x, y, nWidth, nHeight, dwStyle, dwStyleEx);
            if (m_hWnd != IntPtr.Zero)
            {
                m_hExDUI = ExAPI.Ex_DUIBindWindowEx(m_hWnd, (IntPtr)hTheme, dwStyleDUI, 0, pfnWndProc);
                if (m_hExDUI != IntPtr.Zero)
                {
                }
                else
                {
                    throw new ExException(ExStatus.HANDLE_INVALID, "绑定皮肤失败");
                }
            }
            else
            {
                throw new ExException(ExStatus.HANDLE_INVALID, "创建窗口失败");
            }
        }