//-------------------------------------------------------------------------- // 功能:隐藏窗口 //-------------------------------------------------------------------------- void KWndWindow::Hide() { m_Style &= ~WND_S_VISIBLE; g_MouseOver.OnWndClosed((void*)this); KWndWindow* pFocus = Wnd_GetFocusWnd(); while(pFocus) { if (pFocus != this) pFocus = pFocus->m_pParentWnd; else { Wnd_SetFocusWnd(NULL); break; } } Wnd_ReleaseExclusive(this); // if (m_pFirstChild) // { // KWndWindow* pChild = m_pFirstChild; // while (pChild) // { // pChild->Hide(); // // pChild = pChild->m_pNextWnd; // } // } }
//-------------------------------------------------------------------------- // 功能:响应点击按钮 //-------------------------------------------------------------------------- void KUiSelDlg::OnClickButton(KWndWindow* pWnd) { for (int i = 0; i < KUISEL_MAX_OPTION; i++) if (pWnd == (KWndWindow*)&m_OptionBtn[i]) { Wnd_ReleaseExclusive(this); Hide(); g_pCoreShell->OperationRequest(GOI_QUESTION_CHOOSE, 0, i); break; } }
//-------------------------------------------------------------------------- // 功能:隐藏窗口 //-------------------------------------------------------------------------- void KUiInformation::Hide(int nBtnIndex) { if (m_pCallerWnd) { m_pCallerWnd->WndProc(WND_M_OTHER_WORK_RESULT, m_uCallerParam, WND_OPER_RESULT(nBtnIndex)); m_pCallerWnd = NULL; } Wnd_ReleaseExclusive((KWndWindow*)this); KWndShowAnimate::Hide(); }
//-------------------------------------------------------------------------- // 功能:关闭窗口,同时可以选则是否删除对象实例 //-------------------------------------------------------------------------- void KUiConnectInfo::CloseWindow(bool bDestroy) { if (m_pSelf) { if (bDestroy == false) { m_pSelf->Hide(); } else { Wnd_ReleaseExclusive(m_pSelf); m_pSelf->Destroy(); m_pSelf = NULL; } } }
//-------------------------------------------------------------------------- // 功能:关闭窗口 //-------------------------------------------------------------------------- void KUiNewPlayerStartMsg::CloseWindow(bool bDestroy) { if (m_pSelf) { Wnd_ReleaseExclusive(m_pSelf); if (bDestroy) { m_pSelf->Destroy(); m_pSelf = NULL; } else { m_pSelf->Hide(); } } }
//-------------------------------------------------------------------------- // 功能:隐藏窗口 //-------------------------------------------------------------------------- void KWndWindow::Hide() { m_Style &= ~WND_S_VISIBLE; g_MouseOver.OnWndClosed((void*)this); KWndWindow* pFocus = Wnd_GetFocusWnd(); while(pFocus) { if (pFocus != this) pFocus = pFocus->m_pParentWnd; else { Wnd_SetFocusWnd(NULL); break; } } Wnd_ReleaseExclusive(this); }
/********************************************************************* * 功能:窗口函数 **********************************************************************/ void KUiPopupPasswordQuery::OnConfirm() { if(m_pCaller) { char Buff[16], szMD5[64]; m_Password.GetText(Buff, sizeof(Buff), TRUE); if(Buff[0]) { KSG_StringToMD5String(szMD5, Buff); Wnd_ReleaseExclusive((KWndWindow*)this); m_pCaller->WndProc(WND_M_OTHER_WORK_RESULT, m_uParam, (int)szMD5); } else { return; } } m_Password.ClearText(); CloseWindow(); }
//隐藏窗口 void KUiESCDlg::Hide() { Wnd_ReleaseExclusive((KWndWindow*)this); KWndShowAnimate::Hide(); }
//隐藏窗口 void KUiGetString::Hide() { Wnd_SetFocusWnd(NULL); Wnd_ReleaseExclusive((KWndWindow*)this); KWndImage::Hide(); }
//关闭窗口,不通调用窗口 void KUiInformation::Close() { Wnd_ReleaseExclusive((KWndWindow*)this); KWndShowAnimate::Hide(); }