Hi Ralph,
If you have a button on your main form called "MainFormExitButton" then add
the following piece of code to forms event handler. It posts a application
stop event to itself.
static Boolean MainFormHandleEvent(EventPtr ptrEvent)
{
Boolean boolHandled = false;EventType typNewEvent;
switch (ptrEvent->eType)
{
case ctlSelectEvent: // A control button was pressed and released.
switch (ptrEvent->data.ctlEnter.controlID)
{
case MainFormExitButton:
MemSet(&typNewEvent, sizeof(typNewEvent), 0);
typNewEvent.eType = appStopEvent;
EvtAddEventToQueue(&typNewEvent);
boolHandled = true;
break;
}
break;
}
return(boolHandled);
}
-----Original Message-----
From: Ralph Krausse [mailto:[EMAIL PROTECTED]]
Sent: 05 January 2000 22:25
To: '[EMAIL PROTECTED]'
Subject: Ending an application
How. I want to click on a button and exit my application. How can I do this?
thanks
Ralph Krausse
- RE: Ending an application Jim Schram
- RE: Ending an application Ralph Krausse
- RE: Ending an application Ralph Krausse
- Re: Ending an application Charles Rezsonya
- RE: Ending an application Miller, Gary
- RE: Ending an application Richard Hartman
- RE: Ending an application Richard Hartman
- Re: Ending an application Brian Mathis
- RE: Ending an application Ralph Krausse
- RE: Ending an application Richard Hartman
- Re: Ending an application Neil Brown
- Re: Ending an application Horace Ho
- Re: Ending an application Brian Mathis
