Click here to Skip to main content
15,888,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
«_Superman_»5-Nov-16 21:42
professional«_Superman_»5-Nov-16 21:42 
AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
Daniel Pfeffer6-Nov-16 0:35
professionalDaniel Pfeffer6-Nov-16 0:35 
QuestionMouse out of dialog Pin
_Flaviu3-Nov-16 4:07
_Flaviu3-Nov-16 4:07 
AnswerRe: Mouse out of dialog Pin
leon de boer3-Nov-16 4:21
leon de boer3-Nov-16 4:21 
QuestionRe: Mouse out of dialog Pin
David Crow3-Nov-16 15:42
David Crow3-Nov-16 15:42 
AnswerRe: Mouse out of dialog Pin
_Flaviu3-Nov-16 21:44
_Flaviu3-Nov-16 21:44 
GeneralRe: Mouse out of dialog Pin
Richard MacCutchan3-Nov-16 22:04
mveRichard MacCutchan3-Nov-16 22:04 
GeneralRe: Mouse out of dialog Pin
leon de boer3-Nov-16 22:10
leon de boer3-Nov-16 22:10 
You wont ever get the mouse move messages while the mouse is out of the client area unless you set the capture. Richard and I aren't joking there is nothing wrong.

Read the detail it is very clear
WM_MOUSEMOVE message (Windows)[^]

WM_MOUSEMOVE message
Posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse.

You need to set capture on the mouse if you want the message outside the area. You can grab it when your dialog takes focus or sometimes it is when you select something like select a piece of text to draw. I can't mind read what you are trying to do but you need to set capture on the mouse to get that message outside the client area of the window.

So perhaps start with the simple what starts the fact you want to track the mouse is there an event, a selection process? You want to track the mouse for some reason and whatever starts that process is where you set the capture. When it completes you release the capture. The set capture just needs your window handle and the release call requires no parameters it's a really simple thing and you just need to put the two lines of code in the right place.

The only native window that behaves like that with default behaviour are menu boxes which start the capture when you left mouse click down. They release mouse capture on left mouse click up. That is how you can click an move along menu trees. Perhaps do the same on your dialog so you get the idea. On you dialog handler set capture to start on the left mouse click down and release capture on left mouse click up and you will suddenly see the track outside your window so long as you hold the left button mouse down just like on a menu.
In vino veritas


modified 4-Nov-16 4:25am.

GeneralRe: Mouse out of dialog Pin
_Flaviu3-Nov-16 23:12
_Flaviu3-Nov-16 23:12 
QuestionSharing some humour Pin
leon de boer2-Nov-16 5:40
leon de boer2-Nov-16 5:40 
JokeRe: Sharing some humour Pin
Randor 2-Nov-16 17:34
professional Randor 2-Nov-16 17:34 
GeneralRe: Sharing some humour Pin
leon de boer2-Nov-16 18:57
leon de boer2-Nov-16 18:57 
AnswerRe: Sharing some humour Pin
Daniel Pfeffer2-Nov-16 22:23
professionalDaniel Pfeffer2-Nov-16 22:23 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 3:14
leon de boer3-Nov-16 3:14 
GeneralRe: Sharing some humour Pin
Daniel Pfeffer3-Nov-16 3:34
professionalDaniel Pfeffer3-Nov-16 3:34 
GeneralRe: Sharing some humour Pin
leon de boer3-Nov-16 4:41
leon de boer3-Nov-16 4:41 
GeneralRe: Sharing some humour Pin
Randor 13-Nov-16 5:43
professional Randor 13-Nov-16 5:43 
QuestionSendMessage for Interprocess communication stops working Pin
ForNow1-Nov-16 15:29
ForNow1-Nov-16 15:29 
AnswerRe: SendMessage for Interprocess communication stops working Pin
Midi_Mick1-Nov-16 16:16
professionalMidi_Mick1-Nov-16 16:16 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow1-Nov-16 16:22
ForNow1-Nov-16 16:22 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Midi_Mick1-Nov-16 17:36
professionalMidi_Mick1-Nov-16 17:36 
AnswerRe: SendMessage for Interprocess communication stops working Pin
Randor 1-Nov-16 17:56
professional Randor 1-Nov-16 17:56 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow2-Nov-16 13:59
ForNow2-Nov-16 13:59 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Randor 2-Nov-16 16:42
professional Randor 2-Nov-16 16:42 
AnswerRe: SendMessage for Interprocess communication stops working Pin
leon de boer2-Nov-16 3:10
leon de boer2-Nov-16 3:10 

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.