I'm working on a Macintosh program in C and having a problem with a
Picture control. I've added the control in Interface Builder, and I
have a PicHandle that I've created that I want to display in the
control.
I've tried:
void SetControl(PicHandle picHandle)
{
ControlRef control;
GetDialogItemAsControl(GetDialogFromWindow(gScanWindow), 200,
&control);
SetControlData(control, kControlPicturePart,
kControlPictureHandleTag, sizeof(picHandle), &picHandle);
}
But this doesn't seem to work - even though control looks valid and
picHandle seems valid, I don't see the Picture control. It's as if
the picture control isn't there at all - I can see the dialog
backround where the control should be.
I have another picture control on the same dialog that's supposed to
be showing a static bitmap from the resource; the bitmap shows up fine
in Interface Builder, but when I tell it to Test Interface, the
interface appears with blank space where the bitmap should be - so
maybe there's something I haven't initialized or something that's
required for using the picture control? I don't really know.
This is on Mac OS X, using Interface Builder 2.2.1, and the current
version of Project Builder (I can't remember what it is). |