Changeset 61 for trunk/MFCtooling/userlog/userlog.cpp
- Timestamp:
- 06/15/11 10:48:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MFCtooling/userlog/userlog.cpp
r60 r61 272 272 HWND scrollBarHandle = NULL; 273 273 int retVal = 0; 274 int pointx = -1; 275 int pointy = -1; 274 276 275 277 // debug vars … … 322 324 } 323 325 326 if( msg->message==WM_LBUTTONUP || msg->message==WM_RBUTTONUP || msg->message==WM_MBUTTONUP || 327 msg->message==WM_LBUTTONDOWN || msg->message==WM_RBUTTONDOWN || msg->message==WM_MBUTTONDOWN || 328 msg->message==WM_LBUTTONDBLCLK || msg->message==WM_RBUTTONDBLCLK || msg->message==WM_MBUTTONDBLCLK) { 329 330 RECT r; 331 DWORD dCursorPos = GetMessagePos(); 332 GetWindowRect(msg->hwnd, &r); 333 //dont log absolut coordinates but relativ ones so you can use them in rule "LeftClickRelativ" 334 pointx = GET_X_LPARAM(dCursorPos)-r.left; 335 pointy = GET_Y_LPARAM(dCursorPos)-r.top; 336 } 337 324 338 if( msg->message==WM_NCLBUTTONDOWN ) { 325 339 if( msg->wParam==HTMENU ) { … … 372 386 msg->message==WM_LBUTTONDBLCLK || msg->message==WM_RBUTTONDBLCLK || msg->message==WM_MBUTTONDBLCLK) { 373 387 374 //if( msg->time>-1 ) 375 //{ 376 if(msg->message == WM_LBUTTONUP) 388 389 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.x\" value=\"%i\"/>", pointx); 390 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.y\" value=\"%i\"/>", pointy); 391 392 if(msg->message == WM_LBUTTONUP) 393 { 394 //check the listBox selection, store it in "scrollPos" 395 //no selection = -1 396 //this is only working for listBoxes with style 'selection = single' 397 retVal = GetClassName(msg->hwnd, buffer, 128); 398 if( retVal >= -1 && retVal < MAXINT && !lstrcmpi(buffer, L"ListBox") ) 377 399 { 378 RECT r; 379 DWORD dCursorPos = GetMessagePos(); 380 GetWindowRect(msg->hwnd, &r); 381 382 //dont log absolut coordinates but relativ ones so you can use them in rule "LeftClickRelativ" 383 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.x\" value=\"%i\"/>", GET_X_LPARAM(dCursorPos)-r.left); 384 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"point.y\" value=\"%i\"/>", GET_Y_LPARAM(dCursorPos)-r.top); 385 386 387 //check the listBox selection, store it in "scrollPos" 388 //no selection = -1 389 //this is only working for listBoxes with style 'selection = single' 390 retVal = GetClassName(msg->hwnd, buffer, 128); 391 if( retVal >= -1 && retVal < MAXINT && !lstrcmpi(buffer, L"ListBox") ) 392 { 393 scrollPos = (int)SendMessage(msg->hwnd, LB_GETCURSEL, 0, 0); 394 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos); 395 } 396 397 398 //check the TabControl selection, store it in "scrollPos" 399 //no selection = -1 400 retVal = GetClassName(msg->hwnd, buffer, 128); 401 if( retVal >= -1 && retVal < MAXINT && !lstrcmpi(buffer, L"SysTabControl32") ) 402 { 403 scrollPos = (int)SendMessage(msg->hwnd, (UINT)4875, 0, 0); 404 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos); 405 } 400 scrollPos = (int)SendMessage(msg->hwnd, LB_GETCURSEL, 0, 0); 401 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos); 406 402 } 407 //} 403 404 //check the TabControl selection, store it in "scrollPos" 405 //no selection = -1 406 retVal = GetClassName(msg->hwnd, buffer, 128); 407 if( retVal >= -1 && retVal < MAXINT && !lstrcmpi(buffer, L"SysTabControl32") ) 408 { 409 scrollPos = (int)SendMessage(msg->hwnd, (UINT)4875, 0, 0); 410 pos += swprintf_s(msgBuffer+pos,bufsize-pos,L"<param name=\"scrollPos\" value=\"%i\"/>", scrollPos); 411 } 412 } 408 413 } 409 414 if( msg->message==WM_MOUSEACTIVATE ) {
Note: See TracChangeset
for help on using the changeset viewer.