Skip to content

Commit ed74a6b

Browse files
committed
Window Title
1 parent 4104672 commit ed74a6b

11 files changed

Lines changed: 22 additions & 88 deletions

MFCBaseLib/ExClass.cpp

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,23 @@ int jbxwl::ExecDocFrmView(CExFrame* pfrm, LPCTSTR fname)
108108
pfrm->SetFocus();
109109
pfrm->pView->SetFocus();
110110

111-
// pfrm->Title が空で無いときは,各クラスの中でタイトルが設定される はず.
112-
if (pfrm->Title.IsEmpty()) {
113-
pfrm->pView->SetTitle(pfrm->pDoc->Title);
114-
//pfrm->Title = pfrm->pView->Title = pfrm->pDoc->Title;
115-
//pfrm->SetTitle(pfrm->Title);
116-
//pfrm->SetWindowText(pfrm->Title);
117-
//pfrm->pDoc->SetTitle(pfrm->Title);
111+
//
112+
CString title = pfrm->pDoc->preTitle + pfrm->pDoc->Title + pfrm->pDoc->pstTitle;
113+
if (title.IsEmpty()) {
114+
pfrm->pDoc->preTitle = _T("Title: ");
115+
pfrm->pDoc->Title = _T("Temporary Blank");
116+
pfrm->pDoc->pstTitle = _T("");
117+
title = pfrm->pDoc->preTitle + pfrm->pDoc->Title + pfrm->pDoc->pstTitle;
118118
}
119+
if (pfrm->preTitle.IsEmpty()) pfrm->preTitle = pfrm->pDoc->preTitle;
120+
if (pfrm->Title.IsEmpty()) pfrm->Title = title;
121+
if (pfrm->pView->Title.IsEmpty()) pfrm->pView->Title = title;
122+
//
123+
pfrm->pView->SetTitle(title);
124+
pfrm->pDoc->SetTitle(title);
125+
pfrm->SetTitle(title);
126+
pfrm->SetWindowText(title);
127+
119128
return 0;
120129
}
121130

MFCLib/DxDirectView.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ BEGIN_MESSAGE_MAP(CDxDirectView, CDxBaseView)
3131
END_MESSAGE_MAP()
3232

3333

34-
3534
// DxDirectView 描画
3635

3736
void CDxDirectView::OnDraw(CDC* pDC)
@@ -42,7 +41,6 @@ void CDxDirectView::OnDraw(CDC* pDC)
4241
}
4342

4443

45-
4644
// DxDirectView 診断
4745

4846
#ifdef _DEBUG
@@ -166,7 +164,6 @@ void CDxDirectView::OnInitialUpdate()
166164
}
167165

168166

169-
170167
BOOL CDxDirectView::SetNewSurface(int dummy)
171168
{
172169
if (isNull(viewData.grptr)) {
@@ -274,7 +271,6 @@ BOOL CDxDirectView::SetNewSurface(int dummy)
274271
}
275272

276273

277-
278274
void CDxDirectView::ExecRender()
279275
{
280276
if (isNull(lpD3DDevice)) return;
@@ -310,7 +306,6 @@ void CDxDirectView::ExecRender()
310306
}
311307

312308

313-
314309
void CDxDirectView::InitObject()
315310
{
316311
bufferSize = Dx9GetBackBuffer(lpD3DDevice, &lpBackBuffer);
@@ -360,4 +355,3 @@ void CDxDirectView::InitObject()
360355
}
361356
return;
362357
}
363-

MFCLib/DxGraphDoc.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ CDxGraphDoc::~CDxGraphDoc()
3333
}
3434

3535

36-
3736
BEGIN_MESSAGE_MAP(CDxGraphDoc, CExDocument)
3837
//{{AFX_MSG_MAP(CDxGraphDoc)
3938
// メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します.
@@ -42,7 +41,6 @@ END_MESSAGE_MAP()
4241

4342

4443

45-
4644
/////////////////////////////////////////////////////////////////////////////
4745
// CDxGraphDoc 診断
4846

@@ -61,7 +59,6 @@ void CDxGraphDoc::Dump(CDumpContext& dc) const
6159

6260

6361

64-
6562
/////////////////////////////////////////////////////////////////////////////
6663
// CDxGraphDoc シリアライズ
6764

@@ -79,7 +76,6 @@ void CDxGraphDoc::Serialize(CArchive& ar)
7976

8077

8178

82-
8379
/////////////////////////////////////////////////////////////////////////////
8480
// CDxGraphDoc コマンド
8581

@@ -109,7 +105,6 @@ BOOL CDxGraphDoc::ReadDataFile(LPCTSTR str)
109105
}
110106

111107

