Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to design pure C style APIs for a framework which include a core exe and plugin dlls Pin
bestbear9-Nov-16 19:59
bestbear9-Nov-16 19:59 
AnswerRe: How to design pure C style APIs for a framework which include a core exe and plugin dlls Pin
Richard MacCutchan9-Nov-16 22:52
mveRichard MacCutchan9-Nov-16 22:52 
AnswerRe: How to design pure C style APIs for a framework which include a core exe and plugin dlls Pin
leon de boer10-Nov-16 9:06
leon de boer10-Nov-16 9:06 
GeneralRe: How to design pure C style APIs for a framework which include a core exe and plugin dlls Pin
bestbear10-Nov-16 18:11
bestbear10-Nov-16 18:11 
QuestionC programming Determine Students grade Pin
Member 128422149-Nov-16 12:37
Member 128422149-Nov-16 12:37 
AnswerRe: C programming Determine Students grade Pin
leon de boer9-Nov-16 14:27
leon de boer9-Nov-16 14:27 
QuestionHow explicit , volatile and mutable keywords works INTERNALLY in C++ ? Pin
Amrit Agr6-Nov-16 22:06
Amrit Agr6-Nov-16 22:06 
AnswerRe: How explicit , volatile and mutable keywords works INTERNALLY in C++ ? Pin
Richard MacCutchan7-Nov-16 0:18
mveRichard MacCutchan7-Nov-16 0:18 
AnswerRe: How explicit , volatile and mutable keywords works INTERNALLY in C++ ? Pin
leon de boer7-Nov-16 8:15
leon de boer7-Nov-16 8:15 
GeneralPlease help Pin
Ahmed Adel5-Nov-16 3:20
Ahmed Adel5-Nov-16 3:20 
GeneralRe: Please help Pin
Richard MacCutchan5-Nov-16 21:01
mveRichard MacCutchan5-Nov-16 21:01 
GeneralRe: Please help Pin
leon de boer6-Nov-16 4:49
leon de boer6-Nov-16 4:49 
PraiseRe: Please help Pin
Ahmed Adel6-Nov-16 5:10
Ahmed Adel6-Nov-16 5:10 
QuestionPattern review C++: using structs with pure virtual methods in place of interfaces Pin
Member 128328324-Nov-16 5:58
Member 128328324-Nov-16 5:58 
AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
Chris Losinger4-Nov-16 8:23
professionalChris Losinger4-Nov-16 8:23 
AnswerRe: Pattern review C++: using structs with pure virtual methods in place of interfaces Pin
leon de boer4-Nov-16 8:48
leon de boer4-Nov-16 8:48 
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 

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.