Is there anyway to write the code fragment below using LOWORD(lParam) and HIWORD(lParam) directly instead of using variables xPos and yPos? For example: if ((int)LOWORD(lParam) <= 8).
Code:xPos = (int)LOWORD(lParam); yPos = (int)HIWORD(lParam); if (xPos <= 8) { xPos = 0; } else { xPos -= 8; if (xPos >= rc.right) { rc.right--; xPos = rc.right; } } if (yPos <= 2) { yPos = 0; } else { yPos -= 2; if (yPos >= rc.bottom) { rc.bottom--; yPos = rc.bottom; } }