6 Star 8 Fork 0

anzizhao / TitleReader

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
titleShowDlg.cpp 1.40 KB
Copy Edit Web IDE Raw Blame History
anzizhao authored 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();
}

Comment ( 0 )

Sign in to post a comment

C
1
https://git.oschina.net/anzizhao/titlereader.git
git@git.oschina.net:anzizhao/titlereader.git
anzizhao
titlereader
TitleReader
master

Search

101014 b92fc32e 1850385 101014 af024cb7 1850385