Ejemplo n.º 1
0
        private IntPtr CtrlWndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam)
        {
            if (!m_WndProcMap.ContainsKey(hWnd))
            {
                return(WinAPI.defWindowProc(hWnd, msg, wParam, lParam));
            }

            IntPtr nRet = WinAPI.CallWindowProc(m_WndProcMap[hWnd], hWnd, msg, wParam, lParam);

            switch (msg)
            {
            case Constants.WM_PAINT:
            case Constants.WM_CTLCOLOREDIT:
            case Constants.WM_CTLCOLORBTN:
            case Constants.WM_CTLCOLORSTATIC:
            case Constants.WM_CTLCOLORMSGBOX:
            case Constants.WM_CTLCOLORDLG:
            case Constants.WM_CTLCOLORLISTBOX:
            case Constants.WM_CTLCOLORSCROLLBAR:
            case Constants.WM_CAPTURECHANGED:
                RefreshCtrl();
                break;

            default:
                break;
            }

            return(nRet);
        }