home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-05 | 1.3 KB | 49 lines | [TEXT/KAHL] |
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- // //
- // //
- // Copyright PennyWise Software, 1994. //
- // //
- // Part of the PennyWise Software Application Framework //
- // //
- // //
- // PWAboutBox.c Written by Peter Kaplan //
- // //
- // //
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- #include "PWAboutBox.h"
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- void DoAboutDialog()
- {
- WindowPtr theDialog;
- GrafPtr oldPort;
- Handle theHandle; // used in get DItem calls
- EventRecord theEvent;
-
- GetPort(&oldPort);
-
- theDialog = GetNewDialog( ABOUT_DIALOG, NULL, (WindowPtr)-1);
- if (theDialog) {
- SetPort (theDialog);
-
- ShowWindow (theDialog);
- SelectWindow(theDialog);
- DrawDialog(theDialog);
-
- while (!WaitNextEvent(mDownMask|keyDownMask,&theEvent,0,NULL));
-
- DisposDialog(theDialog);
-
- // Get Rid of the PICT Resource
- theHandle=GetResource('PICT',ABOUT_PICT);
- if (theHandle)
- ReleaseResource(theHandle);
-
- }
- else {
- // we could not load the dialog, something is really wrong.
- SysBeep(1);
- }
- SetPort(oldPort);
- }
-
-