Click here to Skip to main content
15,924,679 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: HOW TO place a logo watermark on live video? Pin
Drew Stainton13-Aug-07 16:30
Drew Stainton13-Aug-07 16:30 
GeneralRe: HOW TO place a logo watermark on live video? Pin
Drew Stainton13-Aug-07 16:32
Drew Stainton13-Aug-07 16:32 
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 
It's up to you to keep track of where you draw the objects.

With that saved info, you can perform "hit-testing", where you take the cursor position and
determine which drawn object the cursor is on.

To drag an object, the typical method is (in pseudocode):

On WM_LBUTTONDOWN
  if mousecursor on an object (hit-test)
    capture mouse (SetCapture())
    save base cursor position

On WM_MOUSEMOVE
  if mouse captured
    if cursor position different than base cursor position
      erase object at current its location
      draw object at its new location (use delta from base cursor position)
      set base cursor position to the current cursor position

On WM_LBUTTONUP
  if mouse captured
    release mouse capture (ReleaseCapture())

MArk




Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

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 
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 

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.