On 08-Jun-99 Alan Kennington wrote:
> When I put up a popup form (which now correctly saves behind itself), I
> would like to have an event come to the calling form when I return, so that
> I can update data on the screen. This must be a common problem.
winEnterEvent should work. Look for it in your main form's event handler and
it will tell you when your form becomes active again.
case winEnterEvent:
if (e->data.winEnter.enterWindow == (WinHandle) FrmGetFormPtr(MainForm)) {
}
Though you probably wouldn't even need the enterWindow test if you are
already in your form's event handler. As a side note, I was using
FrmGetFormId() at one time in response to a winEnterEvent within my event
loop. The problem is that if I did a FrmGetFormId() on a menu's window it
gets a 'bad form' error within POSE. So I stopped using that function and I
just use FrmGetFormPtr() instead to compare the enterWindow and exitWindow
data members.
In other words instead of:
if (FrmGetFormId(e.data.winEnter.enterWindow) == MainForm) {
}
I use:
if (e.data.winEnter.enterWindow == (WinHandle) FrmGetFormPtr(MainForm)) {
}
/* Chris Faherty <[EMAIL PROTECTED]>, finger for PGP */