Delay:
Sleep(10); // Sleep 10 (microseconds?)
Reseed randomizer:
srand(PocketPC::GetTickCount());
Get Random Number:
x=rand()%5; // Random number 0-4
Before using display functions, set up display pointer:
Display* display=GetDisplay();
Get Display size:
dWidth=display->GetWidth();
dHeight=display->GetHeight();
Clear Display to color:
display->Clear(Color(0,0,0)); // Color black. Color function numbers are R,G,B = Red,Green,Blue
Draw Circle:
display->DrawCircle(120,160,80,Color(255,0,0)); //Red
ie.
display->DrawCircle(Point,radius,color) OR
display->DrawCircle(x,y,radius,color)
Draw Filled Rectangle:
display->FillRect(Rect(0,299,240,319),0xffff); // Cyan
OR
display->FillRect(x1,y1,x2,y2,color)
** Colors can be in hex (eg 0xffffff = white) or in RGB format (255,255,255 = white?)
Draw a pixel:
display->SetPixel(x,y,Color)
display->SetPixel(Point,color); // not sure how to set point yet
Possibly:
Point& spot;
spot.x=10; spot.y=20; // Don't quote me on this

Draw a line:
display->DrawLine(x1,y1,x2,y2,color);
** These functions can use Point as well. I dont know how
Draw Horizontal Line (presumably faster than above function):
display->DrawHLine(x,y,length,color); // x,y is top. Draws right?
Draw Vertical Line (ditto):
display->DrawVLine(x,y,length,color); // Draws down?
Draw Polygons:
display->DrawPoly(points[],numberofpoints,color); // need example code for creating point array
display->FillPoly(points[],numberofpoints,color); // ditto
Get color of pixel:
display->GetPixel(x,y);
display->SetBlending(x); // x=0 transparent. x=255 opaque
display->SetClipping(Rect); // Rectangle defined for clipping drawing
display->SetDefaultShader(); // resets to the default shader
** Not sure about shader use yet.
display->BlitRotated(x,y,angle,surface); // Draw an image rotated 'angle' degrees on a surface
display->BlitStretched(Rect,surface,source,Rect); // Not sure about this one yet. Stretches an image to fit a surface.
display->BitRotatedStretch(x,y,angle,surface,destSurface,Rect); // Draw an image rotated 'angle' degrees from a surface onto another surface 'destSurface', stretched to fit the new surface.
There's much more, of course, but I don't want to post what Conan's done on his site. Not sure how to get sytlus x,y coordinates, but I think it's something to do with a point. eg. stylus.x,stylus.y if 'stylus' is defined as a Point. eg:
void BlitSample::StylusDown( Point stylus )