设为首页 加入收藏

TOP

对话方块(七十一)
2010-12-30 21:13:56 来源: 作者: 【 】 浏览:40843
Tags:对话 方块
f (TCHAR))))
return FALSE ;

GetWindowText (hwndEdit, pstrDoc, iLength + 1) ;

// Search the document for the find string

pstrPos = _tcsstr (pstrDoc + * piSearchOffset, pfr->lpstrFindWhat) ;
free (pstrDoc) ;

// Return an error code if the string cannot be found

if (pstrPos == NULL)
return FALSE ;

// Find the position in the document and the new start offset

iPos = pstrPos - pstrDoc ;
* piSearchOffset = iPos + lstrlen (pfr->lpstrFindWhat) ;

// Select the found text
SendMessage (hwndEdit, EM_SETSEL, iPos, * piSearchOffset) ;
SendMessage (hwndEdit, EM_SCROLLCARET, 0, 0) ;

return TRUE ;
}
BOOL PopFindNextText (HWND hwndEdit, int * piSearchOffset)
{
FINDREPLACE fr ;
fr.lpstrFindWhat = szFindText ;
return PopFindFindText (hwndEdit, piSearchOffset, &fr) ;
}

BOOL PopFindReplaceText (HWND hwndEdit, int * piSearchOffset, LPFIND,REPLACE pfr)
{
// Find the text
if (!PopFindFindText (hwndEdit, piSearchOffset, pfr))
return FALSE ;

// Replace it
SendMessage ( hwndEdit, EM_REPLACESEL, 0, (LPARAM) pfr->
lpstrReplaceWith) ;
return TRUE ;
}

BOOL PopFindValidFind (void)
{
return * szFindText != '\0' ;
}
首页 上一页 68 69 70 71 72 73 74 下一页 尾页 71/82/82
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇剪贴簿 下一篇功能表及其他资源

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: