I developed the MFC application using VS2008 and the MFC functional package. This application user interface uses ribbon.
Now I need to have F10 as a suitable shortcut for one of the most important functions of my application, but I seem to be unable to install the accelerator correctly, since it always uses the default ribbon accelerator in my opinion.
Any idea how to achieve this?
, . - SetWindowsHookEx . , Vista/Win7/Server 2008 . - DLL.
WM_SYSKEYDOWN wParam VK_F10? F10 , Alt, .
, : BOOL PreTranslateMessage (MSG * pMsg);
BOOL CMyView::PreTranslateMessage(MSG* pMsg) { if ((pMsg->message == WM_SYSKEYDOWN) && (pMsg->wParam == VK_F10)) { OnMyAction(); //code on F10 return TRUE; } return CView::PreTranslateMessage(pMsg); }
Source: https://habr.com/ru/post/1752962/More articles:text box with numeric text as a control in a Visual Studio toolbar - .netWhite space property between blocks - htmlHow to continue execution after submitting the form? - javascriptHow can I make a T9 on-screen keyboard for Windows? - pythonJava recursion calling it with objects - How to copy objects? - javaWriting an extension method for type T; How can I add a type constraint for the T field? - c #server side javascript call - c #Where do you usually keep styles in rails? - typesText before variables inside foreach loop - htmlProblems with jquery.attr () - jqueryAll Articles