                              ===================
                              = windows example =
                              ===================


Overview
--------

This example demonstrates how to code a native windowed application using PTC




Console vs. Windowed
--------------------

The main set of PTC example programs generate console executables. This means
that when the application is created, a console (like a dos prompt) is created
then the output window is created seperately. Whenever the programmer writes
output via printf or cout etc. it appears on this console. Console programs
are just like your standard dos or unix programs, and have a "main" procedure.

Windowed executables are different. When windowed executables are created they
have NO console to display text output, instead they have to rely on the win32
api to create a window and then use this to present an interface to the user.
I/O functions like cout, printf, getch, kbhit and so on, do NOT work in a 
windowed application. Windowed programs dont have a "main" procedure, instead
they have a "WinMain" procedure.




PTC manages the window for you
------------------------------

Normally when you write a windowed application, you have to write a window
procedure to handle window messages and do a lot of work just to get a window
up. However, when you use PTC, you dont need to do this - PTC internally
manages the window and provides a simple console like interface for input.
PTC::getch and PTC::kbhit. Currently however, these routines are not complete,
PTC::kbhit works correctly, but PTC::getch will not give an accurate scan code
instead it simply waits for a key to be pressed, then returns "1". PTC::getch
will be completed and will behave correctly under windows in future versions
of PTC. Please note that under DOS PTC::getch and PTC::kbhit both behave 100%
correctly.

There may be a time when you do not want PTC to manage the window for you.
Unfortunately, in the current release PTC052 it is not supported. However
provisions have been made for future versions of PTC to support this. PTC053
should support user created windows like this: PTC ptc(hWnd) :)




Setting the window title
------------------------

This example uses "ptc.SetTitle" to set the title of the display window. Under
fullscreen modes SetTitle has *no* effect. In windowed output if the title of 
is not set then the window defaults to having a blank title bar.
