Click here to get back home

Registering VK_TEND hotkey

 HomeNewsGroups | Search | About
 microsoft.public.smartphone.developer    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Registering VK_TEND hotkey S.Kumar 09-03-2007
Get Chitika Premium
Posted by S.Kumar on September 3, 2007, 10:12 am
Please log in for more thread options

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

Posted by Amit on September 4, 2007, 12:26 am
Please log in for more thread options
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

Posted by S.Kumar on September 4, 2007, 4:12 am
Please log in for more thread options

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

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

Similar ThreadsPosted
Registering home screen plugin September 18, 2007, 10:14 am
Is it possible to register VK_TEND hotkey? September 10, 2007, 4:26 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap