Click here to Skip to main content
15,887,244 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to use user defined type in other function. Pin
Manoj739012-Jun-13 19:44
Manoj739012-Jun-13 19:44 
AnswerRe: How to use user defined type in other function. Pin
Richard MacCutchan12-Jun-13 21:05
mveRichard MacCutchan12-Jun-13 21:05 
GeneralRe: How to use user defined type in other function. Pin
Manoj739012-Jun-13 21:41
Manoj739012-Jun-13 21:41 
GeneralRe: How to use user defined type in other function. Pin
Richard MacCutchan12-Jun-13 22:29
mveRichard MacCutchan12-Jun-13 22:29 
GeneralRe: How to use user defined type in other function. Pin
CPallini12-Jun-13 23:26
mveCPallini12-Jun-13 23:26 
GeneralRe: How to use user defined type in other function. Pin
Manoj739013-Jun-13 23:54
Manoj739013-Jun-13 23:54 
GeneralRe: How to use user defined type in other function. Pin
CPallini14-Jun-13 0:42
mveCPallini14-Jun-13 0:42 
QuestionCapturing mouse input outside a dialog Pin
rbrunton12-Jun-13 7:19
rbrunton12-Jun-13 7:19 
I am trying to create a dialog MFC application that reads the cursor position anywhere on the screen, finds the colour of the pixel at that location and reports the information back to the dialog application.

I have tried SetCapture and I must be doing something wrong because the cursor location stops reporting as soon as the cursor leaves the client area of the dialog. I have also looked at the "Screen Color Picker" by Florin Vasilescu. That uses an OnTimer function that allows me to read the screen location, but does not report mouse actions (LBUTTONDOWN) so that I can read the pixel at the cursor location.

I have also tried using SetWindowsHookEx and defining the MouseProc (as described by Vesi in the CodeGuru article "Modal dialog and outside mouse control". That wasn't successful. If I use the WH_JOURNALRECORD hook ID as described there appears to be an indeterminate delay between any mouse (or keyboard) action and interaction with screen objects. If I use the WH_MOUSE no mouse actions are detected.

Could someone help me with how to either properly set SetCapture() or point me to where I might discover how to read mouse actions outside the dialog box? I'm happy to supply code, but at this point it's a bit of a mess since I've been trying everything.

Thanks for any help you may be able to provide. Much appreciated.
GeneralRe: Capturing mouse input outside a dialog Pin
David Crow12-Jun-13 10:19
David Crow12-Jun-13 10:19 
GeneralRe: Capturing mouse input outside a dialog Pin
rbrunton12-Jun-13 11:04
rbrunton12-Jun-13 11:04 
GeneralRe: Capturing mouse input outside a dialog Pin
rbrunton12-Jun-13 11:11
rbrunton12-Jun-13 11:11 
AnswerRe: Capturing mouse input outside a dialog Pin
Erudite_Eric13-Jun-13 1:15
Erudite_Eric13-Jun-13 1:15 
AnswerRe: Capturing mouse input outside a dialog Pin
thanh_bkhn13-Jun-13 16:57
professionalthanh_bkhn13-Jun-13 16:57 
QuestionCToolTipCtrl with TTF_TRACK Flag won't disappear, SetDelayTime doesn't work? Pin
Falconapollo12-Jun-13 0:34
Falconapollo12-Jun-13 0:34 
QuestionLoadImage error Pin
_Flaviu11-Jun-13 22:04
_Flaviu11-Jun-13 22:04 
AnswerRe: LoadImage error Pin
Jochen Arndt11-Jun-13 22:58
professionalJochen Arndt11-Jun-13 22:58 
GeneralRe: LoadImage error Pin
_Flaviu11-Jun-13 23:24
_Flaviu11-Jun-13 23:24 
GeneralRe: LoadImage error Pin
Jochen Arndt11-Jun-13 23:38
professionalJochen Arndt11-Jun-13 23:38 
GeneralRe: LoadImage error Pin
_Flaviu11-Jun-13 23:51
_Flaviu11-Jun-13 23:51 
GeneralRe: LoadImage error Pin
Jochen Arndt12-Jun-13 0:36
professionalJochen Arndt12-Jun-13 0:36 
GeneralRe: LoadImage error Pin
_Flaviu12-Jun-13 1:01
_Flaviu12-Jun-13 1:01 
QuestionHow can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
002comp11-Jun-13 20:12
002comp11-Jun-13 20:12 
AnswerRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
Jochen Arndt11-Jun-13 21:08
professionalJochen Arndt11-Jun-13 21:08 
GeneralRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
002comp11-Jun-13 22:31
002comp11-Jun-13 22:31 
GeneralRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
Jochen Arndt11-Jun-13 23:16
professionalJochen Arndt11-Jun-13 23:16 

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.