Index: trunk/MFCtooling/userlog/userlog.cpp
===================================================================
--- trunk/MFCtooling/userlog/userlog.cpp	(revision 60)
+++ trunk/MFCtooling/userlog/userlog.cpp	(revision 61)
@@ -272,4 +272,6 @@
 	HWND scrollBarHandle = NULL;
 	int retVal = 0;
+	int pointx = -1;
+	int pointy = -1;
 
 	// debug vars
@@ -322,4 +324,16 @@
 	}
 
+	if( msg->message==WM_LBUTTONUP || msg->message==WM_RBUTTONUP || msg->message==WM_MBUTTONUP ||
+		msg->message==WM_LBUTTONDOWN || msg->message==WM_RBUTTONDOWN || msg->message==WM_MBUTTONDOWN ||
+		msg->message==WM_LBUTTONDBLCLK || msg->message==WM_RBUTTONDBLCLK || msg->message==WM_MBUTTONDBLCLK) {
+		
+		RECT r;
+		DWORD dCursorPos = GetMessagePos();
+		GetWindowRect(msg->hwnd, &r);
+		//dont log absolut coordinates but relativ ones so you can use them in rule "LeftClickRelativ"
+		pointx = GET_X_LPARAM(dCursorPos)-r.left;
+		pointy = GET_Y_LPARAM(dCursorPos)-r.top;
+	}
+
 	if( msg->message==WM_NCLBUTTONDOWN ) {
 		if( msg->wParam==HTMENU ) {
@@ -372,38 +386,29 @@
 		msg->message==WM_LBUTTONDBLCLK || msg->message==WM_RBUTTONDBLCLK || msg->message==WM_MBUTTONDBLCLK) {
 		
-		//if( msg->time>-1 )
-		//{
-			if(msg->message == WM_LBUTTONUP)
+		
+		pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.x\" value=\"%i\"/>", pointx);
+		pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.y\" value=\"%i\"/>", pointy);
+			
+		if(msg->message == WM_LBUTTONUP)
+		{
+			//check the listBox selection, store it in "scrollPos"
+			//no selection = -1
+			//this is only working for listBoxes with style 'selection = single'
+			retVal = GetClassName(msg->hwnd, buffer, 128);
+			if( retVal >= -1  && retVal < MAXINT && !lstrcmpi(buffer, L"ListBox") )
 			{
-				RECT r;
-				DWORD dCursorPos = GetMessagePos();
-				GetWindowRect(msg->hwnd, &r);
-
-				//dont log absolut coordinates but relativ ones so you can use them in rule "LeftClickRelativ"
-				pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.x\" value=\"%i\"/>", GET_X_LPARAM(dCursorPos)-r.left);
-				pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.y\" value=\"%i\"/>", GET_Y_LPARAM(dCursorPos)-r.top);
-
-
-				//check the listBox selection, store it in "scrollPos"
-				//no selection = -1
-				//this is only working for listBoxes with style 'selection = single'
-				retVal = GetClassName(msg->hwnd, buffer, 128);
-				if( retVal >= -1  && retVal < MAXINT && !lstrcmpi(buffer, L"ListBox") )
-				{
-					scrollPos = (int)SendMessage(msg->hwnd, LB_GETCURSEL, 0, 0);
-					pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos);
-				}
-
-
-				//check the TabControl selection, store it in "scrollPos"
-				//no selection = -1
-				retVal = GetClassName(msg->hwnd, buffer, 128);
-				if( retVal >= -1  && retVal < MAXINT && !lstrcmpi(buffer, L"SysTabControl32") )
-				{
-					scrollPos = (int)SendMessage(msg->hwnd, (UINT)4875, 0, 0);
-					pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos);
-				}
+				scrollPos = (int)SendMessage(msg->hwnd, LB_GETCURSEL, 0, 0);
+				pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos);
 			}
-		//}
+
+			//check the TabControl selection, store it in "scrollPos"
+			//no selection = -1
+			retVal = GetClassName(msg->hwnd, buffer, 128);
+			if( retVal >= -1  && retVal < MAXINT && !lstrcmpi(buffer, L"SysTabControl32") )
+			{
+				scrollPos = (int)SendMessage(msg->hwnd, (UINT)4875, 0, 0);
+				pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos);
+			}
+		}
 	}
 	if( msg->message==WM_MOUSEACTIVATE ) {
