Prev: Access to \*.vol-Files?
Next: eVC 4 Startup error
From: Daniel Boss on 2 Mar 2006 09:15 Hi all Firstly i have to say that my english is not very god ;-) I have an Pocket-Pc within i can take some phone call. Now i try to create an Full-Screen Modal-CDialog. With this code was you see, its works fine. The Problem is, that i should blocking the Phone-Call Button (Hardware) while my Program is runnig. Cxy:OnInitDialog() { CommandBar_Show(m_pWndEmptyCB->m_hWnd, FALSE); <- Problem SetForegroundWindow(); SHFullScreen(m_hWnd, SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON | SHFS_HIDETASKBAR); RECT rc; GetWindowRect(&rc); MoveWindow(rc.left, rc.top-26, rc.right, rc.bottom+26, TRUE); GetWindowRect(&m_MainRect); BYTE appkey; appkey=SHGetAppKeyAssoc(_T("test.exe")); if (appkey!=0) { RegisterHotKey(m_hWnd, VK_TSOFT1, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_TSOFT2, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_TTALK, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_TEND, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_THOME, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_TBACK, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_TACTION, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_TRECORD, MOD_WIN, appkey); RegisterHotKey(m_hWnd, VK_TFLIP, MOD_WIN, appkey); } } When i remove "CommandBar_Show(m_pWndEmptyCB->m_hWnd, FALSE);" from my InitDialog, in this case the Call-Button can be blocked with the following code. But when this code are writen in InitDialog, i never receive the WM_HOTKEY from the Hardware-Button. BOOL CTestDlg::PreTranslateMessage(MSG* pMsg) { if(pMsg->message == WM_HOTKEY) { SetForegroundWindow(); return TRUE; } } What can i do to blocking all Hardware-Button, all the times? Do you have an Idea? Thanks for help! (and sorry about my englisch *smile* Dani
From: dave on 3 Mar 2006 07:24 One way is to use GAPI (GX.DLL) to take control of input when you require. "Daniel Boss" <timeasREMOVETHIS(a)bk-soft.ch> wrote in message news:uJ%23anOgPGHA.312(a)TK2MSFTNGP12.phx.gbl... > Hi all > > Firstly i have to say that my english is not very god ;-) > > I have an Pocket-Pc within i can take some phone call. > > Now i try to create an Full-Screen Modal-CDialog. With this code was you > see, its works fine. > The Problem is, that i should blocking the Phone-Call Button (Hardware) > while my Program is runnig. > > Cxy:OnInitDialog() { > CommandBar_Show(m_pWndEmptyCB->m_hWnd, FALSE); <- Problem > > SetForegroundWindow(); > SHFullScreen(m_hWnd, SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON | > SHFS_HIDETASKBAR); > > RECT rc; > GetWindowRect(&rc); > MoveWindow(rc.left, rc.top-26, rc.right, rc.bottom+26, TRUE); > > GetWindowRect(&m_MainRect); > > BYTE appkey; > appkey=SHGetAppKeyAssoc(_T("test.exe")); > if (appkey!=0) > { > RegisterHotKey(m_hWnd, VK_TSOFT1, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_TSOFT2, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_TTALK, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_TEND, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_THOME, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_TBACK, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_TACTION, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_TRECORD, MOD_WIN, appkey); > RegisterHotKey(m_hWnd, VK_TFLIP, MOD_WIN, appkey); > } > } > > When i remove "CommandBar_Show(m_pWndEmptyCB->m_hWnd, FALSE);" from my > InitDialog, in this case the Call-Button can be blocked with the following > code. But when this code are writen in InitDialog, i never receive the > WM_HOTKEY from the Hardware-Button. > > BOOL CTestDlg::PreTranslateMessage(MSG* pMsg) > { > if(pMsg->message == WM_HOTKEY) > { > SetForegroundWindow(); > return TRUE; > } > } > > What can i do to blocking all Hardware-Button, all the times? Do you have an > Idea? > > Thanks for help! > (and sorry about my englisch *smile* > > Dani > > >
|
Pages: 1 Prev: Access to \*.vol-Files? Next: eVC 4 Startup error |