Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!vax1.tcd.ie!ekelly From: ekelly@vax1.tcd.ie (EAMON EXT.1795, ROOM 12, 204 PEARSE ST.) Newsgroups: comp.lang.c++ Subject: virtual functions and CommonView Message-ID: <5436@vax1.tcd.ie> Date: 2 Feb 90 08:22:22 GMT Organization: Computer Laboratory, Trinity College Dublin Lines: 26 I thought I knew the point about the 'virtual' keyword until I used Glockenspiel's CommonView 1.1 Let me explain. In CommonView there is a class 'Window'. This has two protected procedures (among others) 'virtual void _FAR Activate (Event);' and 'long _FAR Dispatch (Event)' If a derived class of 'Window' wants to have its own version of either of these it must call the 'Window' function in the derived member or the program will not work (ie. my 'Activate' must call 'Window :: Activate' before returning.) If a derived class does not contain either 'Activate' or 'Dispatch' the 'Window' members are called by the system as needed. My question is what is the difference between 'Activate', which is 'virtual' and 'Dispatch' which is not? I though the difference was that my 'Activate' would not need to call 'Window :: Activate' but that idea was squashed by Glockenspiel when I ask why my program would not work. This is version 1.2 of C++. Eamon Kelly EKELLY@vax1.tcd.ie