diff --git a/trunk/ProcessHacker/Components/ExtendedListView.cs b/trunk/ProcessHacker/Components/ExtendedListView.cs
index c325b9639..58a6fa272 100644
--- a/trunk/ProcessHacker/Components/ExtendedListView.cs
+++ b/trunk/ProcessHacker/Components/ExtendedListView.cs
@@ -38,6 +38,8 @@ namespace ProcessHacker
private const int LVM_SetExtendedListViewStyle = (LVM_First + 54); // Sets extended styles in list-view controls.
private const int LVS_Ex_DoubleBuffer = 0x00010000; // Paints via double-buffering, which reduces flicker. also enables alpha-blended marquee selection.
+ private const int LVN_LINKCLICK = (LVM_First - 84);
+
private delegate void CallBackSetGroupState(ListViewGroup lvGroup, ListViewGroupState lvState, string task);
private delegate void CallbackSetGroupString(ListViewGroup lvGroup, string value);
@@ -125,38 +127,41 @@ namespace ProcessHacker
protected override void OnNotifyMessage(Message m)
{
- bool handled = false;
+ //notification for linkclick never reaches here?
+ //http://msdn.microsoft.com/en-us/library/bb774851%28VS.85%29.aspx
+
+ //System.Diagnostics.Debug.WriteLine(m.ToString());
if (WM_NOTIFY == m.Msg)
{
- //System.Diagnostics.Debug.WriteLine(m.Msg);
-
- //NMHDR header = (NMHDR)Marshal.PtrToStructure(m.LParam, typeof(NMHDR));
- //if (0 == header.code)
- //{
- // // TODO: handle notification here
- // handled = true;
- //}
+ NMHDR nmHdr = new NMHDR();
+ Marshal.PtrToStructure(m.LParam, nmHdr);
+ if (nmHdr.code != 0)
+ {
+ switch (nmHdr.code)
+ {
+ case LVN_LINKCLICK:
+ {
+ break;
+ }
+ }
+ }
}
//Filter out the WM_ERASEBKGND message and prevent any type of flickering
- if (m.Msg != 0x14 && !handled)
+ if (m.Msg != 0x14)
{
base.OnNotifyMessage(m);
}
}
- private struct NMHDR
- {
- public IntPtr hwndFrom;
- public int idFrom;
- public int code;
- }
-
private const int WM_NOTIFY = 0x004E;
protected override void WndProc(ref Message m)
{
+ //notification for linkclick never reaches here?
+ //System.Diagnostics.Debug.WriteLine(m.ToString());
+
switch (m.Msg)
{
case 0x1: /*WM_CREATE*/
@@ -172,11 +177,8 @@ namespace ProcessHacker
base.DefWndProc(ref m);
break;
}
- default:
- {
- break;
- }
}
+
base.WndProc(ref m);
}
@@ -311,6 +313,62 @@ namespace ProcessHacker
///
public uint CchSubsetTitle;
}
+
+ //http://msdn.microsoft.com/en-us/library/ms229669.aspx
+ //http://msdn.microsoft.com/en-us/magazine/dvdarchive/cc163384.aspx
+ ///
+ /// WM_NOTIFY notificaiton message header.
+ ///
+ [StructLayout(LayoutKind.Sequential)]
+ public class NMHDR
+ {
+ ///
+ /// Window handle to the control sending a message.
+ ///
+ private IntPtr hwndFrom;
+ ///
+ /// Identifier of the control sending a message.
+ ///
+ public uint idFrom;
+ ///
+ /// Notification code. This member can be a control-specific notification code or it can be one of the common notification codes.
+ ///
+ public uint code;
+ }
+
+ ///
+ /// Native representation of a point.
+ ///
+ public struct POINT
+ {
+ ///
+ /// The x-coordinate of the point.
+ ///
+ public int X;
+ ///
+ /// The y-coordinate of the point.
+ ///
+ public int Y;
+ }
+
+ ///
+ /// Native representation of TVHITTESTINFO.
+ ///
+ public struct TVHITTESTINFO
+ {
+ ///
+ /// Client coordinates of the point to test.
+ ///
+ public POINT pt;
+ ///
+ /// Variable that receives information about the results of a hit test.
+ ///
+ public uint flags;
+ ///
+ /// Handle to the item that occupies the point.
+ ///
+ public IntPtr hItem;
+ }
}
[Flags]
diff --git a/trunk/ProcessHacker/Forms/PEWindow.cs b/trunk/ProcessHacker/Forms/PEWindow.cs
index c5816e50f..842867479 100644
--- a/trunk/ProcessHacker/Forms/PEWindow.cs
+++ b/trunk/ProcessHacker/Forms/PEWindow.cs
@@ -300,10 +300,7 @@ namespace ProcessHacker
}
//we set Groupstate here else there are no groups to set state
- listImports.SetGroupState(ListViewGroupState.Normal | ListViewGroupState.Collapsible);
-
- //foreach (ListViewGroup lvg in listImports.Groups) //Works - just commented out
- //listImports.SetGroupFooter(lvg, "Imports " + lvg.Items.Count + " " + lvg.Header.ToLower() + " item(s)...");
+ listImports.SetGroupState(ListViewGroupState.Collapsed | ListViewGroupState.Collapsible, "Properties");
#endregion
}