Adam,
Your reply was a great help. I can now compile and run the program
without needing to delete the first line of the .rh file.
I change the following line from:
AM> RG> GetMainWindow()->AssignMenu("EXITMENU");
to your suggestion of:
AM> GetMainWindow()->AssignMenu(EXITMENU) <- int
which works well.
With the program which crashed when the dialog was called I did the same
thing...remove the quotes.
AM> RG>class TMyWindow : public TWindow
AM> RG>{
AM> RG>public:
AM> RG> TMyWindow(Twindow* parent = 0);
AM> RG> ~TMyWindow();
AM> RG>protected:
AM> RG> virtual void SetupWindow();
AM> RG> BOOL CanClose();
AM> Isn't CanClose() public for TWindow?
Yes it is. Tried to remove this line but the compiler complained that
BOOL TMyWindow::CanClose() is not a member of TMyWindow
so I changed the procedure to:
TWindow::CanClose()
this ran but every time I closed a dialog box I got the "Do you want to
close" message box I call in CanClose(). By declaring CanClose as part of
TMyWindow I only get the Query box when I try to close the main window.
AM> RG> void CmExit();
AM> Delete the above function. By default CanClose is called on exit and
I deleted this declaration and the procedure which had
SendMessage(WM_CLOSE)
and as you suggested it worked well.
Thanks for your help. Using OWL for programming windows is SLOWLY starting
to make some sense but I guess it will take a while longer to actually
understand what all the lines of code actually do.
___
* OFFLINE 1.56
--- Maximus 2.02
---------------
* Origin: Infoboard - Auckland - (09) 833-8788 - (3:772/140)
|