Esempio n. 1
0
void CUndoBar::DoUndo()
{
	CUndoButton* pUndoButton = GetParentButton();
	ASSERT_VALID(pUndoButton);

	pUndoButton->m_nSelNum = m_wndList.GetSelCount() + 1;

	CMDIChildWnd* pChildFrame = ((CMDIFrameWndEx*)GetTopLevelFrame())->MDIGetActive();
	if (pChildFrame)
	{
		CEditView* pView = DYNAMIC_DOWNCAST(CEditView, pChildFrame->GetActiveView());
		if (pView != NULL)
		{
			//pView->OnEditUndo(); TODO
		}
		else
		{
			ASSERT(FALSE);
		}
	}
	else
	{
		ASSERT(FALSE);
	}

	GetParent()->PostMessage(WM_CLOSE);
}
Esempio n. 2
0
int CUndoMenu::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CMiniFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	DWORD toolbarStyle = AFX_DEFAULT_TOOLBAR_STYLE;
	if (m_AnimationType != NO_ANIMATION && !CMFCToolBar::IsCustomizeMode())
	{
		toolbarStyle &= ~WS_VISIBLE;
	}

	if (!m_wndUndoBar.Create(this, toolbarStyle | CBRS_TOOLTIPS | CBRS_FLYBY, 1))
	{
		TRACE(_T("Can't create popup menu bar\n"));
		return -1;
	}

	CWnd* pWndParent = GetParent();
	ASSERT_VALID(pWndParent);

	m_wndUndoBar.SetOwner(pWndParent);
	m_wndUndoBar.SetPaneStyle(m_wndUndoBar.GetPaneStyle() | CBRS_TOOLTIPS);

	ActivatePopupMenu(GetTopLevelFrame(), this);
	RecalcLayout();

	return 0;
}
Esempio n. 3
0
void CMSOffice2007DemoView::OnFontsize()
{
	CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar();
	ASSERT_VALID(pRibbon);

	CMFCRibbonComboBox* pSizeCombo = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_FONT_FONTSIZE));
	if (pSizeCombo == NULL)
	{
		return;
	}

	int nSize = GetTwipSize(pSizeCombo->GetEditText());

	if (nSize == -2 || (nSize >= 0 && nSize < 20) || nSize > 32760)
	{
		// Restore current size:
		pSizeCombo->SetEditText (TwipsToPointString (GetCharFormatSelection ().yHeight));

		MessageBox (_T("The number must be between 1 and 1638."));                               
		return;
	}

	if (nSize > 0)
	{
		CCharFormat cf;
		cf.dwMask = CFM_SIZE;
		cf.yHeight = nSize;

		SetCharFormat(cf);
	}
}
Esempio n. 4
0
void CMSOffice2007DemoView::OnSelChange(NMHDR* pNMHDR, LRESULT* pResult)
{
	CRichEditView::OnSelChange(pNMHDR, pResult);

	if (GetFocus ()->GetSafeHwnd () != GetSafeHwnd())
	{
		return;
	}

	CMainFrame* pMainFrame = ((CMainFrame*) GetTopLevelFrame());
	ASSERT_VALID(pMainFrame);

	UINT uiCategoryID = 0;

	CMSOffice2007DemoCntrItem* pItem = (CMSOffice2007DemoCntrItem*) GetSelectedItem();

	if (pItem != NULL)
	{
		uiCategoryID = pItem->m_uiCategoryID;
	}

	pMainFrame->SetRibbonContextCategory(uiCategoryID);

	SyncFont();
}
Esempio n. 5
0
BOOL CControlBar::PreTranslateMessage(MSG* pMsg)
{
	ASSERT_VALID(this);
	ASSERT(m_hWnd != NULL);

	// handle mouse messages for tooltip support
	if (m_dwStyle & (CBRS_FLYBY|CBRS_TOOLTIPS))
		FilterToolTipMsg(pMsg->message, pMsg->pt);

	// don't translate dialog messages when in Shift+F1 help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode)
		return FALSE;

	// since 'IsDialogMessage' will eat frame window accelerators,
	//   we call all frame windows' PreTranslateMessage first
	CWnd* pOwner = GetOwner();  // always use owner first
	while (pOwner != NULL)
	{
		// allow owner & frames to translate before IsDialogMessage does
		if (pOwner->PreTranslateMessage(pMsg))
			return TRUE;

		// try parent frames until there are no parent frames
		pOwner = pOwner->GetParentFrame();
	}

	// filter both messages to dialog and from children
	return PreTranslateInput(pMsg);
}
Esempio n. 6
0
// Ends-in Contrast Stretching의 최저값 설정
void CBMPFrame::OnIpEcsLowEnd()
{
	// TODO: 여기에 명령 처리기 코드를 추가합니다.
	CMFCRibbonEdit *pSpin = DYNAMIC_DOWNCAST(CMFCRibbonEdit,
		((CMainFrame*)GetTopLevelFrame())->GetRibbonBar()->FindByID(ID_IP_ECSLOW));
	m_bEcsLowEnd = (BYTE)_wtof(pSpin->GetEditText());
}
void CBCGPMSOffice2007DemoView::OnFontname() 
{
	USES_CONVERSION;

	CBCGPRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame ())->GetRibbonBar ();
	ASSERT_VALID (pRibbon);

	CBCGPRibbonFontComboBox* pFontCombo = DYNAMIC_DOWNCAST (
		CBCGPRibbonFontComboBox, pRibbon->FindByID (ID_FONT_FONT));
	if (pFontCombo == NULL)
	{
		return;
	}

	CCharFormat cf;
	cf.szFaceName[0] = NULL;
	cf.dwMask = CFM_FACE | CFM_CHARSET;

	const CBCGPFontDesc* pDesc = pFontCombo->GetFontDesc ();
	ASSERT_VALID (pDesc);
	ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);

