1 Star 0 Fork 0

soui3-demo/SlogViewer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
FindDlg.cpp 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
huangjianxiong 提交于 2019-11-08 11:06 . adapter to soui3
#include "stdafx.h"
#include "FindDlg.h"
namespace SOUI
{
CFindDlg::CFindDlg(IFindListener *pFindListener)
:SHostWnd(UIRES.LAYOUT.dlg_find)
,m_pFindListener(pFindListener)
{
}
CFindDlg::~CFindDlg(void)
{
}
void CFindDlg::OnFinalMessage(HWND hWnd)
{
__super::OnFinalMessage(hWnd);
delete this;
}
void CFindDlg::OnClose()
{
SNativeWnd::ShowWindow(SW_HIDE);
}
void CFindDlg::OnFindNext()
{
OnFind(true);
}
void CFindDlg::OnFindPrev()
{
OnFind(false);
}
void CFindDlg::OnFind(bool bNext)
{
if(!m_pFindListener) return;
SStringT strText = m_pEditTarget->GetWindowText();
if(strText.IsEmpty()) return;
bool bMatchCase = !!m_pMatchCase->IsChecked();
bool bMatchWholeWord = !!m_pMatchWholeWord->IsChecked();
m_pFindListener->OnFind(strText,bNext,bMatchCase,bMatchWholeWord);
}
void CFindDlg::OnInit(EventArgs *e)
{
m_pEditTarget = FindChildByID2<SEdit>(R.id.edit_search);
m_pMatchCase = FindChildByID2<SCheckBox>(R.id.chk_match_case);
m_pMatchWholeWord = FindChildByID2<SCheckBox>(R.id.chk_match_whole_word);
m_pEditTarget->SetFocus();
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/soui3-demo/SlogViewer.git
git@gitee.com:soui3-demo/SlogViewer.git
soui3-demo
SlogViewer
SlogViewer
master

搜索帮助