Example #1
0
//Show color box and let user select color
BOOL CColorBox::SelectColor()
{
	BOOL ret = FALSE;

	CColorDialog *dlg = new CColorDialog;

	if(m_CustomColors != NULL)
		dlg->m_cc.lpCustColors = m_CustomColors;

	if(dlg)
	{
		//Set flags, init color
		dlg->m_cc.Flags = dlg->m_cc.Flags | CC_RGBINIT | CC_FULLOPEN;
		dlg->m_cc.rgbResult = m_color;

		if(dlg->DoModal() == IDOK)
		{
			TRACE(_T("User selected color: %d\n"), dlg->GetColor());
			
			if(dlg->GetColor() != m_color)
			{
				SetColor(dlg->GetColor());
				ret = TRUE;
			}
		}
	}

	delete dlg;
	
	return ret;
}
Example #2
0
void CoInputLineDlg::OnBnClickedButtonCor()
{
	// TODO: 在此添加控件通知处理程序代码
	CColorDialog cor;
	if (cor.DoModal()==IDOK)
		m_LineCor = cor.GetColor();	
}
Example #3
0
// 배경색 클릭이벤트
void CLevelDlg::OnBnClickedButtonColor()
{
	CColorDialog dlg;
	// 색상선택 대화상자 띄우기
	dlg.DoModal();
	ld_rectColor = dlg.GetColor();
	InvalidateRect(&ld_rect);
}
Example #4
0
void CColorDlg::OnBtnClrSplit() 
{
	CColorDialog clrDlg;
	if(clrDlg.DoModal() == IDOK)
	{
		m_clrSplit = clrDlg.GetColor();
	}
}
Example #5
0
void CColorDlg::OnBtnClrWave() 
{
	CColorDialog clrDlg;
	if(clrDlg.DoModal() == IDOK)
	{
		m_clrWaveform = clrDlg.GetColor();
	}
}
/////////////////////////////////////
// @mfunc menu handler - display a color selection dialog and set background color attribute for style at caret position
// @rvalue void | not used
//
void CScintillamfcView::OnOptionsBackground() 
{
	CColorDialog dlg;
	if (dlg.DoModal() == IDOK)
	{
		m_wndScintilla.SetBackground(m_wndScintilla.GetCurrentStyle(), dlg.GetColor());
	}
}
	void CGDIPracticeView::OnPenColor()
	{
		// TODO: 여기에 명령 처리기 코드를 추가합니다.
		CColorDialog crDlg;
		if (crDlg.DoModal() == IDOK) {
			m_colorPen = crDlg.GetColor();
		}
	}