#if _MSC_VER >= 1300
	lstrcpyn(cf.szFaceName, pDesc->m_strName, LF_FACESIZE);
#else
	lstrcpynA(cf.szFaceName,
		T2A((LPTSTR) (LPCTSTR) pDesc->m_strName), LF_FACESIZE);
#endif

	cf.bCharSet = pDesc->m_nCharSet;
	cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;

	SetCharFormat (cf);
}
Esempio n. 8
0
void CStagePrefsLighting::OnLightingDefaults() 
{
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CStageView *pView = (CStageView *)pMainFrame->GetActiveView();
	CStageDoc *pDoc = pView->GetDocument();

	pDoc->m_lighting[1] = YO_DEFAULT_LIGHTING_TWO_SIDED;
	m_twoSide = YO_DEFAULT_LIGHTING_TWO_SIDED;
	::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, YO_DEFAULT_LIGHTING_TWO_SIDED);

	pDoc->m_sunIntensity = YO_DEFAULT_SUN_INTENSITY;
	m_lightingSunIntensity = YO_DEFAULT_SUN_INTENSITY;
	m_lightingSunSliderIntensity.SetPos((int)(m_lightingSunIntensity * 100.0));

	pDoc->m_sunAzimuth = YO_DEFAULT_SUN_AZIMUTH;
	m_lightingSunAzimuth = YO_DEFAULT_SUN_AZIMUTH;

	pDoc->m_sunAltitude = YO_DEFAULT_SUN_ALTITUDE;
	m_lightingSunAltitude = YO_DEFAULT_SUN_ALTITUDE;

	UpdateData(FALSE);

	pView->YoRender(YO_RENDER_LIGHT);
	pView->YoRender(YO_RENDER_FULL);
	
}
Esempio n. 9
0
void CStagePrefsLighting::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CStageView *pView = (CStageView *)pMainFrame->GetActiveView();
	CStageDoc *pDoc = pView->GetDocument();

	if ((CSliderCtrl *)pScrollBar == &m_lightingSunSliderIntensity)
	{
		m_lightingSunIntensity = (float)m_lightingSunSliderIntensity.GetPos() / 100.0f;
		pDoc->m_sunIntensity = m_lightingSunIntensity;
	}
	else
	{
		CPropertyPage::OnHScroll(nSBCode, nPos, pScrollBar);
	}

	UpdateData(FALSE);

	if (nSBCode == SB_ENDSCROLL)
	{
		pView->YoRender(YO_RENDER_LIGHT);
		pView->YoRender(YO_RENDER_FULL);
	}
	else
	{
		pView->YoRender(YO_RENDER_QUICK);
	}

	return;
}
Esempio n. 10
0
void CEditFrameView::OnFontSize ()
{
	CBCGPRibbonBar* pRibbon = ((CEditFrameDialog*) GetTopLevelFrame ())->GetRibbonBar ();
	ASSERT_VALID (pRibbon);

	CBCGPRibbonComboBox* pSizeCombo = DYNAMIC_DOWNCAST (
		CBCGPRibbonComboBox, pRibbon->FindByID (ID_FONT_SIZE));
	if (pSizeCombo == NULL)
	{
		return;
	}

	int nSize = GetTwipSize (pSizeCombo->GetItem (-1));

	if (nSize == -2)
	{
		return;
	}

	if ((nSize >= 0 && nSize < 20) || nSize > 32760)
	{
		return;
	}

	if (nSize > 0)
	{
		CCharFormat cf;
		cf.dwMask = CFM_SIZE;
		cf.yHeight = nSize;

		SetCharFormat (cf);
	}
}
Esempio n. 11
0
void CFrameWnd::OnMenuSelect( UINT nItemID, UINT nFlags, HMENU hSysMenu )
/***********************************************************************/
{
    CWnd::OnMenuSelect( nItemID, nFlags, hSysMenu );

    if( nFlags == 0xFFFF && hSysMenu == NULL ) {
        CFrameWnd *pFrame = GetTopLevelFrame();
        ASSERT( pFrame != NULL );
        if( pFrame->m_bHelpMode ) {
            SetMessageText( AFX_IDS_HELPMODEMESSAGE );
        } else {
            SetMessageText( AFX_IDS_IDLEMESSAGE );
        }
    } else {
        if( nFlags & MF_POPUP ) {
            SetMessageText( _T("") );
        } else if( nItemID >= AFX_IDM_FIRST_MDICHILD ) {
            SetMessageText( AFX_IDS_MDICHILD );
        } else if( nItemID >= 0xF000 && nItemID < 0xF1F0) {
            SetMessageText( ID_COMMAND_FROM_SC( nItemID ) );
        } else {
            SetMessageText( nItemID );
        }
    }
}
Esempio n. 12
0
BOOL CDlgResLib::PreTranslateMessage(MSG* pMsg)
{
	ASSERT_VALID(this);
	ASSERT(m_hWnd != NULL);

	CWnd* pOwner = GetOwner();

	// don't translate dialog messages when in Shift+F1 help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode)
		return FALSE;

	// since 'IsDialogMessage' will eat frame window accelerators,
	//   we call all frame windows' PreTranslateMessage first
	while (pOwner != NULL)
	{
		// allow owner & frames to translate before IsDialogMessage does
		if (pOwner->PreTranslateMessage(pMsg))
			return TRUE;

		// try parent frames until there are no parent frames
		if (IsWindow (pOwner->GetSafeHwnd ()))
		{
			pOwner = pOwner->GetParentFrame();
		}
		else
		{
			break;
		}
	}

	return CDialogEx::PreTranslateMessage(pMsg);
}
Esempio n. 13
0
void CUndoBar::DoUndo ()
{
	CUndoButton* pUndoButton = GetParentButton ();
	ASSERT_VALID (pUndoButton);

	pUndoButton->m_nSelNum = m_wndList.GetSelCount () + 1;
	
	CMDIChildWnd* pChildFrame = ((CMDIFrameWnd*)GetTopLevelFrame())->MDIGetActive();

	if (pChildFrame)
	{
		CView* pView = pChildFrame->GetActiveView();

		if (pView &&
			pView->IsKindOf(RUNTIME_CLASS(CBCGPVisualStudioGUIDemoView)))
		{
			((CBCGPVisualStudioGUIDemoView*)pView)->DoUndo(pUndoButton);
		}
		else
		{
			ASSERT(FALSE);
		}
	}
	else
	{
		ASSERT(FALSE);
	}

	GetParent ()->PostMessage (WM_CLOSE);
}
Esempio n. 14
0
void CBCGPMSOffice2007DemoView::OnInitialUpdate ()
{
	CRichEditView::OnInitialUpdate();

	SendMessage (EM_SHOWSCROLLBAR, SB_HORZ, FALSE);
	SendMessage (EM_SHOWSCROLLBAR, SB_VERT, FALSE);

	GetRichEditCtrl ().SetEventMask (GetRichEditCtrl ().GetEventMask() | (ENM_REQUESTRESIZE | ENM_SCROLL));

	CScrollBar* pScrollBar = ((CMainFrame*) GetTopLevelFrame ())->GetScrollBar ();
	if (pScrollBar->GetSafeHwnd () != NULL && GetRichEditCtrl().GetTextLength () == 0)
	{
		ASSERT_VALID (pScrollBar);
		pScrollBar->EnableScrollBar (ESB_DISABLE_BOTH);
	}

	// Set the printing margins (720 twips = 1/2 inch).
	SetMargins(CRect(720, 720, 720, 720));

	CCharFormat cf;
	GetDefaultFont (cf);

	SetCharFormat (cf);
	SyncFont ();
}
Esempio n. 15
0
BOOL CFormView::PreTranslateMessage(MSG* pMsg)
{
    ASSERT(pMsg != NULL);
    ASSERT_VALID(this);
    ASSERT(m_hWnd != NULL);

    // allow tooltip messages to be filtered
    if (CView::PreTranslateMessage(pMsg))
        return TRUE;

    // don't translate dialog messages when in Shift+F1 help mode
    CFrameWnd* pFrameWnd = GetTopLevelFrame();
    if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode)
        return FALSE;

    // since 'IsDialogMessage' will eat frame window accelerators,
    //   we call all frame windows' PreTranslateMessage first
    pFrameWnd = GetParentFrame();   // start with first parent frame
    while (pFrameWnd != NULL)
    {
        // allow owner & frames to translate before IsDialogMessage does
        if (pFrameWnd->PreTranslateMessage(pMsg))
            return TRUE;

        // try parent frames until there are no parent frames
        pFrameWnd = pFrameWnd->GetParentFrame();
    }

    // don't call IsDialogMessage if form is empty
    if (::GetWindow(m_hWnd, GW_CHILD) == NULL)
        return FALSE;

    // filter both messages to dialog and from children
    return PreTranslateInput(pMsg);
}
Esempio n. 16
0
BOOL CSAPrefsDialog::PreTranslateMessage(MSG* pMsg) 
{
	ASSERT(pMsg != NULL);
	ASSERT_VALID(this);
	ASSERT(m_hWnd != NULL);
	
	// Don't let CDialog process the Escape key.
	if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE))
	{
		return TRUE;
	}
	
	if (CWnd::PreTranslateMessage(pMsg))
		return TRUE;
	
	// don't translate dialog messages when 
	// application is in help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode)
		return FALSE;
	
	// ensure the dialog messages will not
	// eat frame accelerators
	pFrameWnd = GetParentFrame();
	while (pFrameWnd != NULL)
	{
		if (pFrameWnd->PreTranslateMessage(pMsg))
			return TRUE;
		pFrameWnd = pFrameWnd->GetParentFrame();
	}
	
	return PreTranslateInput(pMsg);
	
}
Esempio n. 17
0
BOOL CDialog::PreTranslateMessage(MSG* pMsg)
{
	// for modeless processing (or modal)
	ASSERT(m_hWnd != NULL);

	// allow tooltip messages to be filtered
	if (CWnd::PreTranslateMessage(pMsg))
		return TRUE;

	// don't translate dialog messages when in Shift+F1 help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode)
		return FALSE;

	// fix around for VK_ESCAPE in a multiline Edit that is on a Dialog
	// that doesn't have a cancel or the cancel is disabled.
	if (pMsg->message == WM_KEYDOWN &&
		(pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_CANCEL) &&
		(::GetWindowLong(pMsg->hwnd, GWL_STYLE) & ES_MULTILINE) &&
		_AfxCompareClassName(pMsg->hwnd, _T("Edit")))
	{
		HWND hItem = ::GetDlgItem(m_hWnd, IDCANCEL);
		if (hItem == NULL || ::IsWindowEnabled(hItem))
		{
			SendMessage(WM_COMMAND, IDCANCEL, 0);
			return TRUE;
		}
	}
	// filter both messages to dialog and from children
	return PreTranslateInput(pMsg);
}
Esempio n. 18
0
BOOL CSettingsDialog::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	ASSERT(pMsg != NULL);
	ASSERT_VALID(this);
	ASSERT(m_hWnd != NULL);

	// Don't let CDialog process the Escape key.
	if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE))
		return TRUE;

	if (CWnd::PreTranslateMessage(pMsg)) return TRUE;

   // Don't translate dialog messages when 
   // application is in help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode) return FALSE;

	// Ensure the dialog messages will not
	// eat frame accelerators
	pFrameWnd = GetParentFrame();
	while (pFrameWnd != NULL)
	{
		if (pFrameWnd->PreTranslateMessage(pMsg)) return TRUE;
		pFrameWnd = pFrameWnd->GetParentFrame();
	}

	return PreTranslateInput(pMsg);	
