Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!trwind!venice!press From: press@venice.SEDD.TRW.COM (Barry Press) Newsgroups: comp.windows.ms Subject: Re: Petzold's HexCalc Message-ID: <779@venice.SEDD.TRW.COM> Date: 22 Aug 90 16:00:20 GMT References: <674@dbase.A-T.COM> Reply-To: press@venice.sedd.trw.com (Barry Press) Organization: TRW Systems Engineering & Development Division, Redondo Beach, CA Lines: 16 In article <674@dbase.A-T.COM> awd@dbase.A-T.COM (Alastair Dallas) writes: >[....] >Therefore, two points: 1) Don't ignore tips.txt! (And, by extension, >browsing through windows.h doesn't hurt, either.) And, 2) The answer Yea, verily. For instance, here's another one. It used to be that you could use the hPrevInstance parameter passed to WinMain to see if another copy of the app way running, and if you chose to only allow one to run exit if it was non-zero. You can't do that any more. hPrevInstance seems to hang around non-zero for at least a while (standard mode for the instances I'm seeing) after the previous copy is terminated. You also have to pay attention to the change that a second RegisterClass call while the class still exists (e.g. if hPrevInstance is non-zero) will FAIL. -- Barry Press Internet: press@venice.sedd.trw.com