int KUiConnectInfo::WndProc(unsigned int uMsg, unsigned int uParam, int nParam) { switch(uMsg) { case WND_N_BUTTON_CLICK: if (uParam == (unsigned int)(KWndWindow*)&m_ConfirmBtn || uParam == (unsigned int)(KWndWindow*)&m_ContinueBtn) OnClickConfirmBtn(); else if (uParam == (unsigned int)(KWndWindow*)&m_DelRoleBtn) OnDelRole(); else if (uParam == (unsigned int)(KWndWindow*)&m_CancelDelRoleBtn) OnCancelDelRole(); // else if(uParam == (unsigned int)(KWndWindow*)&m_BtnUnlockLink) // { // ShellExecute(g_GetMainHWnd(), NULL, m_szUnlockLink, NULL, NULL, SW_SHOWNORMAL); // ShowWindow(g_GetMainHWnd(), SW_MINIMIZE); // } break; case WM_KEYDOWN: if (m_ConfirmBtn.GetParent() && (uParam == VK_RETURN || uParam == VK_ESCAPE)) OnClickConfirmBtn(); else if (m_DelRoleBtn.GetParent() && uParam == VK_RETURN) OnDelRole(); else if (m_CancelDelRoleBtn.GetParent() && uParam == VK_ESCAPE) OnCancelDelRole(); return 1; default: return KWndImage::WndProc(uMsg, uParam, nParam); break; } return 0; }
int KUiConnectInfo::WndProc(unsigned int uMsg, unsigned int uParam, int nParam) { switch(uMsg) { case WND_N_BUTTON_CLICK: if (uParam == (unsigned int)(KWndWindow*)&m_ConfirmBtn) OnClickConfirmBtn(); else if (uParam == (unsigned int)(KWndWindow*)&m_DelRoleBtn) OnDelRole(); else if (uParam == (unsigned int)(KWndWindow*)&m_CancelDelRoleBtn) OnCancelDelRole(); break; case WM_KEYDOWN: if (m_ConfirmBtn.GetParent() && (uParam == VK_RETURN || uParam == VK_ESCAPE)) OnClickConfirmBtn(); else if (m_DelRoleBtn.GetParent() && uParam == VK_RETURN) OnDelRole(); else if (m_CancelDelRoleBtn.GetParent() && uParam == VK_ESCAPE) OnCancelDelRole(); return 1; default: return KWndImage::WndProc(uMsg, uParam, nParam); break; } return 0; }