//	return CDialog::PreTranslateMessage(pMsg);
}
Esempio n. 19
0
void CStageGripperDlg::OnGripperOpen() 
{
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CView *pView = pMainFrame->GetActiveView();
	CStageDoc *pDoc = ((CStageView *)pView)->GetDocument();

	((CStageGripper *)pDoc->m_currentDevice)->YoOpenGripper();
	return;	
}
Esempio n. 20
0
void CSetPaneSizeView::OnButtonSetContainerSize() 
{
	UpdateData ();	
	CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
	if (pMainFrame != NULL)
	{
		pMainFrame->SetContainerSize (m_nContainerSize);
	}
}
Esempio n. 21
0
void CStageGripperDlg::OnGripperTypeTranslating() 
{
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CView *pView = pMainFrame->GetActiveView();
	CStageDoc *pDoc = ((CStageView *)pView)->GetDocument();

	((CStageGripper *)pDoc->m_currentDevice)->m_typeTranslating = TRUE;
	return;	
}
Esempio n. 22
0
void CSetPaneSizeView::OnBtnSetWidthInPixels() 
{
	UpdateData ();	
	CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
	if (pMainFrame != NULL)
	{
		pMainFrame->SetDlgBarWidthInPixels (m_nWidthInPixels);
	}
}
Esempio n. 23
0
void CStagePartMotion::OnPartRemove() 
{
	// TODO: Add your control notification handler code here
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CView *pView = pMainFrame->GetActiveView();
	CStageDoc *pDoc = ((CStageView *)pView)->GetDocument();
	CStageMotion *ptrMotion;
	int i = 0;
	int j = m_partMotionList.GetCount();
	GLint min;
	GLint sec;
	GLint frm;
	GLint t;
	char s[128];
	char *p;

	while (i < j)
	{
		if (m_partMotionList.GetSel(i))
		{
			m_partMotionList.GetText(i, s);
			sscanf(s, "%d", &min);
			p = &s[3];
			sscanf(p, "%d", &sec);
			p = &s[6];
			sscanf(p, "%d", &frm);
			//sscanf(s, "%d  *%s %d *%s %d", &min, &sec, &frm);
			t = (min * 60 * pDoc->m_framesPerSecond)
				+ (sec * pDoc->m_framesPerSecond)
				+ frm;

			ptrMotion = pDoc->m_currentPart->m_motion;
			while (ptrMotion != NULL && t != 0)
			{
				if (t == ptrMotion->m_time)
				{
					// flag motion for removal
					ptrMotion->m_time = -ptrMotion->m_time;
					ptrMotion = NULL;
				}
				else
				{
					ptrMotion = ptrMotion->m_next;
				}
			}

			m_partMotionList.DeleteString(i);
			j--;
		}
		else
		{
			i++;
		}
	}
	return;
}
Esempio n. 24
0
BOOL CFrameWndBase::OnNcActivate( BOOL bActive )
{
    CFrameWnd* pFrame = GetTopLevelFrame();
    ASSERT_VALID( pFrame );

    m_wndMenuBar.FrameOnNcActivate(
        ( bActive || ( pFrame->m_nFlags & WF_STAYACTIVE ) ) && pFrame->IsWindowEnabled() );

    return CFrameWnd::OnNcActivate( bActive );
}
Esempio n. 25
0
void CStagePartMotion::OnPartClearAll() 
{
	// TODO: Add your control notification handler code here
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CView *pView = pMainFrame->GetActiveView();
	CStageDoc *pDoc = ((CStageView *)pView)->GetDocument();

	pDoc->m_currentPart->m_motion->m_time = INT_MAX;
	m_partMotionList.ResetContent();
	return;	
}
CSize CRibbonTooltipCtrl::GetIconSize()
{
	CMFCToolBarImages* pBmp = ((CMainFrame*) GetTopLevelFrame())->GetTooltipImage(m_nID);
	if (pBmp != NULL)
	{
		ASSERT_VALID(pBmp);
		return pBmp->GetImageSize();
	}

	return CMFCToolTipCtrl::GetIconSize();
}
Esempio n. 27
0
void COutputList::OnViewOutput()
{
	CDockablePane* pParentBar = DYNAMIC_DOWNCAST(CDockablePane, GetOwner());
	CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, GetTopLevelFrame());

	if (pMainFrame != NULL && pParentBar != NULL)
	{
		pMainFrame->SetFocus();
		pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE);
		pMainFrame->RecalcLayout();
	}
}
Esempio n. 28
0
BOOL CFrameWnd::OnSetCursor( CWnd *pWnd, UINT nHitTest, UINT message )
/********************************************************************/
{
    CFrameWnd *pTopLevel = GetTopLevelFrame();
    ASSERT( pTopLevel != NULL );
    if( pTopLevel->m_bHelpMode ) {
        ::SetCursor( _HelpCursor );
        return( TRUE );
    } else {
        return( CWnd::OnSetCursor( pWnd, nHitTest, message ) );
    }
}
Esempio n. 29
0
void CSynBCGPEditView::ReSetEncodingLabel()
{
	CBCGPRibbonStatusBar *pRibbonBar = ((CMainFrame*)GetTopLevelFrame())->GetRibbonStatusBar();
	ASSERT_VALID(pRibbonBar);

	CMyBCGPRibbonStatusBarPane *pRibbonLabel = DYNAMIC_DOWNCAST(CMyBCGPRibbonStatusBarPane, pRibbonBar->FindByID(ID_NOW_ENCODING));
	if (pRibbonLabel)
	{
		CString strLabelText(m_pEdit->GetSelectEncodingString());
		pRibbonLabel->SetText(strLabelText);
		pRibbonLabel->Redraw();
	}
}
Esempio n. 30
0
void CStageGripperDlg::OnKillfocusGripperDisplacementOpen() 
{
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CView *pView = pMainFrame->GetActiveView();
	CStageDoc *pDoc = ((CStageView *)pView)->GetDocument();
	CWnd *pCBox;
	char s[32];

	pCBox = (CComboBox*)GetDlgItem(IDC_GRIPPER_DISPLACEMENT_OPEN);
	pCBox->GetWindowText(s, 32);
	sscanf(s, "%lf", &((CStageGripper *)pDoc->m_currentDevice)->m_displacementOpen);
	return;
}