Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!prlb2!kulcs!kulesat!esat!bartels From: bartels@haydn.kulesat.uucp Newsgroups: comp.sys.mac.programmer Subject: How to open two CWindows Summary: If I open 2 CWindows together mine computer crashes Keywords: CWindows Message-ID: <1037@haydn.kulesat.uucp> Date: 12 Apr 89 14:47:42 GMT Reply-To: bartels@kulesat.uucp Organization: Katholieke Universiteit Leuven,ESAT - dep. Elect. Engineering, Belgium Lines: 62 I have problems with opening two colorwindows together. When I run mine program the two windows will appear on the screen but then I had to resart mine computer. Below you will find mine program. If you can help me, please send me a message because reading and reading again Inside Macintosh V gives no solution. The C program: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include main() { CWindowPtr ImagePort,ConsolePort; Rect Imagerect; long int refCon; CWindowRecord wRecord; InitGraf(&qd.thePort); InitWindows(); SetRect(&Imagerect,40,40,350,350); ImagePort = (CWindowPtr) NewCWindow((Ptr) &wRecord,&Imagerect,"\pMijn eerste beeld",1, documentProc, (WindowPtr) -1 ,0,refCon = 4); SetRect(&Imagerect,370,40,570,400); SetPort((GrafPtr) ImagePort); ConsolePort = (CWindowPtr) NewCWindow((Ptr) &wRecord,&Imagerect,"\pConsole",1, documentProc, (WindowPtr) -1 ,0,refCon = 4); while(! Button()); } Thanks for your attention, Yours sincerly, Rudi Bartels KU Leuven Faculteit der Toegepaste Wetenschappen ESAT-MI2 Kard. Mercierlaan 94 3030 Heverlee Belgium email: bartels@kulesat.uucp Fax: 32-16-221855