I added the FrmDrawForm(form) above the FrmDoDialog(form), but it now
crashes on FrmDrawForm.  I checked the bitmap resource, which is properly
defined and ID'd by Pilrc.  Yet it crashes.

Again here is a listing of my code calling a form with a bitmap resource
that should be displayed on the already created form.  Thanks for the help!


--------form loading code-----------
      FormPtr frm = FrmInitForm(SPLASH_FORM);

      FrmSetEventHandler(frm, FrmSplash_HandleEvent);

        FrmDrawForm(frm);  //crashes here!  
        FrmDoDialog(frm);        //if FrmDrawForm removed, crashes here
        
        // Clean up
        FrmDeleteForm(frm);

-------------------
---------resource code---------------
FORM ID SPLASH_FORM    AT ( 0 0 160 160 )
NOFRAME MODAL NONUSABLE NONUSABLE  NONUSABLE
BEGIN
        TITLE "Quit Smoking"
          FORMBITMAP AT (3 15) BITMAP SMOKINGGUY_BMP 
END

BITMAPCOLOR SMOKINGGUY_BMP "EditSmoking_Mary.bmp"

---------------------------------------


At 03:42 PM 4/19/2004, you wrote:
>Hi all.
>
>I'm trying to add a splash screen to my program by adding a bitmap to a
form
>through the available utilities in Pilrc.  This should be an easy task, and
>it was.  The problem comes when I'm loading the form.
>
>When I call FrmDoDialog(form), the program crashes.  Although it does
>compile fine, and I used the same method as I did previously for a
different
>form, I just don't get why its crashing...

Try calling FrmDrawForm before FrmDoDialog, just to see if it crashes 
during the draw routine.  Is it possible that the bitmap resource is 
wrong?  Is the form bitmap object in the form pointing to the proper 
resource ID?  Having an ID for a bitmap not included in your resources 
would cause a crash.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to