void CFrameWnd::InitialUpdateFrame( CDocument *pDoc, BOOL bMakeVisible ) /**********************************************************************/ { UNUSED_ALWAYS( pDoc ); if( GetActiveView() == NULL ) { CView *pView = (CView *)GetDescendantWindow( AFX_IDW_PANE_FIRST ); if( pView != NULL ) { if( pView->IsKindOf( RUNTIME_CLASS( CView ) ) ) { SetActiveView( pView ); } else if( pView->IsKindOf( RUNTIME_CLASS( CSplitterWnd ) ) ) { pView = (CView *)pView->GetDescendantWindow( AFX_IDW_PANE_FIRST ); if( pView->IsKindOf( RUNTIME_CLASS( CView ) ) ) { SetActiveView( pView ); } } } } if( pDoc != NULL ) { pDoc->UpdateFrameCounts(); } OnUpdateFrameTitle( TRUE ); SendMessageToDescendants( WM_INITIALUPDATE ); if( bMakeVisible ) { CWinApp *pApp = AfxGetApp(); ASSERT( pApp != NULL ); if( pApp->m_pMainWnd == this ) { ActivateFrame( pApp->m_nCmdShow ); pApp->m_nCmdShow = -1; } else { ActivateFrame(); } } }
void CContentView::OnActivateView( BOOL bActivate, CView* pActivateView, CView* pDeactiveView ) { CView *pView = (CView*)GetDescendantWindow( NC_IDW_OUTLINER ); // The default implementation is to give the focus to RDF tree view( NC_IDW_OUTLINER). // If we can not find a RDF tree view, we will call the base class to set focus properly. if (pView) pView->SetFocus(); else CView::OnActivateView(bActivate, pActivateView,pDeactiveView); }
BOOL CMessageFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) { // Skip up to CGenericFrame, since CMailNewsFrame doesn't call it BOOL res = CGenericFrame::OnCreateClient( lpcs, pContext ); if (res) { CWnd *pView = GetDescendantWindow(IDW_MESSAGE_PANE, TRUE); ASSERT(pView); CWinCX *pWinCX; pWinCX = new CWinCX((CGenericDoc *) pContext->m_pCurrentDoc, this, (CGenericView *)pView); pView = GetDescendantWindow(AFX_IDW_PANE_FIRST, TRUE); m_pMessageView = DYNAMIC_DOWNCAST(CMessageView, pView); ASSERT(m_pMessageView); SetMainContext(pWinCX); SetActiveContext(pWinCX); RECT rect; GetClientRect(&rect); pWinCX->Initialize(FALSE, &rect); pWinCX->GetContext()->type = MWContextMailMsg; pWinCX->GetContext()->fancyFTP = TRUE; pWinCX->GetContext()->fancyNews = TRUE; pWinCX->GetContext()->intrupt = FALSE; pWinCX->GetContext()->reSize = FALSE; m_pMaster = WFE_MSGGetMaster(); m_pPane = MSG_CreateMessagePane( pWinCX->GetContext(), m_pMaster ); m_pMessagePane = m_pPane; MSG_SetFEData(m_pPane, (LPVOID) (LPUNKNOWN) this ); MSG_SetMessagePaneCallbacks(m_pMessagePane, &MsgPaneCB, NULL); } return res; }
void CMessageFrame::OnDestroy() { if (m_pAttachmentData) MSG_FreeAttachmentList(m_pMessagePane, m_pAttachmentData); m_pAttachmentData = NULL; m_pMessagePane = NULL; CMailNewsFrame::OnDestroy(); CView *pView = (CView *) GetDescendantWindow(IDW_MESSAGE_PANE, TRUE); ASSERT(pView && pView->IsKindOf(RUNTIME_CLASS(CNetscapeView))); if(pView) ((CNetscapeView *)pView)->FrameClosing(); }
void CMorphwizardView::OnInitialUpdate() { CSizeFormView::OnInitialUpdate(); // sizing int GlobalX = ::GetSystemMetrics(SM_CXSCREEN); int GlobalY = ::GetSystemMetrics(SM_CYSCREEN); const int DlgWidth = 830; const int DlgHeight = 600; GetParent()->SetWindowPos(NULL, (GlobalX-DlgWidth)/2, (GlobalY-DlgHeight)/2-60, DlgWidth, DlgHeight, SWP_SHOWWINDOW|SWP_NOZORDER); GetParent()->ShowWindow(SW_MAXIMIZE); // Nick [12/Dec/2003] m_PredictedList.InsertColumn(PredictGrammemsColumn,"Grammems",LVCFMT_LEFT, 90); m_PredictedList.InsertColumn(PredictTypeDictColumn,"Type",LVCFMT_LEFT, 35); m_PredictedList.InsertColumn(PredictLemmaColumn,"Source lemma",LVCFMT_LEFT, 90); m_PredictedList.InsertColumn(PredictFreqColumnNo,"Freq",LVCFMT_LEFT, 50); m_PredictedList.InsertColumn(PredictIndexColumnNo,"Innernumber", LVCFMT_LEFT, 0); m_PredictedList.InsertColumn(PredictParadigmColumnNo,"ParadigmNo", LVCFMT_LEFT, 50); m_PredictedList.InsertColumn(PredictLemmaPrefixColumnNo,"Prefix", LVCFMT_LEFT, 50); m_PredictedList.SetExtendedStyle(LVS_EX_FULLROWSELECT); m_FoundList.InsertColumn(FindParadigmColumnNo,"ParadigmNo",LVCFMT_LEFT, 50); m_FoundList.InsertColumn(FindLemmaColumn,"Lemma",LVCFMT_LEFT, 130); m_FoundList.InsertColumn(FindGrammemsColumn,"Grammems",LVCFMT_LEFT, 210); m_FoundList.InsertColumn(FindTypeGrammemsColumn,"Type",LVCFMT_LEFT, 210); m_FoundList.SetExtendedStyle(LVS_EX_FULLROWSELECT); //m_FoundList.AddTip(0, "Tip1"); //m_FoundList.AddTip(1, "Tip2"); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); } } SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon CheckRadioButton(IDC_RFIND_LEM,IDC_WORD_FORM,IDC_RFIND_LEM); m_inFind = true; m_inPredict = false; m_inFilter = false; if (!GetWizard()->m_ReadOnly) { GetDescendantWindow(IDC_READONLY_IMAGE)->ShowWindow(SW_HIDE); } else { //GetDlgItem(IDC_REMOVE)->ShowWindow(SW_HIDE); //GetDlgItem(IDC_ADD)->ShowWindow(SW_HIDE); //GetDlgItem(IDC_EDIT)->SetWindowText("VIEW"); } m_MinimalFrequence = 2; m_bOnlyMainPartOfSpeeches = TRUE; UpdateData(FALSE); // CMorphwizardApp* App = (CMorphwizardApp*)AfxGetApp(); // App->m_PointerCount[this] = 0; }
CWnd* CChildFrame::GetMessageBar() { return GetDescendantWindow(AFX_IDW_STATUS_BAR, TRUE); }
void CContentView::OnSetFocus ( CWnd * pOldWnd ) { CView *pView = (CView*)GetDescendantWindow( NC_IDW_OUTLINER ); if (pView) pView->SetFocus(); }