ShowBalanceColorsDlg Example for C++ 5.0 and later
void CDialogs::OnShowBalanceColor()
{
int nRet;
m_pRasterColorDlg->UIFlags= BALANCECOLORS_SHOW_PREVIEW |
BALANCECOLORS_SHOW_TOOL_ZOOMLEVEL;
m_pRasterColorDlg->Bitmap= m_LeadRasterView.GetRaster().GetBitmap ();
m_pRasterColorDlg->EnableMethodErrors= false;
nRet= m_pRasterColorDlg->ShowBalanceColorsDlg((long)this->m_hWnd);
if ( nRet == 0 && m_pRasterColorDlg->DialogStatus == DLG_OK )
{
m_pRasterProc->BalanceColors (m_LeadRasterView.GetRaster (),
(float)m_pRasterColorDlg->RedToRed,
(float)m_pRasterColorDlg->RedToGreen,
(float)m_pRasterColorDlg->RedToBlue,
(float)m_pRasterColorDlg->GreenToRed,
(float)m_pRasterColorDlg->GreenToGreen,
(float)m_pRasterColorDlg->GreenToBlue,
(float)m_pRasterColorDlg->RedToRed,
(float)m_pRasterColorDlg->RedToGreen,
(float)m_pRasterColorDlg->RedToBlue
);
}
}
void CRasterColorDlgSink::OnDlgHelp((long DlgFrom, long CtlID)
{
switch(DlgFrom)
{
case HELP_BALANCECOLORS:
AfxMessageBox(TEXT("Help from BalanceColors dialog "));
break;
case HELP_COLOREDGRAY:
AfxMessageBox(TEXT("Help from ColoredGray dialog "));
break;
case HELP_GRAYSCALE:
AfxMessageBox(TEXT("Help from GrayScale dialog "));
break;
case HELP_REMAPHUE:
AfxMessageBox(TEXT("Help from RemapHue dialog "));
break;
case HELP_REMAPINTENSITY:
AfxMessageBox(TEXT("Help from RemapUntensity dialog "));
break;
}
}