6 Star 8 Fork 0

anzizhao / TitleReader

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
titleShowDlg.cpp 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
anzizhao 提交于 2013-05-27 21:34 . 简单修改readme文件
// titleShowDlg.cpp : 实现文件
//
#include "stdafx.h"
#include "treeview.h"
#include "titleShowDlg.h"
#include "TitleTemplateDlg.h"
#include "afxdialogex.h"
// titleShowDlg 对话框
IMPLEMENT_DYNAMIC(titleShowDlg, CDialogEx)
titleShowDlg::titleShowDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(titleShowDlg::IDD, pParent)
{
}
titleShowDlg::~titleShowDlg()
{
}
void titleShowDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(titleShowDlg, CDialogEx)
ON_BN_CLICKED(IDC_BUTTON1, &titleShowDlg::OnBnClickedButton1)
END_MESSAGE_MAP()
// titleShowDlg 消息处理程序
BOOL titleShowDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// TODO: 在此添加额外的初始化
CWnd *pWnd = this->GetDlgItem( IDC_SHOWTITLE_STATICSHOW );
pWnd->SetWindowTextW ( _T("") );
CString showAllTitle, showTitle;
TitleTemplateDlg *ttdlg = ( TitleTemplateDlg *)this->m_pParentWnd;
for ( int i=0; i< ttdlg->getTitleSize(); i++ )
{
ttdlg->changeTitleToShow( i ,showTitle );
for ( int j=i; j>0; j-- )
showAllTitle += _T(' ');
showAllTitle += showTitle ;
showAllTitle.AppendFormat( _T(" (第%d级标题)"), i+1 );
showAllTitle += _T("\r\n");
}
pWnd->SetWindowTextW ( showAllTitle );
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
void titleShowDlg::OnBnClickedButton1()
{
// TODO: 在此添加控件通知处理程序代码
CDialogEx::OnOK();
}
C
1
https://gitee.com/anzizhao/titlereader.git
git@gitee.com:anzizhao/titlereader.git
anzizhao
titlereader
TitleReader
master

搜索帮助