|
From: Daniel G. <sp...@ho...> - 2002-05-12 14:36:47
|
well say you had a case statement to handle windows messages.
case WM_CHAR:
{
// get ascii code
int ascii_code = (int)wparam;
int key_bits = (int)lparam;
// do whatever
// tell windows you processed the message
return 0;
}
break;
case WM_KEYDOWN:
{
// get virtual keycode and data bits
int virtual_code = (int)wparam;
int key_bits = (int)lparam;
switch(virtual_code)
{
case VK_RIGHT:{} break;
case VK_LEFT: {} break;
// etc...
default: break;
}
// tell windows message was handled
return 0;
} break;
Does this help?
>From: Stein Nygård <ste...@ge...>
>To: "Daniel Glenfield" <sp...@ho...>
>Subject: Re: [Dev-C++] keys
>Date: Sun, 12 May 2002 14:29:49 +0200
>
>Two things that confuses me, so far...
>What's the difference between VK_SHIFT and MK_SHIFT? And, what's the
>difference between WM_LBUTTONDOWN and MK_LBUTTON?
>
>Thanks :)
>
>Stein Nygård
>
>----- Original Message -----
>From: "Daniel Glenfield" <sp...@ho...>
>To: <ste...@ge...>; <dev...@li...>
>Sent: Sunday, May 12, 2002 9:27 AM
>Subject: Re: [Dev-C++] keys
>
>
> >
> > Here are a few
> >
> > Keyboard
> > VK_BACK // backspace
> > VK_TAB
> > VK_RETURN
> > VK_SHIFT
> > VK_CONTROL
> > VK_PAUSE
> > VK_SPACE
> > VK_PRIOR // page up key
> > VK_NEXT // page down
> > VK_ESCAPE
> >
> > etc. nothing about ALT on my list (windows game programming for
>dummies)
> >
> >
> >
> > WM_LBUTTONDBLCLK
> > WM_LBUTTONDOWN
> > WM_LBUTTONUP
> > WM_MBUTTONDBLCLK // middle button
> > WM_MBUTTONDOWN
> > WM_RBUTTONUP // etc. etc.
> >
> > Set if...
> > MK_LBUTTON // Set if the left button is down
> > MK_CONTROL // Set if control is down
> > MK_SHIFT // set if shift is down
> >
> >
> > >From: Stein Nygård <ste...@ge...>
> > >To: "DevCpp" <dev...@li...>
> > >Subject: [Dev-C++] keys
> > >Date: Sun, 12 May 2002 01:24:12 +0200
> > >
> > >Hi all!
> > >
> > >Where can I find a list of the keyboard-keys?
> > >I've been using keys like VK_UP and VK_DOWN etc... but what about ALT,
> > >CONTROL, ENTER and so on? I assume there's is some list available
> > >somewhere?
> > >
> > >Thanks
> > >
> > >Stein
> >
> >
> >
> >
> > _________________________________________________________________
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> > _______________________________________________________________
> >
> > Have big pipes? SourceForge.net is looking for download mirrors. We
>supply
> > the hardware. You get the recognition. Email Us:
>ban...@so...
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
|