MapSuiteGisEditor/GisEditorToolKits/GisEditorToolkits/WpfCustomFileDialog/FileDialogHelper.cs
//RECT _originalDialogClientRect = new RECT();
/// <summary>
/// WndProc for the custom child window
/// </summary>
/// <param name="hwnd"></param>
/// <param name="msg"></param>
/// <param name="wParam"></param>
/// <param name="lParam"></param>
/// <param name="handled"></param>
/// <returns></returns>
WndProc for the custom child window
WndProc for the custom child window
IntPtr EmbededWndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            IntPtr hres = IntPtr.Zero;
            const int DLGC_WANTALLKEYS = 0x0004;
            switch ((NativeMethods.Msg)msg)
            {
                case NativeMethods.Msg.WM_ACTIVATE:
                    break;
                case NativeMethods.Msg.WM_SHOWWINDOW:
                    break;
                case NativeMethods.Msg.WM_DESTROY:
                    break;
                case NativeMethods.Msg.WM_SYSKEYDOWN:
                    SetChildStyle(true);
                    break;
                case NativeMethods.Msg.WM_SYSKEYUP:
                    SetChildStyle(false);
                    break;
                case NativeMethods.Msg.WM_KEYDOWN:
                case NativeMethods.Msg.WM_KEYUP:
                    handled = false;
                    break;
                case NativeMethods.Msg.WM_GETDLGCODE:
                    if (lParam != IntPtr.Zero)
                    {
                        hres = (IntPtr)DLGC_WANTALLKEYS;
                    }
                    handled = true;
                    break;
                case NativeMethods.Msg.WM_NCDESTROY:
                    break;
                case NativeMethods.Msg.WM_WINDOWPOSCHANGING:
                    break;
                case NativeMethods.Msg.WM_SIZING:
                    break;
                case NativeMethods.Msg.WM_SIZE:
                    break;
            }
            return hres;
        }
IntPtr EmbededWndProc ( IntPtr hwnd , int msg , IntPtr wParam , IntPtr lParam , ref bool handled ) { IntPtr hres = IntPtr . Zero ; const int DLGC_WANTALLKEYS = 0x0004 ; switch ( ( NativeMethods . Msg ) msg ) { case NativeMethods . Msg . WM_ACTIVATE : break ; case NativeMethods . Msg . WM_SHOWWINDOW : break ; case NativeMethods . Msg . WM_DESTROY : break ; case NativeMethods . Msg . WM_SYSKEYDOWN : SetChildStyle ( true ) ; break ; case NativeMethods . Msg . WM_SYSKEYUP : SetChildStyle ( false ) ; break ; case NativeMethods . Msg . WM_KEYDOWN : case NativeMethods . Msg . WM_KEYUP : handled = false ; break ; case NativeMethods . Msg . WM_GETDLGCODE : if ( lParam != IntPtr . Zero ) { hres = ( IntPtr ) DLGC_WANTALLKEYS ; } handled = true ; break ; case NativeMethods . Msg . WM_NCDESTROY : break ; case NativeMethods . Msg . WM_WINDOWPOSCHANGING : break ; case NativeMethods . Msg . WM_SIZING : break ; case NativeMethods . Msg . WM_SIZE : break ; } return hres ; }
WndProc for the custom child window
WndProc for the custom child window
//see http://support.microsoft.com/kb/83302 //switch ends
None
hwnd
IntPtr
None
msg
int
None
wParam
IntPtr
None
lParam
IntPtr
None
bool
ref
handled
None