Hi!
I have the following questions about the program:
void GetFileName(int id);
int colBorderX = 30, colBorderY = 30, wgX = 150, wgY = 50, id_main;
int main()
{
int screen_width, screen_height;
g.getscr (&screen_width, &screen_height);
g.swgwin (-7, 0, screen_width + 14, screen_height);
g.swgtit ("Dislin study");
id_main = g.wgini ("form");
int id_basbtn = g.wgbas (id_main, "form");
g.swgwin (colBorderX, colBorderY, wgX, wgY);
int id_btn = g.wgpbut (id_basbtn, "Start");
g.swgcbk (id_btn, GetFileName);
g.wgfin ();
return 0;
}
void GetFileName(int id)
{
char* chfile = new char[255];
chfile = g.dwgfil ("Select a file", "File", "*.cpp;*.h");
int id_baslab = g.wgbas(id_main, "form");
g.swgwin (colBorderX, 5*colBorderY, wgX*5, 2*wgY);
int id_lab = g.wglab(id_baslab, chfile);
delete chfile;
}
1. Why does the second line appear when you click the Start button again, although the location of the second line should be the same as the first line. I attached the video.
2. How do I make it possible to select a file extension separately? Which separator should be used in the third parameter of the dwgfil function?
3. Which Dislin function allows you to get the label text?
Alex