Click here to Skip to main content
15,923,789 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am drawing 3*3 rectangle by using Rectangle(); but now if I click on that rectangle, I want to display the image in that rectangle, which is selected from the list control. I know that I want to handle OnLButtonDown() message, but my problem is that I couldn't differentiate the rectangle which I drawn and the windows rectangle on mouse click. Help me out please.
Posted
Updated 4-Jun-11 14:50pm
v3
Comments
CPallini 4-Jun-11 14:26pm    
Why cannot you differentiate?
Rocker Gang 5-Jun-11 1:05am    
To place an image on that rectangle on mouseclick i need the clientarea of that specific rectangle,bt that rectangle is also the client area of windows rect. how can i do this..... i am beginner may be this seems to be a stupid question help me plz......
HimanshuJoshi 4-Jun-11 20:51pm    
Edited to correct some spelling and grammar.

1 solution

When you draw your rectangle then keep a note of its size and position, then when you capture the mouse click you know where to display it. Where is your difficulty in this?
 
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