home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 Mobile
/
Chip_Mobile_2001.iso
/
palm
/
business
/
printcar
/
printcar.exe
/
src
/
PrintCard.cc
< prev
next >
Wrap
C/C++ Source or Header
|
2000-06-05
|
1KB
|
45 lines
//
// $Id: PrintCard.cc,v 1.2 2000/06/04 23:23:25 sergey Exp $
//
#include <Pilot.h>
#include "UI/Application.h"
#include "PrintCardForm.h"
#include "Util/Error.h"
#include "PrintCardRes.h"
//-- Custom error handler class ------------------------------------------------
class CustomErrorHandler: public Util::ErrorHandler
{
virtual void reportError(bool fatal, const char* message)
{
FrmCustomAlert(ID_ERROR_ALERT, (Char*)message, "", "");
if (fatal)
SysReset();
}
};
//------------------------------------------------------------------------------
DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags)
{
if (cmd == sysAppLaunchCmdNormalLaunch)
{
// setup application custom error handler
CustomErrorHandler errorHandler;
Util::Error::setErrorHandler(errorHandler);
PrintCardForm mainForm;
UI::Application app;
app.run(mainForm, evtWaitForever);
}
return 0;
}