Click here to Skip to main content
15,896,441 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: WIN32 API to find Mouse Button State Pin
Hamid_RT12-Apr-08 5:40
Hamid_RT12-Apr-08 5:40 
GeneralMultilangauge problem Pin
Surendra Vishwkarma10-Apr-08 19:26
Surendra Vishwkarma10-Apr-08 19:26 
AnswerRe: Multilangauge problem Pin
ganesa moorthy10-Apr-08 21:50
ganesa moorthy10-Apr-08 21:50 
GeneralRe: Multilangauge problem Pin
Hamid_RT12-Apr-08 5:36
Hamid_RT12-Apr-08 5:36 
QuestionHow can i Load Bitmap in Runtime Pin
phanindra varma10-Apr-08 19:12
phanindra varma10-Apr-08 19:12 
AnswerRe: How can i Load Bitmap in Runtime Pin
Stephen Hewitt10-Apr-08 19:22
Stephen Hewitt10-Apr-08 19:22 
GeneralRe: How can i Load Bitmap in Runtime Pin
phanindra varma11-Apr-08 1:15
phanindra varma11-Apr-08 1:15 
AnswerRe: How can i Load Bitmap in Runtime Pin
Hamid_RT12-Apr-08 5:35
Hamid_RT12-Apr-08 5:35 
QuestionHow to make Firefox addon? Pin
manish.patel10-Apr-08 19:00
manish.patel10-Apr-08 19:00 
GeneralRe: How to make Firefox addon? Pin
Nibu babu thomas10-Apr-08 21:15
Nibu babu thomas10-Apr-08 21:15 
GeneralRe: How to make Firefox addon? Pin
_AnsHUMAN_ 10-Apr-08 21:18
_AnsHUMAN_ 10-Apr-08 21:18 
GeneralRe: How to make Firefox addon? Pin
Hamid_RT12-Apr-08 5:34
Hamid_RT12-Apr-08 5:34 
GeneralDialog bo shouldn't show up.. Pin
neha.agarwal2710-Apr-08 18:36
neha.agarwal2710-Apr-08 18:36 
GeneralRe: Dialog bo shouldn't show up.. Pin
Aamir Butt10-Apr-08 21:20
Aamir Butt10-Apr-08 21:20 
GeneralRe: Dialog bo shouldn't show up.. Pin
CPallini10-Apr-08 21:21
mveCPallini10-Apr-08 21:21 
GeneralRe: Dialog bo shouldn't show up.. Pin
_AnsHUMAN_ 10-Apr-08 21:21
_AnsHUMAN_ 10-Apr-08 21:21 

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.