Jan 16, 2021, 01:21 AM

News:

Choose a design and let our professionals help you build a successful website   - ITAcumens


Mouse Up& Down Messages

Started by sukishan, Jul 12, 2009, 11:23 PM

previous topic - next topic
Go Down

sukishan

Mouse-Down Messages

Imagine the user has located a position or an item on a document and presses one of the mouse buttons. While the button is pressed and is down, a button-down message is sent, depending on the button that was pressed. If the left mouse button was pressed, an ON_WM_LBUTTONDOWN message is sent. The syntax of this message is:

afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
If the right mouse button was pressed, an ON_WM_RBUTTONDOWN message is sent.

Its syntax is:
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
The first argument, nFlags, specifies what button is down or what keyboard key and what mouse button are down. It is a

constant integer that can have one of the following values:
MK_CONTROL: A Ctrl key is held down.
MK_LBUTTON: The left mouse button is down.
MK_MBUTTON: The middle mouse button is down.
MK_RBUTTON: The right mouse button is down.
MK_SHIFT: A Shift key is held down.
The point argument specifies the measure from the left and the top borders of the window to the mouse pointer.


**********************************************************************************************
The Mouse-Up Messages

After pressing a mouse button, the user usually releases it. While the button is being released, a button-up message is sent and it depends on the button, left or right, that was down.

If the left mouse is being released, the ON_WM_LBUTTONUP message is sent. Its syntax is:

afx_msg void OnLButtonUp(UINT nFlags, CPoint point);If the right mouse is being released, the ON_WM_TBUTTONUP message is sent. Its syntax is:

afx_msg void OnRButtonUp(UINT nFlags, CPoint point);The first argument, nFlags, specifies what button, right or middle, is down or what keyboard key and what mouse button were down. It is a constant integer that can have one of the following values:
MK_CONTROL: A Ctrl key was held down.
MK_MBUTTON: The middle mouse button was down.
MK_RBUTTON: The right mouse button was down.
MK_SHIFT: A Shift key was held.

The point argument specifies the measure from the (0, 0) origin of the window to the mouse pointer.
A good beginning makes a good ending

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:
Verification:
Please leave this box empty:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
IT Acumens Web Designing Chennai | GinGly :: Build your Personal Website | CineBuzz :: Cinema News | My Kids Diary :: Kids Memories Writing :: Book Website @ 349 Rs monthly
Copyright 2005 - 2020 :: IT Acumens :: All Rights Reserved. :: Sitemap
ITAcumens Discussion Forum with 2 lakhs post running for 15 years - Powered by IT Acumens Dedicated Server