CFindReplaceDialog学习
The CFindReplaceDialog class allows you to implement standard string Find/Replace dialog boxes in your application. Unlike the other Windows common dialog boxes, CFindReplaceDialog objects are modeless, allowing users to interact with other windows while they are on screen. There are two kinds of CFindReplaceDialog objects: Find dialog boxes and Find/Replace dialog boxes. Although the dialog boxes allow the user to input search and search/replace strings, they do not perform any of the searching or replacing functions. You must add these to the application.
To construct a CFindReplaceDialog object, use the provided constructor (which has no arguments). Since this is a modeless dialog box, allocate the object on the heap using the new operator, rather than on the stack.
Once a CFindReplaceDialog object has been constructed, you must call the Create member function to create and display the dialog box.
Use the m_fr structure to initialize the dialog box before calling Create. The m_fr structure is of type FINDREPLACE. For more information on this structure, see the Win32 SDK documentation.
In order for the parent window to be notified of find/replace requests, you must use the Windows RegisterWindowMessage function and use the ON_REGISTERED_MESSAGE message-map macro in your frame window that handles this registered message. You can call any of the member functions listed in the “Operations” section of the CFindReplaceDialog Class Members table from the frame window’s callback function.
You can determine whether the user has decided to terminate the dialog box with the IsTerminating member function.
CFindReplaceDialog relies on the COMMDLG.DLL file that ships with Windows versions 3.1 and later.
To customize the dialog box, derive a class from CFindReplaceDialog, provide a custom dialog template, and add a message map to process the notification messages from the extended controls. Any unprocessed messages should be passed to the base class.
Customizing the hook function is not required.
/*
第一个参数为true显示的是查找对话框,为False时显示的是查找和替换对话框
第二个参数指定在查找对话框中显示的字符串
第三个参数指定在替换对话框中显示的字符串
第四个参数为指定标志位,用来定制对话框,其中FR_DOWM表示对话框中的“向下”单选按钮被选中,否则“向上”单选按钮被选中,具体可取值参考MSDN
第五个参数为指向父窗口的指针,如果为NULL,则为主框架窗口,使用时需要让它指向接收查找和替换消息的窗口
*/
void CMfcFindReplaceDlgDlg::OnBtnF()
{
CFindReplaceDialog* pFRDlg = new CFindReplaceDialog(); // Must be created on the heap
pFRDlg->Create( TRUE, "", "", FR_DOWN, this );
} void CMfcFindReplaceDlgDlg::OnBtnFr()
{
CFindReplaceDialog* pFRDlg = new CFindReplaceDialog(); // Must be created on the heap
pFRDlg->Create( FALSE, "", "", FR_DOWN, this );
}

CFindReplaceDialog学习的更多相关文章
- 从直播编程到直播教育:LiveEdu.tv开启多元化的在线学习直播时代
2015年9月,一个叫Livecoding.tv的网站在互联网上引起了编程界的注意.缘于Pingwest品玩的一位编辑在上网时无意中发现了这个网站,并写了一篇文章<一个比直播睡觉更奇怪的网站:直 ...
- Angular2学习笔记(1)
Angular2学习笔记(1) 1. 写在前面 之前基于Electron写过一个Markdown编辑器.就其功能而言,主要功能已经实现,一些小的不影响使用的功能由于时间关系还没有完成:但就代码而言,之 ...
- ABP入门系列(1)——学习Abp框架之实操演练
作为.Net工地搬砖长工一名,一直致力于挖坑(Bug)填坑(Debug),但技术却不见长进.也曾热情于新技术的学习,憧憬过成为技术大拿.从前端到后端,从bootstrap到javascript,从py ...
- 消息队列——RabbitMQ学习笔记
消息队列--RabbitMQ学习笔记 1. 写在前面 昨天简单学习了一个消息队列项目--RabbitMQ,今天趁热打铁,将学到的东西记录下来. 学习的资料主要是官网给出的6个基本的消息发送/接收模型, ...
- js学习笔记:webpack基础入门(一)
之前听说过webpack,今天想正式的接触一下,先跟着webpack的官方用户指南走: 在这里有: 如何安装webpack 如何使用webpack 如何使用loader 如何使用webpack的开发者 ...
- Unity3d学习 制作地形
这周学习了如何在unity中制作地形,就是在一个Terrain的对象上盖几座小山,在山底种几棵树,那就讲一下如何完成上述内容. 1.在新键得项目的游戏的Hierarchy目录中新键一个Terrain对 ...
- 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...
- 菜鸟Python学习笔记第一天:关于一些函数库的使用
2017年1月3日 星期二 大一学习一门新的计算机语言真的很难,有时候连函数拼写出错查错都能查半天,没办法,谁让我英语太渣. 关于计算机语言的学习我想还是从C语言学习开始为好,Python有很多语言的 ...
- 多线程爬坑之路-学习多线程需要来了解哪些东西?(concurrent并发包的数据结构和线程池,Locks锁,Atomic原子类)
前言:刚学习了一段机器学习,最近需要重构一个java项目,又赶过来看java.大多是线程代码,没办法,那时候总觉得多线程是个很难的部分很少用到,所以一直没下决定去啃,那些年留下的坑,总是得自己跳进去填 ...
随机推荐
- Linux tftp配置
TFTP是用来下载远程文件的最简单网络协议,它其于UDP协议而实现. xinetd(eXtended InterNET services daemon)是新一代的网络守护进程服务程序,又叫超级INTE ...
- IP地址转化为32位无符号数
转自 http://blog.csdn.net/testcs_dn/article/details/38585719 一.将ip地址转成long数值 将IP地址转化成整数的方法如下: 1.通过Stri ...
- webmagic 下载页面
下面是webmagic官方的默认实现HttpClientDownloader中的下载方法. @Override public Page download(Request request, Task t ...
- 2017.11.15 linux软件安装管理(todo)
学习来自:http://www.imooc.com/learn/447 第一章 介绍 第二章 软件包简介 1.源码包 2.二进制包(RPM包或系统默认包) 脚本安装包其实是别人把软件安装的脚本写好了, ...
- Solution of NumberOfDiscIntersections by Codility
question:https://codility.com/programmers/lessons/4 this question is seem like line intersections qu ...
- EXTJS4自学手册——报表概述
Ext画报表所涉及到的组件关系如下: Store:数据容器 Legend:图像说明 Axis:横.纵坐标 Series:报表图像
- (六)Oracle学习笔记—— 约束
1. 约束介绍 表虽然建立完成了,但是表中的数据是否合法并不能有所检查,而如果要想针对于表中的数据做一些过滤的话,则可以通过约束完成,约束的主要功能是保证表中的数据合法性. 按照约束的分类,一共有五种 ...
- 改变Fragment的默认动画
FragmentTransaction ft = getFragmentManager().beginTransaction(); //设置进入退出动画 ft.setCustomAnimations( ...
- 冲销会计凭证:FBRP与FB08的区别
FBRA一般是用来对已经清帐的凭证进行冲销的,我们知道普通的冲销只要用FB08就可以了,但是对于已经被清帐和凭证,我们只能用FBRA来进行清帐,我们来按以下的没测试来做验证一下.STEP1:用F-22 ...
- android-gradle-深入浅出-五:build type
默认情况下,Android插件自动为项目构建一个debug和一个release版本的应用.这两个版本的不同主要体现在在非开发机上的调试功能以及APK的签名方式.debug版本使用一个用公开的name/ ...