|
![](/i/fill.gif) |
> Does one exist?
Download and install Visual C# Express edition, click "create new project"
and then add in a few lines of code to draw stuff on the window (check out
Mike's recent posts about his flood fill and fire programs). That's about
as simple as I can imagine in a window'd OS, I'm sure there are loads of
tutorials and example projects to get you started.
> Typically you have to register callbacks with the GUI system, and then
> call a "main loop" function which calls your callbacks when it feels like
> it.
Dunno about that, in Visual Studio Express I just go to the OnPaint property
and type in or select a function name from the drop-down menu. That
function then gets called when the form/control needs repainting.
> happen while the user isn't pressing anything. (E.g., if you wanted to do
> something compute-bound, now the GUI stops responding until the compute
> task finishes.)
Anything that is going to take a while you should probably do in another
thread so your code can still respond to GUI events. It's very easy, just
one call to _beginthreadex windows API function starts off the given
function in a new thread.
You can also drag and drop a timer onto your form and then tell it to call a
certain function every so often, which is useful if you want to do some
simple animation.
And if you want to look into anything more complicated than lines and simple
pixel animation, DirectX is easier than ever to use now, especially if you
already understand 3D coordinates and stuff.
Post a reply to this message
|
![](/i/fill.gif) |