Exemplo n.º 1
0
        public void Register(WindowMore target)
        {
            Unregister();
              TargetWindow = target;

              if (0 != DWM.DwmRegisterThumbnail(TargetWindow.Handle, SourceWindow.Handle, out thumb_ptr_))
              {
            throw new Exception("Fix me: Unable to register thumbnail. Need to report the error.");
              }

              Update();
        }
        public ThumbnailViewWindow(IntPtr sourceHandle)
        {
            //WindowStyle = System.Windows.WindowStyle.None;
              InitializeComponent();

              thumbnail_source_ = null;
              SourceWindow = new WindowMore(sourceHandle);

              Title = SourceWindow.Title;
              WindowStyle = System.Windows.WindowStyle.None;
              ResizeMode = System.Windows.ResizeMode.NoResize;
              BorderThickness = new Thickness(0.0);

              Left = 0.0;
              Top = 0.0;
              Width = 0.0;
              Height = 0.0;
              Opacity = 0.0;
        }
Exemplo n.º 3
0
 public Thumbnail(WindowMore source)
 {
     SourceWindow = source;
 }
Exemplo n.º 4
0
        private void Window_SourceInitialized(object sender, EventArgs e)
        {
            var handle = new More.WindowMore(this).Handle;
              var src = HwndSource.FromHwnd(handle);
              src.AddHook(new HwndSourceHook(WndProc));

              ShellMessageNotifyID = User32.RegisterWindowMessageA("SHELLHOOK");
              User32.RegisterShellHookWindow(handle);
        }
Exemplo n.º 5
0
        private void Window_Closed(object sender, EventArgs e)
        {
            var handle = new More.WindowMore(this).Handle;
              var src = HwndSource.FromHwnd(handle);
              src.RemoveHook(new HwndSourceHook(this.WndProc));

              User32.DeregisterShellHookWindow(handle);
        }