Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: COM1 Pin
Anonymous12-Aug-03 9:21
Anonymous12-Aug-03 9:21 
GeneralSOS! Release version crashed Pin
lucy11-Aug-03 9:28
lucy11-Aug-03 9:28 
GeneralRe: SOS! Release version crashed Pin
Maximilien11-Aug-03 9:41
Maximilien11-Aug-03 9:41 
GeneralRe: SOS! Release version crashed Pin
David Crow11-Aug-03 9:48
David Crow11-Aug-03 9:48 
GeneralRe: SOS! Release version crashed Pin
lucy11-Aug-03 9:53
lucy11-Aug-03 9:53 
GeneralRe: SOS! Release version crashed Pin
David Crow11-Aug-03 10:32
David Crow11-Aug-03 10:32 
Generalput my activeX on CfileDailog Pin
sdfdsfa11-Aug-03 6:30
sdfdsfa11-Aug-03 6:30 
GeneralFree the loaded dll Pin
orcun colak11-Aug-03 5:37
orcun colak11-Aug-03 5:37 
GeneralRe: Free the loaded dll Pin
valikac11-Aug-03 12:09
valikac11-Aug-03 12:09 
GeneralRe: Free the loaded dll Pin
igor196011-Aug-03 18:51
igor196011-Aug-03 18:51 
QuestionHow to read from ADO recordset Pin
haritadala11-Aug-03 4:53
haritadala11-Aug-03 4:53 
QuestionHow to delete a dialog class in MFC project? Pin
mr200311-Aug-03 4:09
mr200311-Aug-03 4:09 
AnswerRe: How to delete a dialog class in MFC project? Pin
jhwurmbach11-Aug-03 5:21
jhwurmbach11-Aug-03 5:21 
QuestionWhere to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
vgrigor11-Aug-03 3:59
vgrigor11-Aug-03 3:59 
AnswerRe: Where to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
Mike Dimmick11-Aug-03 11:08
Mike Dimmick11-Aug-03 11:08 
GeneralRe: Where to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
vgrigor11-Aug-03 20:39
vgrigor11-Aug-03 20:39 
GeneralCreating a loop in a dialog Pin
Kayembi11-Aug-03 3:45
Kayembi11-Aug-03 3:45 
GeneralRe: Creating a loop in a dialog Pin
Ravi Bhavnani11-Aug-03 3:53
professionalRavi Bhavnani11-Aug-03 3:53 
GeneralRe: Creating a loop in a dialog Pin
Kayembi11-Aug-03 12:10
Kayembi11-Aug-03 12:10 
GeneralRe: Creating a loop in a dialog Pin
Ravi Bhavnani12-Aug-03 2:30
professionalRavi Bhavnani12-Aug-03 2:30 
QuestionHow to add a property that binds a list ActiveX to a DataSource Pin
Daed11-Aug-03 3:23
Daed11-Aug-03 3:23 
GeneralScrolling an image. Pin
Neha11-Aug-03 2:48
Neha11-Aug-03 2:48 
GeneralWeird thing with GetKeyState() Pin
keegan11-Aug-03 2:45
keegan11-Aug-03 2:45 
GeneralRe: Weird thing with GetKeyState() Pin
Mike Dimmick11-Aug-03 3:02
Mike Dimmick11-Aug-03 3:02 
GeneralRe: Weird thing with GetKeyState() Pin
HPSI11-Aug-03 3:18
HPSI11-Aug-03 3:18 
keegan wrote:
I'm using GetKeyState(VK_CONTROL) to see if control key is depressed.

GetKeyState() is probably not the right API. MSDN says: "The key status returned from this function changes as a thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function to retrieve that information."

About GetAsyncKeyState() MSDN says: "The GetAsyncKeyState function determines whether a key is up or down at the time the function is called."

So GetAsyncKeyState() is what you want. You can call it like this:
BOOL bScrollLockDown = GetAsyncKeyState(VK_SCROLL) >> ((sizeof(SHORT) * 8) - 1);

keegan wrote:
when the ctrl key was pressed, other keys had abnormal values. For instance, in the OnChar function i have, if the user held control and hit the letter 'd', nChar would be equivalent to 7. d was equivalent to 4, a = 1, b = 2, c = 3, and so on. Now i looked at www.asciitable.com and i didnt see any numbering system that starts with a = 1 and increments with each letter.

The CTRL+key is ancient ASCII. You can see a chart here.


HPS HwndSpy
- GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.

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.