|
Posted by S.Kumar on September 6, 2007, 4:04 am
Please log in for more thread options Can anyone tell me where I'm going wrong in registering the VK_TEND hotkey.
The code I used is given below.
"S.Kumar" wrote:
>
> Hi Amit,
> Thants for the reply. here is the steps that I did.
> I registered the VK_TEND hotkey in InitDialog. VK_THOME is working fine.
> Tried using different modifiers like MOD_KEYUP,MOD_ALT, MOD_CONTROL,
> MOD_DONE, MOD_MOJI for VK_TEND.
>
> RegisterHotKey(m_hWnd,VK_THOME,MOD_WIN,VK_THOME);
> RegisterHotKey(m_hWnd,VK_TEND,MOD_WIN,VK_TEND);
>
> In the message map I added the handler for the WM_HOTKEY
>
> ON_MESSAGE(WM_HOTKEY, &CResults::HotKeyHandler)
>
> Handling the event in the HotKeyHandler method.
>
> LRESULT CResults::HotKeyHandler(WPARAM wParam, LPARAM lParam)
> {
> if((HIWORD(lParam) == VK_THOME || HIWORD(lParam) == VK_TEND) &&
> (LOWORD(lParam) == MOD_WIN))
> {
> EndDialog(0);
> }
> return 0;
> }
>
> please suggest me if anything went wrong in this code.
>
> Thanks,
> S.Kumar.
>
>
> "Amit" wrote:
>
> > can you show us the code using which you are trying to register for the
> > VK_TEND? and also the one using which you are handling
> > --
> > Thanks and Regards
> > Amit
> > blog:http://amitranjan.wordpress.com
> >
> >
> > "S.Kumar" wrote:
> >
> > >
> > > Hi All,
> > >
> > > How to handle the END(redbutton) key?
> > > My dialog based application is not hiding or closing when END key is
pressed.
> > > I need to close my application when END key is pressed.
> > > I could able to do it for the HOME key.
> > >
> > > I'm developing a dialog based MFC application.
> > >
> > > Please advice me.
> > >
> > > thanks all
> > >
> > > S.Kumar
|