Changeset 165


Ignore:
Timestamp:
08/17/11 10:38:58 (13 years ago)
Author:
sherbold
Message:
  • fixed USING_COSTUMLOG output
  • added define MAXINT in case it is missing
  • added selection storage for ComboLBoxes for better replays
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MFCtooling/userlog/userlog.cpp

    r64 r165  
    2121 
    2222#ifdef __USING_COSTUMLOG__ 
    23 static std::ofstream logfile; 
     23static std::wofstream logfile; 
    2424#endif 
    2525 
     
    2929static unsigned long long totalMsgCounter = 0; 
    3030static bool msgCounterChange = false; 
     31#endif 
     32 
     33#ifndef MAXINT 
     34#define MAXUINT ((UINT)~((UINT)0)) 
     35#define MAXINT ((INT(MAXUINT >> 1)) 
    3136#endif 
    3237 
     
    395400                pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.x\" value=\"%i\"/>", pointx); 
    396401                pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.y\" value=\"%i\"/>", pointy); 
    397                          
     402 
    398403                if(msg->message == WM_LBUTTONUP) 
    399404                { 
     
    408413                        } 
    409414 
     415 
     416                        retVal = GetClassName(msg->hwnd, buffer, 128); 
     417                        if( retVal >= -1  && retVal < MAXINT && (!lstrcmpi(buffer, L"ComboLBox")||!lstrcmpi(buffer, L"ComboBox")) ) 
     418                        { 
     419                                scrollPos = (int)SendMessage(msg->hwnd, CB_GETCURSEL, 0, 0); 
     420                                pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos); 
     421                        } 
     422 
    410423                        //check the TabControl selection, store it in "scrollPos" 
    411424                        //no selection = -1 
     
    506519        logfile << currentTime.wHour << ":" << currentTime.wMinute << ":" << currentTime.wSecond << ":"; 
    507520        logfile << currentTime.wMilliseconds << "\t"; 
    508         logfile << buffer << std::endl; 
     521        logfile << LOGPREFIX << msgBuffer << std::endl; 
    509522#endif 
    510523        delete messageStr; 
Note: See TracChangeset for help on using the changeset viewer.