1. To change back ground color use FillRect method,
void FillRect(LPCRECT lpRect,CBrush* pBrush);
Generate the rectange from LButtonDown, LButtonUP points.The following link gives you more information about FillRect.
http://msdn.microsoft.com/en-us/library/0421fewx%28v=vs.80%29.aspx[
^]
2. The behaviour of HitTest will depends on the window you are refferening.It is not a CWnd Member.