Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Here is the function i have:

C++
BOOL cDlgGrid::PreTranslateMessage(MSG* pMsg) 
{ 
    if (WM_KEYFIRST <= pMsg->message && 
        pMsg->message <= WM_KEYLAST) 
    { 
        HACCEL hAccel = m_hAccel; 
        if (hAccel && 
			::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 
            return TRUE; 
    } 
    if (pMsg->message==WM_KEYDOWN && pMsg->wParam == VK_CONTROL)
    {
         OnFind(); // implements and find dialog
    }
    return CDialog::PreTranslateMessage(pMsg); 
};


According to the code, i know how to capture the Ctrl key press, now how do i know if Ctrl+F is pressed, i want to implement the find dialog for Ctrl+F not for just Ctrl. How do i achieve this?
Posted
Updated 10-Oct-11 5:31am
v2

1 solution

take a look at the following topics
GetAsyncKeyState[^]
WM_HOTKEY[^]

Keyboard Input[^]
 
Share this answer
 
Comments
amarasat 10-Oct-11 13:22pm    
Thanks a lot, your info has helped me and gave me the solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900