#include #include #include #include #include #include "Offscreen.h" #define kIsVisible true #define kNoGoAway false #define kNoWindowStorage 0L #define kFrontWindow ((WindowPtr) -1L) void main(void) { Rect myWBounds; /* for creating window */ WindowPtr myWindow; BitMap loadBM; /*Those two are used to carry around the bitmaps*/ EventRecord wutup; InitGraf(&qd.thePort); InitWindows(); InitCursor(); FlushEvents(everyEvent,0); myWBounds = qd.screenBits.bounds; /* size of main screen */ InsetRect(&myWBounds, 50,50); /* make it fit better */ myWindow = NewWindow(kNoWindowStorage, &myWBounds, "\pTest Window", kIsVisible,noGrowDocProc, kFrontWindow, kNoGoAway, 0); if(!LoadPicResIntoBitMap(&loadBM,128,"\prespic")) { SysBeep(1); ExitToShell(); } SetPort(myWindow); CopyBits(&loadBM, &(*myWindow).portBits, &(loadBM.bounds), &(loadBM.bounds), srcCopy, 0L); while (!Button()); /* give user a chance to see our work of art*/ }