void CGyfxyHostView::OnInitialUpdate() { CGyfxyHostDoc *pDoc = GetDocument(); pDoc->pHostCtrl = pGyfxyHostCtrl; if(!pGyfxyHostCtrl->InitDevice(pDoc->pRDB)) { #ifndef _DEBUG //初始化设备不成功100ms后关闭窗口,不能在此直接关闭窗口。 SetTimer(TIME_EVENT_CLOSEWINDOWS,1000,NULL); //1000 mS #endif } pRdb = pGyfxyHostCtrl->pRdb; pImg = pGyfxyHostCtrl->pImageSlave; pSample = pGyfxyHostCtrl->pRdb->SampleArray.Sample; //////////////////////////////////////////////////////////// CFormView::OnInitialUpdate(); ///////////////////////////////////////////////////////////// GetParentFrame()->RecalcLayout(); ResizeParentToFit(FALSE); InitUI(); //SendMessage(WM_COMMAND,IDC_BUTTON_SAMPLE_DN,0); ///////////////////////////////// GetParentFrame()->RecalcLayout(); ResizeParentToFit(); }
void CBimolPFView::OnUpdate(CView*, LPARAM, CObject*) { ResizeParentToFit(FALSE); ResizeParentToFit(); }
void CMEADialog::OnUpdate(CView*, LPARAM, CObject*) { ResizeParentToFit(FALSE); ResizeParentToFit(); }
void CBiFoldView::OnInitialUpdate() { if (GetBiFoldDocument()->savefile!=NULL) { if (*GetBiFoldDocument()->savefile) { m_save = TRUE; UpdateData(FALSE); } } ResizeParentToFit(FALSE); ResizeParentToFit(); }
void CEsmUsesDlg::OnInitialUpdate() { CFormView::OnInitialUpdate(); ResizeParentToFit(FALSE); UpdateTitle(); /* Initialize the progress bar */ m_ProgressBar.SetRange(0, 100); m_ProgressBar.SetPos(0); /* Initialize the record list */ m_RecordList.OnInitCtrl(); m_RecordList.SetDlgHandler(m_pDlgHandler); m_RecordList.InitObjectList(l_ItemColData); m_RecordList.SetWantKeys(false); m_RecordList.SetAcceptDrag(false); m_RecordList.SetEnableDrag(true); m_RecordList.SetWantEditMsg(true); /* Find the uses information for the current record */ //ShowWindow(SW_NORMAL); //RedrawWindow(); //GetParentFrame()->ShowWindow(SW_NORMAL); //UpdateUses(); }
void CUSBLogView::OnInitialUpdate() { TRACE("CUSBLogView::OnInitialUpdate()\n"); CFormView::OnInitialUpdate(); ResizeParentToFit(); CUSBLogDoc *pDoc = GetDocument(); m_Log.OnInitialUpdate(); m_Log.SetURBArray(&pDoc->m_arURB); for(int nURB = 0; nURB < pDoc->m_arURB.GetSize(); nURB++) { CURB *pURB = pDoc->m_arURB.GetAt(nURB); if(pURB->IsExpanded()) { CollapseItem(m_Log.FindURB(nURB)); ExpandItem(m_Log.FindURB(nURB)); } } m_cStop.SetBitmap(m_hbmStop); m_cPlayPause.SetBitmap(m_hbmStop); OnUpdate(NULL, 0, NULL); }
void CStudentInfoView::OnInitialUpdate() { MYTRACE("Enter"); m_StudentList = GetDocument()->GetStudentList(); // CAUTION: 这句要放在 OnInitialUpdate 之前调用, 因为 OnInitialUpdate->OnUpdate CFormView::OnInitialUpdate(); ResizeParentToFit(); }
void CMFCConsoleView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(TRUE); }
void CViewMeetings::OnInitialUpdate() { CFormView::OnInitialUpdate(); ResizeParentToFit(); // Fill up the companies combo int nIndex = m_comboCompany.AddString("- New Idea -"); m_comboCompany.SetItemData(nIndex, 0); CArray<int,int> arIds; CStringArray arTickers; CSQLCompany::GetCompanyIDAndTickers(arIds, arTickers, theApp.m_Universe.GetDate()); for(int i=0; i<arIds.GetSize(); i++) { int nID = arIds[i]; CString sTicker = arTickers[i]; nIndex = m_comboCompany.AddString(sTicker); m_comboCompany.SetItemData(nIndex, nID); } Load(); if(m_ListMeetings.GetCount() > 0) { m_ListMeetings.SetCurSel(0); SetData(); } }
void CItemBrowserView::OnInitialUpdate() { CFormView::OnInitialUpdate(); ResizeParentToFit(FALSE); GetParentFrame()->SetWindowText("Item Browser"); CRect rPrompt; m_stCountPrompt.GetWindowRect(&rPrompt); ScreenToClient(&rPrompt); CRect rBitmap; rBitmap.left = rPrompt.left; rBitmap.right = rBitmap.left + 66; rBitmap.top = 10; rBitmap.bottom = rBitmap.top + 66; m_wndBitmap.Create(rBitmap,this,1000); UpdateAssignButton(); m_lcItems.SubclassDlgItem(IDC_ITEMLIST,this); m_lcItems.Init(&m_edDescription,&m_stItemCount,&m_wndBitmap); CRect rClient; GetClientRect(&rClient); OnSize(0,rClient.Width(),rClient.Height()); }
void InfoFrom::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); CRect m_wndRect; GetClientRect(&m_wndRect); CRect m_headerRect; // create the header { m_headerRect.left = m_headerRect.top = -1; m_headerRect.right = m_wndRect.Width(); m_treeList.m_wndHeader.Create(WS_CHILD | WS_VISIBLE | HDS_BUTTONS | HDS_HORZ, m_headerRect, this, ID_TREE_LIST_HEADER); } static CFont font; font.CreateFont(100, 0, 0, 0, FW_NORMAL, FALSE,FALSE,FALSE,GB2312_CHARSET, OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY, DEFAULT_PITCH|FF_MODERN,"宋体"); //m_treeList.m_wndHeader.SetFont(&font); m_treeList.SetFont(&font); CSize textSize; // set header's pos, dimensions and image list { CDC *pDC = m_treeList.m_wndHeader.GetDC(); pDC->SelectObject(&m_treeList.m_headerFont); textSize = pDC->GetTextExtent("A"); m_treeList.m_wndHeader.SetWindowPos(&wndTop, 0, 0, m_headerRect.Width(), textSize.cy+4, SWP_SHOWWINDOW); //m_treeList.m_cImageList.Create(IDB_HEADER, 16, 10, 0); //m_treeList.m_wndHeader.SetImageList(&m_treeList.m_cImageList); m_treeList.m_wndHeader.UpdateWindow(); } CRect m_treeListRect; // create the tree itself { GetClientRect(&m_wndRect); m_treeListRect.left=0; m_treeListRect.top = textSize.cy+4; m_treeListRect.right = m_headerRect.Width()-5; m_treeListRect.bottom = m_wndRect.Height()-GetSystemMetrics(SM_CYHSCROLL)-4; m_treeList.Create(WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | TVS_SHOWSELALWAYS, m_treeListRect, this, ID_TREE_LIST_CTRL); } m_treeList.InsertColumn(0, "名称", LVCFMT_LEFT, 360); m_treeList.InsertColumn(1, "详细内容", LVCFMT_LEFT, 360); m_init = TRUE; SortTree(0, TRUE, m_treeList.GetRootItem()); }
void CtestSpliterView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); }
void Cp07subclassingView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); }
void CMServerManagerView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); CRect rcClient; GetClientRect(&rcClient); GetParentFrame()->RecalcLayout(); // 스크롤 크기를 뷰의 크기로 맞추어 줌. SetScaleToFitSize(rcClient.Size()); m_Brush.CreateSolidBrush(RGB(64, 64, 64)); CRect rtTab; m_stcTab.GetWindowRect(&rtTab); ScreenToClient(&rtTab); m_mfcTab.Create(CMFCTabCtrl::STYLE_3D_VS2005, rtTab, this, 1, CMFCTabCtrl::LOCATION_BOTTOM); g_sToolMgr.InitToolMgr(m_hWnd); g_sToolMgr.GetDialogMgr()->InitDialogMgr(&m_mfcTab); m_mfcTab.AddTab(&g_sToolMgr.GetDialogMgr()->m_StatusDlg, "Status", 0, FALSE); m_mfcTab.AddTab(&g_sToolMgr.GetDialogMgr()->m_LogDlg, "Logs", 1, FALSE); m_mfcTab.AddTab(&g_sToolMgr.GetDialogMgr()->m_UserDlg, "Users", 2, FALSE); OnTabColor(); // 계정 관리 창을 최초로 띄워 접속 및 계정 추가를 할 수 있도록 한다 g_sToolMgr.GetDialogMgr()->m_AccountDlg.DoModal(); }
void CTpmsView::OnInitialUpdate() { CDriversdbset *m_pdbset2; CClientdbset *m_pdbclientset; m_pdbclientset=new CClientdbset(&m_db); m_pdbclientset->Open(); sa_unloadplaces.RemoveAll(); while(!m_pdbclientset->IsEOF()) { sa_unloadplaces.Add(m_pdbclientset->m_unload_place); m_pdbclientset->MoveNext(); } m_pdbclientset->Close(); delete m_pdbclientset; m_pdbset2=new CDriversdbset(&m_db); m_pdbset2->Open(); sa_drivers.RemoveAll(); while(!m_pdbset2->IsEOF()) { sa_drivers.Add(m_pdbset2->m_drivername); m_pdbset2->MoveNext(); } m_pdbset2->Close(); delete m_pdbset2; UpdateComboBoxes(); UpdateList(); CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); }
void CStudentFormView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); UpdateControlsFromDoc(); }
void CToolsView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); }
void COpenSGDemoView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); // Recalculate the correct dimensions of the control RECT rectControl, rectDlg; m_RenderStatic.GetWindowRect(&rectControl); GetDlgItem(IDC_STATIC)->GetWindowRect(&rectDlg); rectDlg.left-=rectControl.left; rectDlg.right-=rectControl.left; rectDlg.top-=rectControl.top; rectDlg.bottom-=rectControl.top; m_RenderStatic.MoveWindow(&rectDlg); ///////////////////////////////////////////// m_RenderStatic2.GetWindowRect(&rectControl); GetDlgItem(IDC_STATIC2)->GetWindowRect(&rectDlg); rectDlg.left-=rectControl.left; rectDlg.right-=rectControl.left; rectDlg.top-=rectControl.top; rectDlg.bottom-=rectControl.top; m_RenderStatic2.MoveWindow(&rectDlg); }
void CEsmFindDlg::OnInitialUpdate() { CString Buffer; CFormView::OnInitialUpdate(); ResizeParentToFit(FALSE); /* Fill the find history list */ FillFindList(); /* Create the shortcut key accelerators */ m_hAccelerator = ::LoadAccelerators(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDR_RECORD_ACCEL)); /* Initialize the record list */ m_RecordList.OnInitCtrl(); m_RecordList.SetDlgHandler(m_pDlgHandler); m_RecordList.InitObjectList(l_ItemColData); m_RecordList.SetWantKeys(false); m_RecordList.SetAcceptDrag(false); m_RecordList.SetEnableDrag(true); m_RecordList.SetWantEditMsg(true); /* Update the title */ Buffer.Format(_T("%s -- Find Text"), m_pDlgHandler->GetDocument()->GetTitle()); GetParentFrame()->SetWindowText(Buffer); }
void CObjectRightView::OnInitialUpdate() { CFormView::OnInitialUpdate(); if (!initialized) { g_pD3D = NULL; g_pd3dDevice = NULL; g_pVB = NULL; GetParentFrame()->RecalcLayout(); ResizeParentToFit(); m_hwndRenderWindow = GetDlgItem(IDC_RENDERWINDOW)->GetSafeHwnd(); CRect rc; this->GetWindowRect( &rc ); m_iWidth = rc.Width(); m_iHeight = rc.Height(); CWnd* pGroup = GetDlgItem(IDC_RENDERWINDOW); pGroup->SetWindowPos(NULL, 0, 0, m_iWidth, m_iHeight, SWP_NOZORDER); InitializeDevice(); initialized = true; SetFocus(); } }
void CContourView::OnDrawtriangle() { // TODO: Add your command handler code here CClientDC dc( this ); CRect therect; this->GetClientRect( &therect ); //*************************************** //** Clear memDC's bitmap... CBrush backgroundBrush( ( COLORREF )::GetSysColor( COLOR_WINDOW ) ); CBrush* pOldBrush = m_memDC.SelectObject( &backgroundBrush ); m_memDC.PatBlt( 0, 0, m_cxBitmap, m_cyBitmap, PATCOPY ); m_memDC.SelectObject( pOldBrush )->DeleteObject(); //** end clear //*************************************** m_pTriangle->InitialTriangle(); //Read source data... //设立坐标系 m_memDC.SetMapMode( MM_ISOTROPIC ); m_memDC.SetWindowExt( ( int )( m_pTriangle->xmax - m_pTriangle->xmin ), ( int )( m_pTriangle->ymax - m_pTriangle->ymin ) ); m_memDC.SetViewportExt( ( int )( ( m_pTriangle->xmax - m_pTriangle->xmin ) / tmpRatio ), ( int )( ( m_pTriangle->ymax - m_pTriangle->ymin ) / tmpRatio ) ); dc.SetMapMode( MM_ISOTROPIC ); dc.SetWindowExt( ( int )( m_pTriangle->xmax - m_pTriangle->xmin ), ( int )( m_pTriangle->ymax - m_pTriangle->ymin ) ); dc.SetViewportExt( ( int )( ( m_pTriangle->xmax - m_pTriangle->xmin ) / tmpRatio ), ( int )( ( m_pTriangle->ymax - m_pTriangle->ymin ) / tmpRatio ) ); //两个坐标系统的重合点为原点为(0,0) // 写内存影像平面 m_pTriangle->DrawTriangle( &m_memDC ); //for (int i=1600; i<2140; i+=45) double zValues[4]; zValues[0] = 1570; zValues[1] = 1590; zValues[2] = 1610; zValues[3] = 1630; for ( int i = 0; i < 4; i++ ) { //m_pTriangle->CreateContourEx(&m_memDC, i); m_pTriangle->CreateContourEx( &m_memDC, zValues[i] ); } SIZE sizeTotal; sizeTotal.cx = ( int )( m_pTriangle->xmax - m_pTriangle->xmin ); sizeTotal.cy = ( int )( m_pTriangle->ymax - m_pTriangle->ymin ); this->SetLogScrollSizes( sizeTotal, tmpRatio ); ResizeParentToFit(); //*************************************** //**把影像从内存DC传递到设备DC dc.BitBlt( m_memDC.GetWindowOrg().x, m_memDC.GetWindowOrg().y, m_cxBitmap * tmpRatio, m_cyBitmap * tmpRatio, &m_memDC, m_memDC.GetWindowOrg().x, m_memDC.GetWindowOrg().y, SRCCOPY ); //** //*************************************** SCROLLINFO scrollinfo; this->GetScrollInfo( SB_VERT, &scrollinfo ); }
void CFireView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); m_parent = (CMainFrame*)GetParent(); ShowHeaders(); }
void CRVTestView::OnInitialUpdate() { m_pSet = &GetDocument()->m_rVTestSet; CRecordView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); }
// Make sure we don't grow larger than the server void CRDVView::OnUpdate(CView * pSender,LPARAM lHint,CObject * pHint) { if (m_cxWidth && m_cyHeight) { GetParentFrame()->RecalcLayout(); ResizeParentToFit(); } }
void CProfileDumpView::OnInitialUpdate() { CIccProfile *pIcc = GetDocument()->m_pProfile; icHeader *pHdr = &pIcc->m_Header; CIccInfo Fmt; char buf[64]; int n; m_sHdrAttributes = Fmt.GetDeviceAttrName(pHdr->attributes); m_sHdrCmm = icGetSig(buf, pHdr->cmmId); m_sHdrCreationDate.Format("%d/%d/%d %02u:%02u:%02u", pHdr->date.month, pHdr->date.day, pHdr->date.year, pHdr->date.hours, pHdr->date.minutes, pHdr->date.seconds); m_sHdrCreator = icGetSig(buf, pHdr->creator); m_sHdrDataColorspace = Fmt.GetColorSpaceSigName(pHdr->colorSpace); m_sHdrFlags = Fmt.GetProfileFlagsName(pHdr->flags); m_sHdrPcsColorSpace = Fmt.GetColorSpaceSigName(pHdr->pcs); m_sHdrPlatform = Fmt.GetPlatformSigName(pHdr->platform); m_sHdrRenderingIntent = Fmt.GetRenderingIntentName((icRenderingIntent)(pHdr->renderingIntent)); m_sHdrSize.Format("%d(0x%x) bytes", pHdr->size, pHdr->size); m_sHdrType = Fmt.GetProfileClassSigName(pHdr->deviceClass); m_sHdrVersion = Fmt.GetVersionName(pHdr->version); m_sHdrIlluminant.Format("X=%.4lf, Y=%.4lf, Z=%.4lf", icFtoD(pHdr->illuminant.X), icFtoD(pHdr->illuminant.Y), icFtoD(pHdr->illuminant.Z)); m_sHdrProfileID.Empty(); for (n=0; n<16; n++) { sprintf(buf, "%02x", pHdr->profileID.ID8[n]); if (n && !(n%4)) m_sHdrProfileID += " "; m_sHdrProfileID += buf; } CFormView::OnInitialUpdate(); ResizeParentToFit(FALSE); m_listTags.InsertColumn(0, "Tag ID", LVCFMT_LEFT, 200); m_listTags.InsertColumn(1, "Offset", LVCFMT_RIGHT, 75); m_listTags.InsertColumn(2, "Size", LVCFMT_RIGHT, 75); int item; TagEntryList::iterator i; CString Text; for (n=0, i=pIcc->m_Tags->begin(); i!=pIcc->m_Tags->end(); i++, n++) { item = m_listTags.InsertItem(n, Fmt.GetTagSigName(i->TagInfo.sig)); Text.Format("%d", i->TagInfo.offset); m_listTags.SetItemText(item, 1, Text); Text.Format("%d", i->TagInfo.size); m_listTags.SetItemText(item, 2, Text); m_listTags.SetItemData(item, (DWORD)i->TagInfo.sig); } }
void CPortView::OnInitialUpdate() { CFormView::OnInitialUpdate(); // modify the style of our frame to prevent user from resizing GetParentFrame()->ModifyStyle(WS_THICKFRAME | WS_MAXIMIZEBOX,0); // resize the parent frame to the size of the dialog box ResizeParentToFit(FALSE); }
void CBrainView::OnInitialUpdate() { CFormView::OnInitialUpdate(); ResizeParentToFit(); m_ButtonAutoChoice.EnableWindow(false); m_radioMode = 0; OnRadioAuto(); UpdateData(false); }
void CMainTestView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); Sleep(1000); OnFullScreenMode(); }
void CDynamoRIOView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); OnDropdownList(); // 100 flashes too much with long stats list // ::SetTimer(NULL, NULL, 100, TimerProc); ::SetTimer(NULL, NULL, 200, TimerProc); }
/******************************************************************** * Funzione : OnInitialUpdate * Descrizione: * Parametri : * Ritorno : * Note : *********************************************************************/ void CWinSigmaView::OnInitialUpdate() { CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); GetDlgItem(IDC_CHECK_AZIENDA_IMPORTANTE)->EnableWindow(false); }