/p>
{
t_edit [i] [j]. Create (WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DLGFRAME | TA_LEFT,
CRect (j * w + x0-35, i * h + y0, (j +1) * w-1 + x0, (i +1) * h-1 + y0), this, 100 );
В
t_edit [i] [j]. SetFont (& myFont);
t_edit [i] [j]. SetWindowText (parent-> name_city [i]);
t_edit [i] [j]. SetReadOnly ();
}
else
{
t_edit [i] [j]. Create (WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DLGFRAME,
CRect (j * w + x0, i * h + y0, (j +1) * w-1 + x0, (i +1) * h-1 + y0), this, 100); // count + +);
В
t_edit [i] [j]. SetFont (& myFont);
t_edit [i] [j]. SetLimitText (4);
}
}
}
В
CStdioFile f1;
f1.Open ("table.ini", CFile :: modeRead);
for (i = 0; i <29; i + +)
{
CString s1;
f1.ReadString (s1);
int j = i +1;
int k = 0;
while (j <29 && k
{CString s2;
while (s1 [k] == '') k + +;
while (s1 [k]! = '')
{s2 + = s1 [k]; k + +;}
t_edit [i] [j]. SetWindowText (s2);
j + +;
}
}
В
Proverka ();
return TRUE;// return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
В
void CSetting :: OnOK ()
{
Proverka ();
CStdioFile f1;
f1.Open ("table.ini", CFile :: modeCreate | CFile :: modeWrite);
for (int i = 0; i <29; i + +)
{
parent-> tableAllCity [i] [i] = 0;
CString s1;
for (int j = i +1; j <29; j + +)
{
CString s2;
t_edit [i] [j]. GetWindowText (s2);
parent-> tableAllCity [j] [i] = parent-> tableAllCity [i] [j] = atoi (s2);
В
s1 + = s2 + "";
} s1 + = " n";
f1.WriteString (s1);
}
MessageBox ("Введені параметри впорядковано на помилки і збережені. ");
CDialog :: OnCancel ();
}
В
void CSetting :: Proverka ()
{
for (int i = 0; i <29; i + +)
{
for (int j = i +1; j <29; j + +)
{
CString s1;
t_edit [i] [j]. GetWindowText (s1);