Commit a6248425 authored by devill.tamachan's avatar devill.tamachan

[修正] コード整理

parent 7cfdd1cf
......@@ -110,6 +110,11 @@ public:
return TRUE;
}
void InitSubView()
{
Clear();
}
void Clear()
{
ATLTRACE("AnalyzerClear!\n");
......
......@@ -389,6 +389,11 @@ public:
return pCoreData->GetSplitterWnd();
}
void InitSubView()
{
OnInitialUpdate();
}
void OnInitialUpdate()
{
CBZDoc2* pDoc = GetBZDoc2();
......
......@@ -297,6 +297,11 @@ public:
return TRUE;
}
void InitSubView()
{
SelectTag();
}
/*int OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if(options.xSplitStruct == 0)
......
......@@ -130,6 +130,10 @@ public:
return TRUE;
}
void InitSubView()
{
}
void OnBnClickedInsIntel(UINT uNotifyCode, int nID, CWindow wndCtl)
{
options.bByteOrder = !options.bByteOrder;
......
......@@ -11,5 +11,9 @@ public:
virtual ~CBZSubView(void)
{
}
virtual int GetWindowIdealWidth() = 0;
virtual void InitSubView() = 0;
};
......@@ -704,24 +704,8 @@ void CBZView::Update()
void CBZView::UpdateSubView()
{
CMainFrame *pMainFrame = GetMainFrame();
if(pMainFrame)
{
if(pMainFrame->m_bStructView) {
CBZFormView* pView = dynamic_cast<CBZFormView*>(GetSubView());
if(pView!=NULL)
pView->SelectTag();
}
if(pMainFrame->m_bAnalyzerView) {
CBZAnalyzerView* pView = dynamic_cast<CBZAnalyzerView*>(GetSubView());
if(pView!=NULL)
pView->Clear();
}
if(pMainFrame->m_bBmpView) {
CBZBmpView2* pView = dynamic_cast<CBZBmpView2*>(GetSubView());
if(pView!=NULL)
pView->OnInitialUpdate();
}
}
CBZSubView *pSubView = GetSubView();
if(pSubView)pSubView->InitSubView();
}
void CBZView::UpdateMiniToolbar()
......
......@@ -848,27 +848,13 @@ CBZView *CMainFrame::GetBrotherView(CBZView* pView)
int CMainFrame::GetSubViewIdealWidth(DWORD idx)
{
CBZCoreData *pCoreData = CBZCoreData::GetInstance();
CBZSubView *pSub0 = pCoreData->GetSubView(idx);
if(pSub0==NULL)
CBZSubView *pSubView = pCoreData->GetSubView(idx);
if(pSubView==NULL)
{
ATLASSERT(FALSE);
return 0;
}
if(m_bBmpView)
{
CBZBmpView2 *pBmpView = dynamic_cast<CBZBmpView2*>(pSub0);
return pBmpView->GetWindowIdealWidth();
} else if(m_bStructView) {
CBZFormView *pFormView = dynamic_cast<CBZFormView*>(pSub0);
return pFormView->GetWindowIdealWidth();
} else if(m_bInspectView) {
CBZInspectView *pInsView = dynamic_cast<CBZInspectView*>(pSub0);
return pInsView->GetWindowIdealWidth();
} else if(m_bAnalyzerView) {
CBZAnalyzerView *pAnaView = dynamic_cast<CBZAnalyzerView*>(pSub0);
return pAnaView->GetWindowIdealWidth();
}
return 0;
return pSubView->GetWindowIdealWidth();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment