Click here to Skip to main content
15,890,438 members
Home / Discussions / Graphics
   

Graphics

 
Questionapplying texture to bitmap [modified] Pin
Force Code3-Aug-07 9:09
Force Code3-Aug-07 9:09 
QuestionDisplaying jpeg image sequences with ATL only Pin
p_4732-Aug-07 0:21
p_4732-Aug-07 0:21 
Questiondraw and select object Pin
mehdi00161-Aug-07 4:15
mehdi00161-Aug-07 4:15 
AnswerRe: draw and select object Pin
Mark Salsbery1-Aug-07 7:59
Mark Salsbery1-Aug-07 7:59 
GeneralRe: draw and select object Pin
mehdi00161-Aug-07 11:02
mehdi00161-Aug-07 11:02 
GeneralRe: draw and select object Pin
Mark Salsbery1-Aug-07 11:33
Mark Salsbery1-Aug-07 11:33 
GeneralRe: draw and select object Pin
mehdi00162-Aug-07 1:05
mehdi00162-Aug-07 1:05 
GeneralRe: draw and select object Pin
Mark Salsbery2-Aug-07 6:22
Mark Salsbery2-Aug-07 6:22 
You need some way to decide if the cursor is on an object. 

The simplest way is to use the bounding rectangle.  The problem with this is hollow, overlapped objects.
You can use the PtInRect() API to test for a rectangle.

A little more complicated is to use regions.
You can use the PtInRegion() API to test for a rectangle.

You can make it as complicated as it needs to be.

There's lots of articles about hit testing.  Here's one example: Win32: Hit Testing Lines and Curves[^]

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: draw and select object Pin
Force Code2-Aug-07 5:41
Force Code2-Aug-07 5:41 
GeneralRe: draw and select object Pin
Mark Salsbery2-Aug-07 6:09
Mark Salsbery2-Aug-07 6:09 
AnswerRe: draw and select object Pin
codeII2-Aug-07 6:40
codeII2-Aug-07 6:40 
Questionbenefit of Map File in Visual C++ ??? Pin
Miss_ Petrovna31-Jul-07 23:25
Miss_ Petrovna31-Jul-07 23:25 
AnswerRe: benefit of Map File in Visual C++ ??? Pin
Luc Pattyn1-Aug-07 8:35
sitebuilderLuc Pattyn1-Aug-07 8:35 
Generalthank U Luc Pattyn Pin
Miss_ Petrovna1-Aug-07 22:58
Miss_ Petrovna1-Aug-07 22:58 
GeneralRe: thank U Luc Pattyn Pin
Luc Pattyn1-Aug-07 23:20
sitebuilderLuc Pattyn1-Aug-07 23:20 
GeneralRe: thank U Luc Pattyn Pin
Miss_ Petrovna4-Aug-07 3:48
Miss_ Petrovna4-Aug-07 3:48 
QuestionAdd water Mark to a video Pin
Jats_4ru31-Jul-07 20:20
Jats_4ru31-Jul-07 20:20 
AnswerRe: Add water Mark to a video Pin
jk chan7-Aug-07 22:01
jk chan7-Aug-07 22:01 
Questioncamera opengl Pin
zqueezy31-Jul-07 15:08
zqueezy31-Jul-07 15:08 
QuestionAnoone tell me how to crack MAYA Unlimite v8 Pin
sonarat30-Jul-07 2:27
sonarat30-Jul-07 2:27 
AnswerRe: Anoone tell me how to crack MAYA Unlimite v8 Pin
Dave Kreskowiak30-Jul-07 10:56
mveDave Kreskowiak30-Jul-07 10:56 
AnswerRe: Anoone tell me how to crack MAYA Unlimite v8 Pin
Pete O'Hanlon2-Aug-07 10:49
mvePete O'Hanlon2-Aug-07 10:49 
QuestionFake webcam? Pin
m0sand29-Jul-07 5:24
m0sand29-Jul-07 5:24 
QuestionHELP:: OpenGL code bugs Pin
sagetarian26-Jul-07 23:56
sagetarian26-Jul-07 23:56 
AnswerRe: HELP:: OpenGL code bugs Pin
Dave Kreskowiak27-Jul-07 11:30
mveDave Kreskowiak27-Jul-07 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.