Click here to Skip to main content
15,922,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What is wrong with this iterator? Pin
vikramlinux10-Apr-08 22:46
vikramlinux10-Apr-08 22:46 
GeneralRe: What is wrong with this iterator? Pin
Cedric Moonen10-Apr-08 22:58
Cedric Moonen10-Apr-08 22:58 
GeneralRe: What is wrong with this iterator? Pin
Stephen Hewitt13-Apr-08 14:21
Stephen Hewitt13-Apr-08 14:21 
GeneralRe: What is wrong with this iterator? Pin
Rajesh R Subramanian10-Apr-08 23:04
professionalRajesh R Subramanian10-Apr-08 23:04 
AnswerRe: What is wrong with this iterator? Pin
Cedric Moonen10-Apr-08 22:50
Cedric Moonen10-Apr-08 22:50 
AnswerRe: What is wrong with this iterator? Pin
Jonathan [Darka]10-Apr-08 23:00
professionalJonathan [Darka]10-Apr-08 23:00 
GeneralRe: What is wrong with this iterator? Pin
vikramlinux11-Apr-08 1:31
vikramlinux11-Apr-08 1:31 
Generalafter pressing button dialog box should be pop up like Windos Explorer Start Button in SDK [modified] Pin
Pankaj Kothawade10-Apr-08 19:48
Pankaj Kothawade10-Apr-08 19:48 
GeneralRe: after pressing button dialog box should be pop up like Windos Explorer Start Button in SDK Pin
Hamid_RT12-Apr-08 5:45
Hamid_RT12-Apr-08 5:45 
Generalin-process server considerations Pin
George_George10-Apr-08 19:39
George_George10-Apr-08 19:39 
GeneralRe: in-process server considerations Pin
Stephen Hewitt10-Apr-08 20:14
Stephen Hewitt10-Apr-08 20:14 
GeneralRe: in-process server considerations Pin
George_George10-Apr-08 21:37
George_George10-Apr-08 21:37 
GeneralRe: in-process server considerations Pin
Stephen Hewitt10-Apr-08 21:39
Stephen Hewitt10-Apr-08 21:39 
GeneralRe: in-process server considerations Pin
George_George10-Apr-08 21:58
George_George10-Apr-08 21:58 
GeneralRe: in-process server considerations Pin
Stephen Hewitt10-Apr-08 22:04
Stephen Hewitt10-Apr-08 22:04 
GeneralRe: in-process server considerations Pin
George_George10-Apr-08 22:07
George_George10-Apr-08 22:07 
QuestionError loading ActiveX control in secondary desktop ? Pin
phucbaby10-Apr-08 19:31
phucbaby10-Apr-08 19:31 
GeneralRe: Error loading ActiveX control in secondary desktop ? Pin
phucbaby10-Apr-08 19:37
phucbaby10-Apr-08 19:37 
GeneralRe: Error loading ActiveX control in secondary desktop ? Pin
leenmie13-Apr-08 4:03
leenmie13-Apr-08 4:03 
GeneralWIN32 API to find Mouse Button State Pin
poda10-Apr-08 19:29
poda10-Apr-08 19:29 
GeneralRe: WIN32 API to find Mouse Button State Pin
Mark Salsbery10-Apr-08 19:54
Mark Salsbery10-Apr-08 19:54 
GeneralRe: WIN32 API to find Mouse Button State Pin
Stephen Hewitt10-Apr-08 20:19
Stephen Hewitt10-Apr-08 20:19 
GeneralRe: WIN32 API to find Mouse Button State Pin
Mark Salsbery10-Apr-08 21:09
Mark Salsbery10-Apr-08 21:09 
GeneralRe: WIN32 API to find Mouse Button State [modified] Pin
Nibu babu thomas10-Apr-08 20:26
Nibu babu thomas10-Apr-08 20:26 
poda wrote:
How to know whether the mouse button is Down
even if it moving.


Add event handler for WM_MOUSEMOVE. If the WPARAM for this event has MK_LBUTTON set then left mouse button is down, or if it has MK_MBUTTON, MK_RBUTTON then the corresponding mouse button is down!

If you are using MFC then use void OnMouseMove( UINT nFlags, CPoint point ).

nFlags will contain appropriate flags to indicate whether left, middle, right buttons or whether shift key is down. Use bitwise and to find out.

E.g.
if(( nFlag & MK_LBUTTON ) == MK_LBUTTON )
   AfxTrace( "You are dragging the mouse\n" );



Nibu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

modified on Friday, April 11, 2008 2:58 AM

GeneralRe: WIN32 API to find Mouse Button State Pin
poda10-Apr-08 22:58
poda10-Apr-08 22:58 

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.