Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!news.nd.edu!mentor.cc.purdue.edu!noose.ecn.purdue.edu!dirac!gibbs.physics.purdue.edu!sho From: sho@gibbs.physics.purdue.edu (Sho Kuwamoto) Newsgroups: comp.sys.mac.programmer Subject: Re: TCL limitations question (long but worth it)... Message-ID: <5231@dirac.physics.purdue.edu> Date: 6 Jun 91 02:15:36 GMT References: <1991Jun5.191451.26662@dartvax.dartmouth.edu> Sender: news@dirac.physics.purdue.edu Organization: Purdue Univ. Physics Dept, W.Lafayette, IN Lines: 29 In article <1991Jun5.191451.26662@dartvax.dartmouth.edu> watt@eleazar.dartmouth.edu (Gill Watt) writes: >The problem I have encountered is that the TCL windows and whatnot >are all defined based on the WindowPtr. For my application I >need to use the full palette of colors and therefore the CWindowPtr. This is how you would add color windows to the Starter demo program... #include [...] void CStarterDoc::BuildWindow (Handle data) { CColorWindow *win; [...] win = new(CColorWindow); win->IColorWindow(WINDStarter, FALSE, gDesktop, this); itsWindow = win; [...] } That's it! CColorWindow is a descendant of CWindow which is defined in the More Classes folder. Although the itsWindow field of the CDocument class is defined to be a CWindow*, you can assign a CColorWindow* to it with no hassle. -Sho -- sho@physics.purdue.edu