void CDataServerCenterView::OnButtonLineColorDiy()
{
	CColorDialog colotDlg;
	if(colotDlg.DoModal() == IDOK)
	{
		((CSpectrumCompareDlg *)(this->pSpectrumCompareDlg))->m_LineColor=colotDlg.GetColor();
	}
}
void CMyView::OnSetColor()
{
    // TODO: Add your command handler code here
    CColorDialog dlg;    //颜色设置通用对话框
    if (dlg.DoModal()==IDOK)
    {
        m_color=dlg.GetColor();
    }
}
Example #10
0
void CEdgeTab::OnChangeColor() 
{
	CColorDialog dlg;
	if (dlg.DoModal()==IDOK) 
	{
		m_lpControlStruct->edgeColor = dlg.GetColor();
		Invalidate(FALSE);
	}
}
Example #11
0
void CSettingsSpawn::OnBGColor() 
{
	CColorDialog colors;
	if ( colors.DoModal() == IDOK )
		m_dwSpawnBGColor = colors.GetColor();
	SendMessage( WM_PAINT );
	Main->PutRegistryDword("SpawnBGColor", m_dwSpawnBGColor);
	Main->m_dwSpawnBGColor = m_dwSpawnBGColor;
}
void CPropertiesEDlg::OnChangeColor() 
{
	CColorDialog dlg;
	if (dlg.DoModal()==IDOK) 
	{
		m_color = dlg.GetColor();
		Invalidate(FALSE);
	}
}
void CMapView::OnRButtonDown(UINT nFlags, CPoint point) 
{
	CColorDialog dlg;
	if(dlg.DoModal() == IDOK)
	{
		m_color = dlg.GetColor(); // 색상 설정
	}
	CView::OnRButtonDown(nFlags, point);
}
void CLinkPropertiesDialog::OnStnClickedColor()
{
	CColorDialog dlg;
	if( dlg.DoModal() == IDOK )
	{
		m_Color = dlg.GetColor();
		m_ColorControl.SetColor( m_Color );
	}
}
Example #15
0
void CATLDrawView::OnViewColor()
{
	CColorDialog dlg;

	if (dlg.DoModal() == IDOK)
	{
		m_col = dlg.GetColor();
	}
}
Example #16
0
void CPage2::OnSetColor() 
{
   //1 弹出颜色对话框
	 CColorDialog dlg;
	 if(dlg.DoModal()==IDCANCEL)return;
	 m_LineColor=dlg.GetColor();
	 //2 将应用按钮设置为可用
	 SetModified(TRUE);
}
Example #17
0
void CColorDlg::OnBtnText() 
{
	CColorDialog dlg;
	if(dlg.DoModal() == IDOK)
	{
		m_clrText = dlg.GetColor();
		Invalidate();
	}
}
Example #18
0
void CGameView::OnUser()
{
	CColorDialog dlg;
	if(dlg.DoModal() == IDOK){
		gv_bgColor = dlg.GetColor();
		Invalidate();
	}
	pTimeDlg ->color =gv_bgColor ;
	pTimeDlg ->OnInitDialog () ;
}
Example #19
0
void CDrawView::OnObjectLinecolor() 
{
	CColorDialog dlg;
	if (dlg.DoModal() != IDOK)
		return;

	COLORREF color = dlg.GetColor();

	g_pGuiManager->MsgObjectLinecolor(color);
}
Example #20
0
void CBaseView::OnViewBkColor() 
{
	CColorDialog dlg (m_bkColor);
	if (IDOK == dlg.DoModal())
	{
		m_bkColor = dlg.GetColor();
		m_graph->canvas->clearCachedBitmap();
		Invalidate();
	}
}
Example #21
0
void CPropShowTime::OnStnClickedStaColor()
{
	// TODO: 在此添加控件通知处理程序代码
	CColorDialog dlg;
	if(IDOK == dlg.DoModal())
	{
		m_textColor = dlg.GetColor();
		m_sta_color.SetBkColor(m_textColor);
	}
}
Example #22
0
void CDrawDoc::OnViewPaperColor()
{
	CColorDialog dlg;
	if (dlg.DoModal() != IDOK)
		return;

	m_paperColor = dlg.GetColor();
	SetModifiedFlag();
	UpdateAllViews(NULL);
}
void CEffectsOptionsDlg::OnBnClickedButtonTextColor()
{
	// TODO: Add your control notification handler code here
	CColorDialog dlg;
	dlg.m_cc.Flags |= CC_FULLOPEN | CC_RGBINIT;
	dlg.m_cc.rgbResult = m_params.textColor;
	if (dlg.DoModal() == IDOK){
		m_params.textColor = dlg.GetColor();
	}
}
void CRegisterValueAnalyzerDlg::OnBnClickedBkgndColbtn()
{
	CColorDialog colorDlg;
	//colorDlg.SetWindowText(_T("Select background color"));
	if(colorDlg.DoModal()){
		m_BackColor=colorDlg.GetColor();
		m_ChartCtrl.SetBackColor(m_BackColor);
		m_ChartCtrl.RefreshCtrl();
	}
}
void CSTWTitleFontsPage::OnButtonTitlefontInlaytitlecolor() 
{
	CColorDialog dlg (m_InlayTitleFont.GetColor (), CC_FULLOPEN, this);
	if (dlg.DoModal () == IDOK)
	{
		m_InlayTitleFont.SetColor (dlg.GetColor ());

		((CStyleTemplateWizard*) GetParent ())->m_pTemplate->m_crTitle[Inlay] = dlg.GetColor ();
		((CStyleTemplateWizard*) GetParent ())->m_wndPreview.InvalidateRect (NULL);
	}
}
Example #26
0
void CitbookView::OnCharColor()
{
	// TODO: 在此添加命令处理程序代码
	CColorDialog dlg;
	
	if( dlg.DoModal() == IDOK )
	{
		
		CRichEditView::OnColorPick(dlg.GetColor());
	}
}
Example #27
0
void CPage2::OnSetColor() 
{
	//将应用按钮设置为可用
	SetModified(TRUE);
	//弹出颜色对话框
	CColorDialog dlg;
	if(dlg.DoModal()==IDCANCEL)return;
	/*在CPage2中添加颜色类型的成员变量,使用该变量
	  保存从颜色对话框中选择的颜色*/
	m_Color=dlg.GetColor();
}
void CSTWTrackFontsPage::OnButtonTrackGroupingRemarkscolor()
{
    CColorDialog dlg (m_TrackGroupingRemarksFont.GetColor (), CC_FULLOPEN, this);
    if (dlg.DoModal () == IDOK)
    {
        m_TrackGroupingRemarksFont.SetColor (dlg.GetColor ());

        ((CStyleTemplateWizard*) GetParent ())->m_pTemplate->m_crTrackGroupingRemarks = dlg.GetColor ();
        ((CStyleTemplateWizard*) GetParent ())->m_wndPreview.InvalidateRect (NULL);
    }
}
Example #29
0
void CGraphicView::OnColor() 
{
	CColorDialog dlg;
	dlg.m_cc.Flags |= CC_RGBINIT | CC_FULLOPEN;
	dlg.m_cc.rgbResult=m_clr;
	if(IDOK==dlg.DoModal())
	{
		m_clr=dlg.m_cc.rgbResult;
	}
	
}
Example #30
0
bool CSwatchButton::EditColor(COLORREF *CustomColors)
{
	ASSERT(CustomColors != NULL);	// caller must allocate custom colors
	CColorDialog	dlg;
	dlg.m_cc.Flags |= CC_RGBINIT;
	dlg.m_cc.lpCustColors = CustomColors;
	dlg.m_cc.rgbResult = m_Color;
	if (dlg.DoModal() != IDOK)
		return(FALSE);
	SetColor(dlg.m_cc.rgbResult);
	return(TRUE);
}