edit control的一个例子
来源:互联网 发布:js跨域解决方案c# 编辑:程序博客网 时间:2024/05/22 15:06
C++代码
BOOL CExample21Dlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_editMultiLine.SetWindowText(_T("鸡啄米博客/software")); // 设置编辑框正文为“鸡啄米博客.com”
m_editMultiLine.SetSel(3, 5); // 选择起始索引为3,终止索引为5(不包括在选择范围内)的正文,即“博客”
m_editMultiLine.ReplaceSel(_T("\r\nwww.jizhuomi.com")); // 将选择的“博客”替换为“\r\nwww.jizhuomi.com”
return TRUE; // return TRUE unless you set the focus to a control
}
BOOL CExample21Dlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_editMultiLine.SetWindowText(_T("鸡啄米博客/software")); // 设置编辑框正文为“鸡啄米博客.com”
m_editMultiLine.SetSel(3, 5); // 选择起始索引为3,终止索引为5(不包括在选择范围内)的正文,即“博客”
m_editMultiLine.ReplaceSel(_T("\r\nwww.jizhuomi.com")); // 将选择的“博客”替换为“\r\nwww.jizhuomi.com”
return TRUE; // return TRUE unless you set the focus to a control
}
0 0
- edit control的一个例子
- 如何给一个MFC的Edit Control赋默认值?
- MFC Edit control的更新
- MFC Edit control的用法
- edit control
- Edit control
- Edit Control
- edit control
- Custom Control控件一个例子
- 一步一步学Edit Control控件的用法
- VC中Edit Control控件的用法
- VC中Edit Control控件的用法
- 限制Edit Control输入的字符
- 限定Edit Control的值(MFC)
- VC中Edit Control控件的用法
- MFC Edit Control 中 换行的问题
- VC中Edit Control控件的用法
- VC_Edit_Control_VC中Edit Control控件的用法
- 设置self.view 图层最上面
- 直击儒豹搜索:搜你想看 索你所想
- java 遍历map中的key,和value 值
- hdu 4292 Food 最大流+拆点
- Linux netstat命令详解(精)
- edit control的一个例子
- sicily 1428之水题一道
- HDU4944多校第七场第十题(请叫我事前猪一样。。。)
- QT实现控件自动适合窗口大小
- break
- [转] Android系统运行状态查看工具dumpsys的使用
- 添加插件--跨平台移动开发phonegap/cordova 3.3全系列教程-helloworld
- Python练习代码 -- 线程创建, 同步
- MSSQL查看存储过程定义