[comp.sys.mac.programmer] Think C questions

dave@ironcity.gatech.edu (David K. Codelli) (12/07/90)

I have an application that I am considering building with THINK C. 
I don't know a lot about the package, so if some of you could
answer these questions for me, it would make my decision easier:

1.  Does it have graphics capabilities?  If so, how good are they?

2.  Does it have library of objects such as menus, word processing
fields, and other stuff that I could use in my application instead of
coding them myself?


Any insights are appreciated.

Thanks in advance,

David K. Codelli

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 

dave@ironcity.gatech.edu (David K. Codelli) (01/14/91)

Thanks to all who responded to my last question.  I've
almost got it, but here are two more questions.  I am creating
a new application by adding to an existing one.

1.    I  can't get the CBartender object to undim my menus.
I created them with ResEdit 1.2 and gave them a menuID there.
In the header of my source file, I have

#define MENUmymenu 128 /* The menuid from ResEdit */

and in the SetUpMenus method for my application, I have

gBartender->SetDimOption(MENUmymenu,dimNONE);

when I run my app, they stay dimmed, unlike the menus that
were there in the old application.  


2.    Suppose I want a window to come up to display graphics and
text, but not have a title bar or scroll bar.  Would this be a 
pane object, and would I need a new window for it?

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 

dave@ironcity.gatech.edu (David K. Codelli) (02/28/91)

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