Esempio n. 1
0
//외곽선은 그리지 않고 채우기만하기
void CDrawProperty::OnFaceOnlyfill()
{
	UpdateData();
	CDrawPropertyValue::m_nsFaceType = m_nsFaceType;

	//////////////////////////////////////////////////////////////////////////
	//컨트롤 활성화/비활성화
	m_sFillPtnCombo.EnableWindow();
	m_sFillTypeSolid.EnableWindow();
	m_sFillTypeHatch.EnableWindow();
	m_sFillTypeGradient.EnableWindow();
	m_sLineJoinCombo.EnableWindow(FALSE);

	AdjustControl();

	//////////////////////////////////////////////////////////////////////////
	//뷰 영역에 외부명령임을 알리고, 브러쉬 패턴을 바꾸는 함수를 호출
	CMainFrame* pMainFrm = (CMainFrame*)AfxGetMainWnd();
	CGraphicEditorView* pView = (CGraphicEditorView*)pMainFrm->GetActiveView();
	pView->m_bExternalCmd = TRUE;
	pView->OnDrawpropertyBrushpattern();

	//모달리스 다이얼로그들과 동기화 작업
	if(pView->m_dlgBrushPtn != NULL)
		pView->m_dlgBrushPtn->SetDrawStyle();
}
//****************************************************************************************
void CBCGPDateTimeCtrl::SizeToContent ()
{
	if (GetSafeHwnd () != NULL)
	{
		CRect rectClient;
		GetClientRect (rectClient);

		AdjustControl (rectClient);
	}
}
//******************************************************************************
void CBCGPDateTimeCtrl::OnSize(UINT nType, int cx, int cy) 
{
	CButton::OnSize(nType, cx, cy);

	CRect rectClient;
	GetClientRect (rectClient);

	AdjustControl (rectClient);
	RedrawWindow ();
}
Esempio n. 4
0
void CWndLayout::Adjust()
{
    RECT rcParent;
    ::GetClientRect(m_hWndParent, &rcParent);

    HDWP hDWP = ::BeginDeferWindowPos(m_WndInfoMap.size());

    WndInfoMap::const_iterator ite = m_WndInfoMap.begin();
    for(; ite != m_WndInfoMap.end(); ++ ite)
    {
        AdjustControl(hDWP, rcParent, ite->second);
    }

    ::EndDeferWindowPos(hDWP);
}
//****************************************************************************************
int CBCGPDateTimeCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CButton::OnCreate(lpCreateStruct) == -1)
		return -1;

	CRect rectSpin (0, 0, 1, 1);

	if (!m_wndSpin.Create (WS_CHILD | WS_VISIBLE | UDS_ALIGNRIGHT | UDS_AUTOBUDDY,
						rectSpin, this, iSpinID))
	{
		TRACE (_T ("CBCGPDateTimeCtrl: Can't create spin button!\n"));
		return -1;
	}

	CRect rectClient;
	GetClientRect (rectClient);

	AdjustControl (rectClient);
	RedrawWindow ();

	return 0;
}