Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!resnick From: resnick@cogsci.uiuc.edu (Pete Resnick) Newsgroups: comp.sys.mac.programmer Subject: Windows and controls Message-ID: <1991Jan30.030241.27264@ux1.cso.uiuc.edu> Date: 30 Jan 91 03:02:41 GMT Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 42 OK, easy beginner's question: what's wrong with this picture (I mean, window)? The following code brings up a window, but none of my controls appear in it. (The first two are vertical scrollbars, the third is a panel divider I wrote myself.) Am I missing something? pr ------------------- void MakeNewWindow(WindowPtr myWindow, StringPtr windowName); main() { WindowRecord myWindow; EventRecord myEvent; InitGraf(&thePort); InitFonts(); InitWindows(); MakeNewWindow((WindowPtr)&myWindow, (StringPtr)"\ptesting"); while(!WaitNextEvent(mDownMask, &myEvent, 0xFFFFFFFF, 0L)); } void MakeNewWindow(WindowPtr myWindow, StringPtr windowName) { GetNewWindow(128, myWindow, -1L); SetPort(myWindow); GetNewControl(128, myWindow); GetNewControl(129, myWindow); GetNewControl(130, myWindow); SetWTitle(myWindow, windowName); BeginUpdate(myWindow); EraseRect(&myWindow->portRect); DrawGrowIcon(myWindow); DrawControls(myWindow); EndUpdate(myWindow); ShowWindow(myWindow); } -- Pete Resnick (...so what is a mojo, and why would one be rising?) Graduate assistant - Philosophy Department, Gregory Hall, UIUC System manager - Cognitive Science Group, Beckman Institute, UIUC Internet/ARPAnet/EDUnet : resnick@cogsci.uiuc.edu BITNET (if no other way) : FREE0285@UIUCVMD