Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi sir/ mam i am very new to MFC can any one explain how to use HitTest method and what are the uses of it. can we use it for selecting the particular client area.for example i had drawn the text in the client area . had taken two point from LButtonDown and LButtonUP and also the MouseMove and drawn the rectangle by this point. now i want to change the bkcolor of the rectangle .... note i did not taken the editview please any one help me ........


thanking in advance
sarfaraz
Posted

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900