Hi,
> I am writing an app using VS 2008 for my phone that has Win Mobile 6.1 I
> think. How could I prevent the back key from closing my app? Thanks in
> advance.
You don't mention which language or framework you are using.
The Navigation Keys section of the Windows Mobile Smartphone documentation
(http://msdn.microsoft.com/en-us/library/ms832342.aspx) has two pages
dealing with how to deal with the Back key if you don't want the default
behaviour (see the See Also section at the bottom). The key is to send the
SHCMBM_OVERRIDEKEY window message to your dialog's menubar.
If you are a .NET Compact Framework developer the "How To: Override the
Smartphone Back Key" article available on MSDN at
http://msdn.microsoft.com/en-us/library/ms172543.aspx may be helpful
It may have been better to post this question to the
microsoft.public.smartphone.developer newsgroup.
Hope this helps,
Christopher Fairbairn
CodeTestDummy - 11 Jul 2008 03:16 GMT
I am using VC++.
> Hi,
>
[quoted text clipped - 19 lines]
> Hope this helps,
> Christopher Fairbairn
vishal.g.shah@gmail.com - 11 Jul 2008 16:10 GMT
u can try using pretranslate message..
add PreTranslateMessage and capture Back button pressed it will
override default back button handler..
BOOL CXYZAppDlg::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message==WM_KEYDOWN)
{
switch(pMsg->wParam)
{
//
// capture your back button here
}
pMsg->message = 0;
}
return CDialog::PreTranslateMessage(pMsg);
}
On Jul 11, 7:16 am, "CodeTestDummy"
<sharp_mind.TAKETHIS...@email.TAKETHISOUT.msn.comm> wrote:
> I am using VC++.