fix for bug #6348 -new field called Title is to be added in each ini file for the show example

This commit is contained in:
varada%netscape.com 1999-10-14 01:56:43 +00:00
Родитель 6f18d96994
Коммит 01afe31c40
3 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -18,6 +18,7 @@
[IMAGE] [IMAGE]
Type=Bitmap Type=Bitmap
Title=Show Example Small Anim Logo
Name=logo2.bmp Name=logo2.bmp
Value= Value=
Start_x=7 Start_x=7

Просмотреть файл

@ -18,7 +18,8 @@
[IMAGE] [IMAGE]
Type=Bitmap Type=Bitmap
Name=string.bmp Name=string.bmp
Title=Show Example User Agent String
Value= Value=
Start_x=7 Start_x=7
Start_y=7 Start_y=7

Просмотреть файл

@ -19,6 +19,7 @@ static char THIS_FILE[] = __FILE__;
extern char iniFilePath[MAX_SIZE]; extern char iniFilePath[MAX_SIZE];
extern char imagesPath[MAX_SIZE]; extern char imagesPath[MAX_SIZE];
extern CString iniTracker; extern CString iniTracker;
CString imageTitle;
CImgDlg::CImgDlg(CWnd* pParent /*=NULL*/) CImgDlg::CImgDlg(CWnd* pParent /*=NULL*/)
: CDialog(CImgDlg::IDD, pParent) : CDialog(CImgDlg::IDD, pParent)
@ -124,6 +125,9 @@ void CImgDlg::ReadImageFromIniFile()
GetPrivateProfileString(imageSectionName, "Name", "", buffer, 250, iniFileName); GetPrivateProfileString(imageSectionName, "Name", "", buffer, 250, iniFileName);
image.name = CString(imagesPath) + CString(buffer); image.name = CString(imagesPath) + CString(buffer);
GetPrivateProfileString(imageSectionName, "Title", "", buffer, 250, iniFileName);
imageTitle = CString(buffer);
GetPrivateProfileString(imageSectionName, "start_X", "", buffer, 250, iniFileName); GetPrivateProfileString(imageSectionName, "start_X", "", buffer, 250, iniFileName);
image.location.x = atoi(buffer); image.location.x = atoi(buffer);
@ -153,7 +157,7 @@ BOOL CImgDlg::OnCommand(WPARAM wParam, LPARAM lParam)
int CImgDlg::DoModal() int CImgDlg::DoModal()
{ {
// TODO: Add your specialized code here and/or call the base class // TODO: Add your specialized code here and/or call the base class
return CDialog::DoModal(); return CDialog::DoModal();
} }
@ -184,7 +188,8 @@ BOOL CImgDlg::OnHelpInfo(HELPINFO* pHelpInfo)
BOOL CImgDlg::OnInitDialog() BOOL CImgDlg::OnInitDialog()
{ {
CDialog::OnInitDialog(); CDialog::OnInitDialog();
SetWindowText(imageTitle);
// TODO: Add extra initialization here // TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control return TRUE; // return TRUE unless you set the focus to a control