112-
113108
BOOL CDxGraphDoc::MakeViewData()
114109
{
115110
// int kind = cmnHead.kind;
@@ -120,9 +115,9 @@ BOOL CDxGraphDoc::MakeViewData()
120115

121116
int mode = 0;
122117
if (msGraph.color==GRAPH_COLOR_MONO || msGraph.color==GRAPH_COLOR_MONO16 || // 表示は 8bit
123-
msGraph.color==GRAPH_COLOR_RGB || msGraph.color==GRAPH_COLOR_BGR ||
124-
msGraph.color==GRAPH_COLOR_XRGB || msGraph.color==GRAPH_COLOR_ARGB || msGraph.color==GRAPH_COLOR_RGBA ||
125-
msGraph.color==GRAPH_COLOR_XBGR || msGraph.color==GRAPH_COLOR_ABGR || msGraph.color==GRAPH_COLOR_BGRA) {
118+
msGraph.color==GRAPH_COLOR_RGB || msGraph.color==GRAPH_COLOR_BGR ||
119+
msGraph.color==GRAPH_COLOR_XRGB || msGraph.color==GRAPH_COLOR_ARGB || msGraph.color==GRAPH_COLOR_RGBA ||
120+
msGraph.color==GRAPH_COLOR_XBGR || msGraph.color==GRAPH_COLOR_ABGR || msGraph.color==GRAPH_COLOR_BGRA) {
126121
// 8bit/pixcel
127122
mode = MG2CH_OCTET;
128123
}

MFCLib/DxMGRView.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ CDxMGRView::~CDxMGRView()
4848
}
4949

5050

51-
5251
BEGIN_MESSAGE_MAP(CDxMGRView, CDxBaseView)
5352
//{{AFX_MSG_MAP(CDxMGRView)
5453
//}}AFX_MSG_MAP
@@ -308,7 +307,6 @@ void CDxMGRView::OnInitialUpdate()
308307
}
309308

310309

311-
312310
BOOL CDxMGRView::SetNewSurface(int dummy)
313311
{
314312
int point, n;

MFCLib/DxSRenderView.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ CDxSRenderView::CDxSRenderView()
5252
}
5353

5454

55-
5655
CDxSRenderView::~CDxSRenderView()
5756
{
5857
}
5958

6059

61-
6260
BEGIN_MESSAGE_MAP(CDxSRenderView, CDxVTXBaseView)
6361
//{{AFX_MSG_MAP(CDxSRenderView)
6462
ON_WM_TIMER()
@@ -161,7 +159,6 @@ void CDxSRenderView::OnInitialUpdate()
161159
}
162160

163161

164-
165162
void CDxSRenderView::SetState()
166163
{
167164
D3DLIGHT9 m_light;
@@ -293,7 +290,6 @@ void CDxSRenderView::ExecRender()
293290
}
294291

295292

296-
297293
// 頂点バッファの準備
298294
BOOL CDxSRenderView::PrepareVB()
299295
{
@@ -535,5 +531,3 @@ int CDxSRenderView::GetValidVoxelNum()
535531
}
536532
return cnt;
537533
}
538-
539-

MFCLib/DxVScrollView.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
static char THIS_FILE[] = __FILE__;
1313
#endif
1414

15-
1615
using namespace jbxl;
1716
using namespace jbxwl;
1817

@@ -51,13 +50,11 @@ CDxVScrollView::CDxVScrollView()
5150
}
5251

5352

54-
5553
CDxVScrollView::~CDxVScrollView()
5654
{
5755
}
5856

5957

60-
6158
BEGIN_MESSAGE_MAP(CDxVScrollView, CDxBaseView)
6259
//{{AFX_MSG_MAP(CDxVScrollView)
6360
ON_WM_SIZE()
@@ -66,7 +63,6 @@ BEGIN_MESSAGE_MAP(CDxVScrollView, CDxBaseView)
6663
END_MESSAGE_MAP()
6764

6865

69-
7066
/////////////////////////////////////////////////////////////////////////////
7167
// CDxVScrollView 描画
7268
/*
@@ -98,7 +94,6 @@ void CDxVScrollView::Dump(CDumpContext& dc) const
9894

9995

10096

101-
10297
/////////////////////////////////////////////////////////////////////////////
10398
// CDxVScrollView メッセージ ハンドラ
10499

@@ -250,7 +245,6 @@ void CDxVScrollView::InitObject()
250245
}
251246

252247

253-
254248
BOOL CDxVScrollView::SetNewSurface(int ovsbpos)
255249
{
256250
renderRect.bottom = Min(cmnHead.ysize-1, clientRect.bottom);

MFCLib/GlProcView.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ CGlProcView::CGlProcView()
3131
}
3232

3333

34-
3534
CGlProcView::~CGlProcView()
3635
{
3736
}
3837

3938

40-
4139
// GlProcView 描画
4240

4341
void CGlProcView::ExecRender()
@@ -136,7 +134,6 @@ void CGlProcView::OnSize(UINT nType, int cx, int cy)
136134
}
137135

138136

139-
140137
int CGlProcView::OnCreate(LPCREATESTRUCT lpCreateStruct)
141138
{
142139
//DEBUG_INFO("CGlProcView::OnCreate()\n");
@@ -147,14 +144,12 @@ int CGlProcView::OnCreate(LPCREATESTRUCT lpCreateStruct)
147144
}
148145

149146

150-
151147
void CGlProcView::OnDestroy()
152148
{
153149
CGlBaseView::OnDestroy();
154150
}
155151

156152

157-
158153
// GlProcView 診断
159154

160155
#ifdef _DEBUG

0 commit comments

Comments
 (0)