Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32 API function

Status
Not open for further replies.

NewBieDJ

Programmer
Feb 23, 2006
8
US
Hi,

Can any one tell me what should be the shift and control key values in the below stated code.

#DEFINE VK_lSHIFT 0x10
#DEFINE VK_lCONTROL 0x11

DECLARE INTEGER GetKeyState IN WIN32API INTEGER

What should be the value of GetKeyState(VK_lSHIFT) and
GetKeyState(VK_lCONTROL)? I am getting different values(both +ve, -ve & 0) every time I press shift or control keys down.

I want to use this in a controls click event to check for if the shift is used or control is used.

I hope I am clear about my problem.

Thank you.
 
Might it be easier to use the parameters of the MouseDown event? That will tell you whether the user is holding any combination of SHIFT, ALT and CTRL. Store the flag from MouseDown() in a property of the control then look at it (and clear it) when you process the Click().

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top