Hi Andrew,

How about this:

#define IsSHIFTpressed() ( (GetKeyState(VK_SHIFT) & (1 <<
(sizeof(SHORT)*8-1))) != 0   )

#define IsCTRLpressed()  ( (GetKeyState(VK_CONTROL) & (1 <<
(sizeof(SHORT)*8-1))) != 0 )

Regards,
Carlos 


> -----Mensaje original-----
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En
> nombre de Truckle, Andrew J
> Enviado el: viernes, 22 de abril de 2005 11:54
> Para: '[email protected]'
> Asunto: [msvc] PreTranslateMessage
> 
> I have this method:
> 
> BOOL CCreateReportDlg::PreTranslateMessage(MSG* pMsg)
> {
>       // TODO: Add your specialized code here and/or call the base class
>       CCellID         idCell;
> 
>       if (pMsg->hwnd == m_Grid.GetSafeHwnd() &&
>               pMsg->message == WM_KEYUP &&
>               (pMsg->wParam == VK_UP || pMsg->wParam == VK_DOWN) )
>       {
>               idCell = m_Grid.GetFocusCell();
>               UpdateMeetingStatus(idCell.row);
>       }
> 
>       return CDialog::PreTranslateMessage(pMsg);
> }
> 
> I want to also trap when the user clicks CTRL and END.  How do I know when
> CTRL are pressed?
> 
> Andrew Truckle
> CAD Manager
> Atkins Survey and Mapping
> Avon Way, Langley Park, Chippenham, Wiltshire. SN15 1GG
> Telephone:     01249 455032
> Switchboard:  01249 455000
> Fax:           01249 455045
> E-Mail: [EMAIL PROTECTED]
> www.atkinsglobal.com <www.atkinsglobal.com>
> 
> 
> 
> This email and any attached files are confidential and copyright
> protected. If you are not the addressee, any dissemination of this
> communication is strictly prohibited. Unless otherwise expressly agreed in
> writing, nothing stated in this communication shall be legally binding.
> 
> _______________________________________________
> msvc mailing list
> [email protected]
> See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
> subscription changes, and list archive.


_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to