Hi everybody, this is my original problem.
>
> I'd like to display a modal dialog until the user tabs anywhere on the
form
> (not only until the user tabs a button on the dialog) Please tell me how I
> can do it. Right now, I try to cheat by making the button the same size of
> the dialog, no frame and no label.When I click on the dialog, the system
> invests the button (black background and white text) before the dialog
> disappear. What is the right way to do it?
> Thank you very much.
From: Aaron Ardiri <[EMAIL PROTECTED]>
Subject: Re: Modal Dialog and penDownEvent?
set a form event handler for the dialog.. and then you can capture the
penDown event and do whatever you need to do..
FrmSetEventHandler() from memory - just do it before you call the
FrmDoDialog() function :)
This is how I do it and I still have problem :-(
What I did before was:
frmP = FrmInitForm(InfoForm);
// Load the info form, then display it.
FrmDoDialog(frmP);
// Delete the info form.
FrmDeleteForm(frmP);
Now, I set event handle for dialog:
frmP = FrmInitForm(InfoForm);
FrmSetEventHandler(frmP, InfoFormHandleEvent);
// Load the info form, then display it.
FrmDoDialog(frmP);
InfoFormHandleEvent(EventPtr eventP)
{
...
switch (eventP->eType) {
case penDownEvent:
FrmDeleteForm(FrmGetFormPtr(SongInfoForm));
handled = true;
break;
default:
break;
}
}
I get the error "read directly from an unallocated chunk of memory".
What did I do wrong?
I think that FrmInitForm() goes with FrmDeleteForm(). So I call it when
there is a penDownEvent. Is this right? Why do I get this error message?
many thanks for helping me.
tnn
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html