本文整理汇总了C++中CColorDialog::GetColor方法的典型用法代码示例。如果您正苦于以下问题:C++ CColorDialog::GetColor方法的具体用法?C++ CColorDialog::GetColor怎么用?C++ CColorDialog::GetColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CColorDialog
的用法示例。
在下文中一共展示了CColorDialog::GetColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SelectColor
//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;
}
示例2: OnButtonTitlefontInlaytitlecolor
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);
}
}
示例3: OnButtonTrackRemarkscolor
void CSTWTrackFontsPage::OnButtonTrackRemarkscolor()
{
CColorDialog dlg (m_TrackRemarksFont.GetColor (), CC_FULLOPEN, this);
if (dlg.DoModal () == IDOK)
{
m_TrackRemarksFont.SetColor (dlg.GetColor ());
((CStyleTemplateWizard*) GetParent ())->m_pTemplate->m_crTrackRemarks = dlg.GetColor ();
((CStyleTemplateWizard*) GetParent ())->m_wndPreview.InvalidateRect (NULL);
}
}
示例4: OnChangeAtomTypeColorButton
void AtomTypesDialog::OnChangeAtomTypeColorButton()
{
// TODO: Add your control notification handler code here
CColorDialog colorDialog;
if (IDOK == colorDialog.DoModal()) {
m_atomTypeColorStatic.m_ctrlText = colorDialog.GetColor();
m_atomTypeColorStatic.RedrawWindow();
int selectedItem = m_atomTypesListBox.GetCurSel();
AtomType* atomType = (AtomType*)m_atomTypesListBox.GetItemDataPtr(selectedItem);
atomType->color = colorDialog.GetColor();
}
}
示例5: OnBnClickedButtonCor
void CoInputLineDlg::OnBnClickedButtonCor()
{
// TODO: 在此添加控件通知处理程序代码
CColorDialog cor;
if (cor.DoModal()==IDOK)
m_LineCor = cor.GetColor();
}
示例6: OnBnClickedButtonColor
// 배경색 클릭이벤트
void CLevelDlg::OnBnClickedButtonColor()
{
CColorDialog dlg;
// 색상선택 대화상자 띄우기
dlg.DoModal();
ld_rectColor = dlg.GetColor();
InvalidateRect(&ld_rect);
}
示例7: OnBtnClrSplit
void CColorDlg::OnBtnClrSplit()
{
CColorDialog clrDlg;
if(clrDlg.DoModal() == IDOK)
{
m_clrSplit = clrDlg.GetColor();
}
}
示例8: OnBtnClrWave
void CColorDlg::OnBtnClrWave()
{
CColorDialog clrDlg;
if(clrDlg.DoModal() == IDOK)
{
m_clrWaveform = clrDlg.GetColor();
}
}
示例9: OnButtonLineColorDiy
void CDataServerCenterView::OnButtonLineColorDiy()
{
CColorDialog colotDlg;
if(colotDlg.DoModal() == IDOK)
{
((CSpectrumCompareDlg *)(this->pSpectrumCompareDlg))->m_LineColor=colotDlg.GetColor();
}
}
示例10: OnPenColor
void CGDIPracticeView::OnPenColor()
{
// TODO: 여기에 명령 처리기 코드를 추가합니다.
CColorDialog crDlg;
if (crDlg.DoModal() == IDOK) {
m_colorPen = crDlg.GetColor();
}
}
示例11: OnOptionsBackground
/////////////////////////////////////
// @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());
}
}
示例12: OnViewColor
void CATLDrawView::OnViewColor()
{
CColorDialog dlg;
if (dlg.DoModal() == IDOK)
{
m_col = dlg.GetColor();
}
}
示例13: OnBtnText
void CColorDlg::OnBtnText()
{
CColorDialog dlg;
if(dlg.DoModal() == IDOK)
{
m_clrText = dlg.GetColor();
Invalidate();
}
}
示例14: OnChangeColor
void CEdgeTab::OnChangeColor()
{
CColorDialog dlg;
if (dlg.DoModal()==IDOK)
{
m_lpControlStruct->edgeColor = dlg.GetColor();
Invalidate(FALSE);
}
}
示例15: SetModified
void CPage2::OnSetColor()
{
//1 弹出颜色对话框
CColorDialog dlg;
if(dlg.DoModal()==IDCANCEL)return;
m_LineColor=dlg.GetColor();
//2 将应用按钮设置为可用
SetModified(TRUE);
}