[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-users] Crash on exit problem
From: |
Chris Rogers |
Subject: |
[paragui-users] Crash on exit problem |
Date: |
Thu, 24 Apr 2003 15:21:24 +1000 |
Hi all,
I am a complete newbie to ParaGUI / SDL, but am excited by what I might be
able to do with this library.
I am using Visual C++ 6 SP5 and just downloaded the win32 binary file (
ParaGUI-1.0.2.zip ).
Also grabbed some documentation for the same version (
paragui-doc-1.0.2.tar.gz ).
Managed to get a project compiling and running using tut1.cpp from the
tutorial section of the docs ( I have included the source at the bottom of
this email ).
However, when the program ends (closing the window), a program fault is
generated required a system reboot.
I linked in paragui.lib / paragui.dll. I have attempted various linking
options (Multithreaded, multithreaded DLL) to no avail.
Does anyone have any ideas?
Is there any place I can get a win32 distribution of 1.0.3? ( I attempted
to build it from source, but couldn't get it).
Thanks,
Chris
---------------- TUT1.CPP ---------------------------
/**
\file tut1.cpp
TUTORIAL 1 - application initialization, eventloop
*/
#include "pgapplication.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// every ParaGUI application need an application-object
PG_Application app;
// let us escape with "ESC"
app.SetEmergencyQuit(true);
// every application needs a theme (the look & feel of the widgets)
app.LoadTheme("default");
// we must initialize the screen where we want to draw on
// 640 - screen width
// 480 - screen height
// 0 - use screen bitdepth
// SDL_SWSURFACE - PG_ option to generate surface in system memory
app.InitScreen(640, 480, 0, SDL_SWSURFACE);
// ok - now we have a nice 640x480x16 window on the screen :)
// Every ParaGUI application is event driven, so we need a loop where
// we process all events (like mouse handling, keystrokes,...)
// usually this is done with PG_Application::Run()
app.Run();
// this function will only exit when the application was closed
return 0;
}
- [paragui-users] Crash on exit problem,
Chris Rogers <=