LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Feb 21, 2008 12:07 am Post subject: Chance discoveries (%ib) and (volatile) |
|
|
When using %ib, a status_control value outside the 1 to 4 inclusive covered in FTN95.chm creates a blank area, but it remains sensitive to clicks. I can't imagine what use that is. Surely insensitivity to mouse clicks would be a desirable characteristic to associate with some value of status_control - perhaps 0 or 5 - thus providing an alternative "grey-out" method.
I recently discovered "volatile" as a characteristic for %ww, and how useful it is. In particular, I have a window that has drop_shadow. Clearwin's drop shadow is unsophisticated, but even worse, it is lost when the window loses focus. Making the window "volatile", so it disappears along with the drop shadow is an appealing combo. However, a side effect I hadn't realised is that if a volatile window spawns another window, then by definition, focus is lost to the new window. Am I right in assuming that the parent disappears taking the return path with it (because it is volatile)? This certainly seems to prevent the subsidiary window from opening, and to lock the overall parent application.
It seems to me that the correct approach in this case is not to use a callback (in the volatile window), but instead to rely on the return code from winio@. This actually works, and the subsidiary window opens after its volatile parent has disappeared. I'm never sure which is the preferred stratagem (callback or return code): callbacks have other advantages, like keeping the window open, and also allowing one to re-arrange the order of the controls without rethinking their sequence numbers.
Having also set the offending window to be a "toolwindow", and thus not to show in the Windows status bar, it was difficult to track the problem, as my application showed up as a "process" rather than an "Application" in Windows Task Manager - and sometimes not at all.
I hope this saves somebody some detective work.
Regards
Eddie |
|