Esempio n. 1
0
		void MSDNMagazine.Shell.HelperItems.IShellView.GetCurrentInfo( ref MSDNMagazine.Shell.HelperItems.FOLDERSETTINGS pfs)
		{
			pfs = this.m_folderSettings;
		}
Esempio n. 2
0
		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() );

		}
Esempio n. 3
0
		public void OnAction(MSDNMagazine.Shell.ShellActionType t)
		{

			if ( t == MSDNMagazine.Shell.ShellActionType.Open ) 
			{

				try 
				{
					System.IO.StreamWriter sw = new System.IO.StreamWriter( this.m_folder.SelectedItem, false );

					sw.WriteLine( Guid.NewGuid().ToString() );
					sw.Close();
				}
				catch
				{
				}
			}

			if ( t == MSDNMagazine.Shell.ShellActionType.Save ) 
			{
				MessageBox.Show("save");
			}

			if ( t == MSDNMagazine.Shell.ShellActionType.Unknown ) 
			{
				MessageBox.Show("beats the hell out of me!");
			}


		}
Esempio n. 4
0
		internal EnumIDList( MSDNMagazine.Shell.HelperItems.EnumIDList il )
		{
			this.m_items = new System.Collections.ArrayList( il.m_items );
			this.m_position = il.m_position;
		}
Esempio n. 5
0
		void MSDNMagazine.Shell.HelperItems.IShellFolder.GetDisplayNameOf( IntPtr pidl, uint uFlags, out MSDNMagazine.Shell.HelperItems.STRRET pName) 
		{
			pName.sString = this.m_workingDir;
			pName.uType = 0;

			if ( pidl.ToInt32() == 0 )
				throw( new COMException(null,0x8000) );
			

			short cookie = Marshal.ReadInt16( pidl, 2 );

			if ( cookie == 255 ) 
			{
				pName.sString = m_currentItem;
			}

		}
Esempio n. 6
0
		void MSDNMagazine.Shell.HelperItems.IShellFolder.EnumObjects( int hwnd, int grfFlags, ref MSDNMagazine.Shell.HelperItems.IEnumIDList ppenumIDList) 
		{
			ppenumIDList = null;
		}