public ShellView( ShellFolder m ) { this.m_mc = m; this.h = new MSDNMagazine.Shell.HelperItems.HookStuff.HookProc( this.OnDialogMsg ); }
void MSDNMagazine.Shell.HelperItems.IShellView.CreateViewWindow(IntPtr psvPrevious, ref MSDNMagazine.Shell.HelperItems.FOLDERSETTINGS pfs, MSDNMagazine.Shell.HelperItems.IShellBrowser psb, ref MSDNMagazine.Shell.HelperItems.RECT prcView, ref IntPtr phWnd) { this.m_folderSettings.ViewMode = pfs.ViewMode; this.m_folderSettings.fFlags = pfs.fFlags; this.m_form = this.m_mc.m_form; IntPtr hwnd = IntPtr.Zero; this.m_shell = psb; this.m_shell.GetWindow(out hwnd); ShellFolder.SetParent(m_form.Handle, hwnd); phWnd = m_form.Handle; int w = prcView.right - prcView.left; int h = prcView.bottom - prcView.top; ShellFolder.SetWindowLong(m_form.Handle, -16, 0x40000000); ShellFolder.SetWindowPos(m_form.Handle, 0, 0, 0, w, h, 0x0017); m_form.Location = new System.Drawing.Point(prcView.left, prcView.top); m_form.Size = new System.Drawing.Size(prcView.right - prcView.left, prcView.bottom - prcView.top); m_form.Show(); MSDNMagazine.Shell.HelperItems.HookStuff.SetFocus(hwnd); // CWPRETSTRUCT this.m_hhook = MSDNMagazine.Shell.HelperItems.HookStuff.SetWindowsHookEx(12, this.h, IntPtr.Zero, MSDNMagazine.Shell.HelperItems.HookStuff.GetCurrentThreadId()); }
public ShellView(ShellFolder m) { this.m_mc = m; this.h = new MSDNMagazine.Shell.HelperItems.HookStuff.HookProc(this.OnDialogMsg); }