[net.micro.mac] problems with displaying PICT's in dialogs.

ir551@sdcc6.ucsd.EDU (Cris Rys) (07/15/86)

I've had problems getting a dialog to display a picture resource
attached to it. It looks fine in the resouce editor (eg the picture
displays when I open up the DITL or the DLOG) but when I use
getnewdialog it displays the dialog window without any picture.
I know it loads in the picture because I can hear it being read in
from the disk, but it just doesn't display.

Any clue to what is going wrong?
All help will be appreciated. Thanks a lot.

Cris Rys

ephraim@wang.UUCP (07/16/86)

> I've had problems getting a dialog to display a picture resource
> attached to it. It looks fine in the resouce editor (eg the picture
> displays when I open up the DITL or the DLOG) but when I use
> getnewdialog it displays the dialog window without any picture.
> I know it loads in the picture because I can hear it being read in
> from the disk, but it just doesn't display.

If I recall correctly, _GetNewDialog doesn't draw the dialog completely.
Initially, I did dialogs with _GetNewDialog followed by _ModalDialog,
and everything looked fine.  Then I did a non-modal dialog and parts of
it didn't show up!  The answer: _DrawDialog will insure that the dialog
is completely drawn.

marchesi@cernvax.UUCP (07/18/86)

In article <2752@sdcc6.ucsd.EDU> ir551@sdcc6.UUCP writes:
>I've had problems getting a dialog to display a picture resource
>attached to it. It looks fine in the resouce editor (eg the picture
>displays when I open up the DITL or the DLOG) but when I use
>getnewdialog it displays the dialog window without any picture.
>I know it loads in the picture because I can hear it being read in
>from the disk, but it just doesn't display.
>
>Any clue to what is going wrong?
>Cris Rys

Do you allow for an *update* of the dialog window? -> a mere _GetNewDialog
will just display the window and draw the buttons, but any additional items
(such as editText,...) will not be drawn. _ModalDialog, for instance, deals
with update events reguarding the active dialog window (and hence draws
EditTexts, Pictures, etc.).
Thus, if you are using _GetNewDialog *only*, try adding a _ModalDialog call...
(you can also check by adding an EditText item with ResEdit - if this does
not show up, too, then my diagnosis should be correct).

hope this helps,
		    ciao
			   Paolo

------------------------------------------------------------------------------
Paolo Petta


p-mail: DD Division
	CERN
	CH-1211 Geneva 23
	Switzerland
e-mail: ...{seismo,philabs,decvax,...}!mcvax!cernvax!marchesi

olson@endor.harvard.edu (Eric Olson) (07/22/86)

If you create the PICT yourself (rather than with Draw, or Paint, or whatever)
you may have forgotten to set the ClipRect to the PictRect.  Otherwise the
PICT doesn't display in SOME programs because the ClipRect gets scaled
off the edge of the 16-bit world.

-Eric