Index: /trunk/MFCtooling/userlog/userlog.cpp
===================================================================
--- /trunk/MFCtooling/userlog/userlog.cpp	(revision 164)
+++ /trunk/MFCtooling/userlog/userlog.cpp	(revision 165)
@@ -21,5 +21,5 @@
 
 #ifdef __USING_COSTUMLOG__
-static std::ofstream logfile;
+static std::wofstream logfile;
 #endif
 
@@ -29,4 +29,9 @@
 static unsigned long long totalMsgCounter = 0;
 static bool msgCounterChange = false;
+#endif
+
+#ifndef MAXINT
+#define MAXUINT ((UINT)~((UINT)0))
+#define MAXINT ((INT(MAXUINT >> 1))
 #endif
 
@@ -395,5 +400,5 @@
 		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)
 		{
@@ -408,4 +413,12 @@
 			}
 
+
+			retVal = GetClassName(msg->hwnd, buffer, 128);
+			if( retVal >= -1  && retVal < MAXINT && (!lstrcmpi(buffer, L"ComboLBox")||!lstrcmpi(buffer, L"ComboBox")) )
+			{
+				scrollPos = (int)SendMessage(msg->hwnd, CB_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
@@ -506,5 +519,5 @@
 	logfile << currentTime.wHour << ":" << currentTime.wMinute << ":" << currentTime.wSecond << ":";
 	logfile << currentTime.wMilliseconds << "\t";
-	logfile << buffer << std::endl;
+	logfile << LOGPREFIX << msgBuffer << std::endl;
 #endif
 	delete messageStr;
