arnie
January 22nd, 2004, 11:45 AM
Hi All,
I need to read keys pressed in my program. I tried to use
case WM_KEYDOWN:
hwnd::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags ))
{
switch(nChar)
{
case 102: MessageBox(hwnd,"You pressed the 6 key","",MB_OK|MB_ICONINFORMATION);
break;
}
hwnd::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );
I get:
D:\Projects\Win32C\Main.c(102) : error C2143: syntax error : missing ';' before ':'
D:\Projects\Win32C\Main.c(131) : error C2143: syntax error : missing ';' before ':'
I don't have any edit box's or dialog box's to set focus to in the program. I just need to get input from the number keys pressed.
I could read key input with the VK_ type parameters but I can't find the ones for numbers.
Anyone know how to do this or where i can find a list of the VK_?
Thank,
AJ.
I need to read keys pressed in my program. I tried to use
case WM_KEYDOWN:
hwnd::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags ))
{
switch(nChar)
{
case 102: MessageBox(hwnd,"You pressed the 6 key","",MB_OK|MB_ICONINFORMATION);
break;
}
hwnd::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );
I get:
D:\Projects\Win32C\Main.c(102) : error C2143: syntax error : missing ';' before ':'
D:\Projects\Win32C\Main.c(131) : error C2143: syntax error : missing ';' before ':'
I don't have any edit box's or dialog box's to set focus to in the program. I just need to get input from the number keys pressed.
I could read key input with the VK_ type parameters but I can't find the ones for numbers.
Anyone know how to do this or where i can find a list of the VK_?
Thank,
AJ.