home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Frameworks / PennyWise™ Framework / PennyView / Source / PWAboutBox.c < prev    next >
Encoding:
Text File  |  1994-08-05  |  1.3 KB  |  49 lines  |  [TEXT/KAHL]

  1. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. //                                                                                //
  3. //                                                                                //
  4. //                    Copyright PennyWise Software, 1994.                            //
  5. //                                                                                //
  6. //            Part of the PennyWise Software Application Framework                //
  7. //                                                                                //
  8. //                                                                                //
  9. //            PWAboutBox.c            Written by Peter Kaplan                        //
  10. //                                                                                //
  11. //                                                                                //
  12. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  13. #include "PWAboutBox.h"
  14. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  15. void    DoAboutDialog()
  16. {
  17. WindowPtr        theDialog;
  18. GrafPtr            oldPort;
  19. Handle            theHandle;        // used in get DItem calls
  20. EventRecord        theEvent;
  21.  
  22.     GetPort(&oldPort);
  23.  
  24.     theDialog = GetNewDialog( ABOUT_DIALOG, NULL, (WindowPtr)-1);
  25.     if (theDialog) {
  26.         SetPort        (theDialog);
  27.                 
  28.         ShowWindow    (theDialog);
  29.         SelectWindow(theDialog);
  30.         DrawDialog(theDialog);
  31.         
  32.         while (!WaitNextEvent(mDownMask|keyDownMask,&theEvent,0,NULL));
  33.         
  34.         DisposDialog(theDialog);
  35.  
  36.         // Get Rid of the PICT Resource
  37.         theHandle=GetResource('PICT',ABOUT_PICT);
  38.         if (theHandle) 
  39.             ReleaseResource(theHandle);
  40.             
  41.         }
  42.     else {
  43.         // we could not load the dialog, something is really wrong.
  44.         SysBeep(1);
  45.         }
  46.     SetPort(oldPort);
  47. }
  48.  
  49.