Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!agate!usenet.ins.cwru.edu!gatech!prism!ironcity.gatech.edu!dave From: dave@ironcity.gatech.edu (David K. Codelli) Newsgroups: comp.sys.mac.programmer Subject: Think C questions Summary: Please help... Message-ID: <23023@hydra.gatech.EDU> Date: 28 Feb 91 02:59:05 GMT Sender: news@prism.gatech.EDU Reply-To: dave%ironcity.gatech.edu@gatech.edu (David K. Codelli) Organization: ICS Department, Georgia Institute of Technology Lines: 58 A while back I posted a problem I was having drawing some controls. I received several responses (which I appreciated very much), but none was able to help me because I posed the problem wrong. Problem 1. Consider the Starter app that comes with the TCL. I have a subpane of the main window, defined as a local variable of Buildwindow(). I can draw using Quick draw routines with no problem. This subpane is actually a subclass of Cpane called CSelectionPane, because I wanted to have a radio group as its instance variables. The instance variables look like this: struct CRadioGroup *theField; struct CRadioButton *theButton1; struct CRadioButton *theButton2; These buttons are created from resources. In my ISelectionPane(), I have the following lines: theButton1->IRadioButton(B_id1, this, theField); theButton2->IRadioButton(B_id2, anEnclosure, theField); where B_idx is the resource id of the button. Here is the weird part: the first declaration sets the enclosure of the button to my instance of CSelectionPane (which is what I want), the second sets the enclosure to the mainpane. For some reason, when I run, I am only getting the second button drawn, in the coords of the main pane, not my subpane, of course. If I switch the two, the one with "this" still is not drawn. Another interesting part is that if I draw (lines for example) where a control will be created, the lines inside the containing rect of the control will be erased. Problem 2. I have created a DLOG and a DTIL using resedit. The dialog looks exactly like I want it to in resedit, but when I load it with GetNewDialog(res_id, ...) It only draws my buttons, not my static text fields. If I change the static text part to be a button, it draws a button with my static text as a title. I have searched IM, the Think manual, everything, and I can't figure out what is going on. I hope someone can please help me as I am really stuck. Thanks in advance, David David K. Codelli |"Are you sure you don't want some- Georgia Institute of Technology | thing for the pain, Col. Flagg? Internet: gt7315a@prism.gatech.edu| I mean, to make it worse!" NeXTMail: dave@ironcity.gatech.edu| -Hawkeye