本文整理汇总了C++中CColorDialog::DoModal方法的典型用法代码示例。如果您正苦于以下问题:C++ CColorDialog::DoModal方法的具体用法?C++ CColorDialog::DoModal怎么用?C++ CColorDialog::DoModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CColorDialog
的用法示例。
在下文中一共展示了CColorDialog::DoModal方法的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: OnBnClickedButtonCor
void CoInputLineDlg::OnBnClickedButtonCor()
{
// TODO: 在此添加控件通知处理程序代码
CColorDialog cor;
if (cor.DoModal()==IDOK)
m_LineCor = cor.GetColor();
}
示例3: OnBnClickedButtonColor
// 배경색 클릭이벤트
void CLevelDlg::OnBnClickedButtonColor()
{
CColorDialog dlg;
// 색상선택 대화상자 띄우기
dlg.DoModal();
ld_rectColor = dlg.GetColor();
InvalidateRect(&ld_rect);
}
示例4: OnBtnClrSplit
void CColorDlg::OnBtnClrSplit()
{
CColorDialog clrDlg;
if(clrDlg.DoModal() == IDOK)
{
m_clrSplit = clrDlg.GetColor();
}
}
示例5: OnBtnClrWave
void CColorDlg::OnBtnClrWave()
{
CColorDialog clrDlg;
if(clrDlg.DoModal() == IDOK)
{
m_clrWaveform = clrDlg.GetColor();
}
}
示例6: 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());
}
}
示例7: OnPenColor
void CGDIPracticeView::OnPenColor()
{
// TODO: 여기에 명령 처리기 코드를 추가합니다.
CColorDialog crDlg;
if (crDlg.DoModal() == IDOK) {
m_colorPen = crDlg.GetColor();
}
}
示例8: OnButtonLineColorDiy
void CDataServerCenterView::OnButtonLineColorDiy()
{
CColorDialog colotDlg;
if(colotDlg.DoModal() == IDOK)
{
((CSpectrumCompareDlg *)(this->pSpectrumCompareDlg))->m_LineColor=colotDlg.GetColor();
}
}
示例9: OnSetColor
void CMyView::OnSetColor()
{
// TODO: Add your command handler code here
CColorDialog dlg; //颜色设置通用对话框
if (dlg.DoModal()==IDOK)
{
m_color=dlg.GetColor();
}
}
示例10: OnChangeColor
void CEdgeTab::OnChangeColor()
{
CColorDialog dlg;
if (dlg.DoModal()==IDOK)
{
m_lpControlStruct->edgeColor = dlg.GetColor();
Invalidate(FALSE);
}
}
示例11: OnBGColor
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;
}
示例12: OnChangeColor
void CPropertiesEDlg::OnChangeColor()
{
CColorDialog dlg;
if (dlg.DoModal()==IDOK)
{
m_color = dlg.GetColor();
Invalidate(FALSE);
}
}
示例13: OnRButtonDown
void CMapView::OnRButtonDown(UINT nFlags, CPoint point)
{
CColorDialog dlg;
if(dlg.DoModal() == IDOK)
{
m_color = dlg.GetColor(); // 색상 설정
}
CView::OnRButtonDown(nFlags, point);
}
示例14: OnStnClickedColor
void CLinkPropertiesDialog::OnStnClickedColor()
{
CColorDialog dlg;
if( dlg.DoModal() == IDOK )
{
m_Color = dlg.GetColor();
m_ColorControl.SetColor( m_Color );
}
}
示例15: OnViewColor
void CATLDrawView::OnViewColor()
{
CColorDialog dlg;
if (dlg.DoModal() == IDOK)
{
m_col = dlg.GetColor();
}
}