Hi,
I seem to have a problem with maximising a window, perhaps I haven't fully understood some of the affects of ClearWin+ format codes.
I have a main program window which has a menu at the top and a toolbar underneath the file menu, then the rest of the space of this window is a big graphics space using the %gr code. Now in this program I have an Open File Dialog(OFD) that I am currently trying to update.
The OFD has a little preview box that shows you an image of the file that you highlight/select (single click), now after highlighting a file the image gets loaded in the preview box and then if the user decides, they can click OK, to open or CANCEL to close the OFD box.
The problem happens when the user decides NOT to open the file and clicks CANCEL, the file doesn't open at that time but if you maximise the main window, it loads the file in its graphic space (where it is originally supposed to) automatically. Is there a way to control a window maximise in FTN95?
Basically, OFD → Select file to preview → Cancel to come out of OFD → Maximise Main Window → File Loads in %GR space of main window. The obvious idea here is to only the file when and only when the user clicks OK, just like any other program.
I think I, kind, of know what the problem is about but I am not sure how to tackle it. I think when I preview the selected file (this calls another function) all the variables get loaded with that file information and they dont get cleared when CANCEL is pressed.
One thing I am uncertain of is, how does %GR react to maximise does it do an equivalent of a REPAINT?
I hope this explains the problem clearly. Any suggestions regarding this issue would be greatly appreciated.
Thank you
Kind regards
Murt