コード例 #1
0
 public ExSkin(ExWindow pWindow, int dwStyleDUI, int hTheme = 0, ExWndProcDelegate pfnWndProc = null)
 {
     m_hExDUI = ExAPI.Ex_DUIBindWindowEx(pWindow.WindowHandle, (IntPtr)hTheme, dwStyleDUI, 0, pfnWndProc);
     if (m_hExDUI != IntPtr.Zero)
     {
     }
     else
     {
         throw new ExException(ExStatus.HANDLE_INVALID, "绑定皮肤失败");
     }
 }
コード例 #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, "创建窗口失败");
            }
        }