Prev: IPAQ rx1955 and DLINK DIR-655
Next: Problems with UnregisterFunc1Proc to capture vk_ttalk and vk_tend events.
From: vishal.g.shah on 11 Dec 2008 01:19 Hi all, I am trying to write an custom dialer for my voip based application. I need to capture Vk_ttalk and vk_tend buttons and override default dialer coming up even when my app is not in focus Hi have tried following peice of code to register hotkey fr my app. HINSTANCE hi = LoadLibrary(_T("coredll.dll")); UnregisterFunc1Proc procUnregisterFunc; if (hi) { procUnregisterFunc = (UnregisterFunc1Proc)GetProcAddress(hi, _T ("UnregisterFunc1")); } procUnregisterFunc(0, VK_TEND); procUnregisterFunc(0, VK_TTALK); FreeLibrary(hi); HWND hWndTask = ::FindWindow(_T("HHTaskBar"), NULL); ::UnregisterHotKey(hWndTask, VK_TTALK); ::UnregisterHotKey(hWndTask, VK_TEND); //Register Call and hang up keys for my app ::RegisterHotKey(m_hWnd, VK_TTALK_ID, ONE_SHOT_MOD, VK_TTALK); ::RegisterHotKey(m_hWnd, VK_TEND_ID, ONE_SHOT_MOD, VK_TEND); And while exiting my application i unregister VK_TTALK and VK_TEND using following peice of code ::UnregisterHotKey(m_hWnd, VK_TTALK); ::UnregisterHotKey(m_hWnd, VK_TEND); HWND hWndTask = ::FindWindow(_T("HHTaskBar"), NULL); //try to register default handler ::RegisterHotKey(hWndTask, VK_TTALK, MOD_WIN , VK_TTALK); ::RegisterHotKey(hWndTask, VK_TTALK, MOD_WIN , VK_TEND); Problem i am facing is even after i exit my application default dialer does not come up on pressing call button does anyone know how to unregister my hotkeys ?? Plz help...... |