build/ImageMagick-7.1.0-2/IMDelegates/ghostscript-9.54.0/toolbin/color/icc_creator/ICC_Creator/ICC_CreatorDlg.cpp
void CICC_CreatorDlg::OnBnClickedCielab()
{
	int code;
	TCHAR szFile[MAX_PATH];
	OPENFILENAME ofn;

	ZeroMemory(szFile, MAX_PATH);
	ZeroMemory(&ofn, sizeof(OPENFILENAME));
	ofn.lStructSize = sizeof(OPENFILENAME);
	ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
	ofn.hwndOwner = this->m_hWnd;
	ofn.lpstrFilter = _T("Supported Files Types(*.txt)\0*.txt;*.TXT\0\0");
	ofn.lpstrTitle = _T("Load CIELAB File");
	ofn.lpstrFile = szFile;
	ofn.nMaxFile = MAX_PATH;

	if (IDOK == GetOpenFileName(&ofn))
	{
		code = this->GetCIELAB(ofn.lpstrFile);
		if (code == 0)
			this->SetDlgItemText(IDC_STATUS, _T("CIELAB Data Loaded"));
	}
	else
	{
		this->SetDlgItemText(IDC_STATUS, _T("CIELAB file failed to open!"));
	}
}
/* Load the CIELAB data.  Data is preceded by a two line header.  First line is the
 * number of colorants.  Second line is the number of samples in each colorant
 * direction (a single number since they must be sampled with the same number for
 * now).  Data is then after that. */
Load the CIELAB data.  Data is preceded by a two line header.  First line is the
number of colorants.  Second line is the number of samples in each colorant
direction (a single number since they must be sampled with the same number for
now).  Data is then after that.
Load the CIELAB data . Data is preceded by a two line header . First line is the number of colorants . Second line is the number of samples in each colorant direction ( a single number since they must be sampled with the same number for now ) . Data is then after that .
void CICC_CreatorDlg::OnBnClickedCielab()
{
	int code;
	TCHAR szFile[MAX_PATH];
	OPENFILENAME ofn;
	ZeroMemory(szFile, MAX_PATH);
	ZeroMemory(&ofn, sizeof(OPENFILENAME));
	ofn.lStructSize = sizeof(OPENFILENAME);
	ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
	ofn.hwndOwner = this->m_hWnd;
	ofn.lpstrFilter = _T("Supported Files Types(*.txt)\0*.txt;*.TXT\0\0");
	ofn.lpstrTitle = _T("Load CIELAB File");
	ofn.lpstrFile = szFile;
	ofn.nMaxFile = MAX_PATH;
	if (IDOK == GetOpenFileName(&ofn))
	{
		code = this->GetCIELAB(ofn.lpstrFile);
		if (code == 0)
			this->SetDlgItemText(IDC_STATUS, _T("CIELAB Data Loaded"));
	}
	else
	{
		this->SetDlgItemText(IDC_STATUS, _T("CIELAB file failed to open!"));
	}
}
void CICC_CreatorDlg :: OnBnClickedCielab ( ) { int code ; TCHAR szFile [ MAX_PATH ] ; OPENFILENAME ofn ; ZeroMemory ( szFile , MAX_PATH ) ; ZeroMemory ( & ofn , sizeof ( OPENFILENAME ) ) ; ofn . lStructSize = sizeof ( OPENFILENAME ) ; ofn . Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY ; ofn . hwndOwner = this -> m_hWnd ; ofn . lpstrFilter = _T ( " \0 \0 \0 " ) ; ofn . lpstrTitle = _T ( " " ) ; ofn . lpstrFile = szFile ; ofn . nMaxFile = MAX_PATH ; if ( IDOK == GetOpenFileName ( & ofn ) ) { code = this -> GetCIELAB ( ofn . lpstrFile ) ; if ( code == 0 ) this -> SetDlgItemText ( IDC_STATUS , _T ( " " ) ) ; } else { this -> SetDlgItemText ( IDC_STATUS , _T ( " " ) ) ; } }
Load the CIELAB data.
Load the CIELAB data .