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

C / C++ / MFC

 
GeneralRe: MultiByteToWideChar Pin
tanarnelinistit20-Jul-06 3:23
tanarnelinistit20-Jul-06 3:23 
QuestionRe: MultiByteToWideChar Pin
David Crow20-Jul-06 3:49
David Crow20-Jul-06 3:49 
AnswerRe: MultiByteToWideChar Pin
tanarnelinistit20-Jul-06 3:54
tanarnelinistit20-Jul-06 3:54 
GeneralRe: MultiByteToWideChar Pin
Naveen20-Jul-06 17:27
Naveen20-Jul-06 17:27 
QuestionDate and Time Picker Pin
goodoljosh198020-Jul-06 1:27
goodoljosh198020-Jul-06 1:27 
AnswerRe: Date and Time Picker Pin
krmed20-Jul-06 2:24
krmed20-Jul-06 2:24 
AnswerRe: Date and Time Picker Pin
-Dy20-Jul-06 2:31
-Dy20-Jul-06 2:31 
QuestionWhere is the mouse?? Pin
Dimitris Vikeloudas20-Jul-06 1:11
Dimitris Vikeloudas20-Jul-06 1:11 
I have an application with plenty of windows. Some of them a re CView subclasses others are controls etc.

My views usually track the mouse using the mouse events like the CWnd::OnMouseMove messages (which I have properly mapped etc).

Reading the OnMouseMove help says that:

'The framework calls this member function when the mouse cursor moves. If the mouse is not captured, the WM_MOUSEMOVE message is received by the CWnd object beneath the mouse cursor; otherwise, the message goes to the window that has captured the mouse.'

I would like to know at a given point where the mouse is, or actually if the recepient of the next mouse input message is the current CWnd or not (i.e. is it still beneath the cursor?).

I 'd like to write code like

MyClass::OnMouseMove(....)<br />
{<br />
   DoMyInitialAction(); //an application action<br />
<br />
   if( MouseInputStillOnMe() ) <br />
     DoSomeOtherAction(....); //another application action<br />
}


If my DoMyInitialAction creates a new view it is likely that the next mouse input message will go on that one. I do not want to capture the mouse and receive any event related to it just in case that the DoMyInitialAction
does that (It's a black box. I do not know what will do).

Thus is it possible to write a MouseInputStillOnMe() query which will not post any message to my message queues but will tell me that under the current circumanstances I 'll receive the next mouse input message?

I assume that I can use the CWnd *CWnd::GetCapture( ) to find if another CWnd in my thread receives the mouse events but this does not answer if my window is still the one beneath the cursor. How do I found if it is?

Thanks a lot for any help....



Dimitris...more you ask, more you learn
AnswerRe: Where is the mouse?? Pin
Blake Miller20-Jul-06 7:05
Blake Miller20-Jul-06 7:05 
AnswerRe: Where is the mouse?? Pin
Roger Allen20-Jul-06 11:52
Roger Allen20-Jul-06 11:52 
QuestionAdministrator Privilege [modified] Pin
ragavan19-Jul-06 23:50
ragavan19-Jul-06 23:50 
AnswerRe: Administrator Privilege Pin
Naveen19-Jul-06 23:57
Naveen19-Jul-06 23:57 
AnswerRe: Administrator Privilege Pin
Mike Dimmick20-Jul-06 0:22
Mike Dimmick20-Jul-06 0:22 
AnswerRe: Administrator Privilege Pin
ThatsAlok21-Jul-06 0:32
ThatsAlok21-Jul-06 0:32 
Questionbrekpointing every function Pin
TClarke19-Jul-06 23:15
TClarke19-Jul-06 23:15 
AnswerRe: brekpointing every function Pin
toxcct19-Jul-06 23:24
toxcct19-Jul-06 23:24 
AnswerRe: brekpointing every function Pin
Naveen19-Jul-06 23:31
Naveen19-Jul-06 23:31 
GeneralRe: brekpointing every function Pin
TClarke19-Jul-06 23:35
TClarke19-Jul-06 23:35 
GeneralRe: brekpointing every function Pin
Renjith Ramachandran20-Jul-06 0:24
Renjith Ramachandran20-Jul-06 0:24 
GeneralRe: brekpointing every function Pin
Naveen20-Jul-06 0:30
Naveen20-Jul-06 0:30 
QuestionVirtual drive not seen when i open it from file->open/save as option from any application Pin
Sandhya91019-Jul-06 23:06
Sandhya91019-Jul-06 23:06 
QuestionHow to invoke an application executable from DLL.? Pin
ashokbngr19-Jul-06 22:54
ashokbngr19-Jul-06 22:54 
AnswerRe: How to invoke an application executable from DLL.? Pin
Naveen19-Jul-06 23:20
Naveen19-Jul-06 23:20 
GeneralRe: How to invoke an application executable from DLL.? Pin
ashokbngr20-Jul-06 21:18
ashokbngr20-Jul-06 21:18 
GeneralRe: How to invoke an application executable from DLL.? Pin
ashokbngr20-Jul-06 21:24
ashokbngr20-Jul-06 21: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.