Thanks to everyone who helped with this. We now have a fix.
Most responses suggested that at least part of the blame could be attributed
to dodgy video cards/drivers. There were reports of this behaviour in VB
apps, and also of problems on one machine but not another machine (using the
same exe). However in our case we were seeing problems on all machines, with
a very wide range of video gear (from very old 1MB video cards up to 16MB
Vodoo cards), and even when running in Windows Safe mode with
safe-and-clunky VGA, etc.
Our solution came from a tip-off from Trey Pattillo. Don't reparent the MI
mapper to a Picture control. We are now reparenting the mapper to the entire
Powerbuilder window.
>From the variety of responses and what we have seen in our experimenting, I
suspect that the cause is actually quite complex, and we still don't really
understand it. It looks as if, between Powerbuilder, the MS OLE reparenting
mechanism, MI, and maybe the video system, things were getting confused over
who should be redrawing the picture window and when. Like when you have
squabbling children, we took one of the antagonists away, and the problem is
fixed. I wouldn't be at all surprised if Powerbuilder was largely to blame
by not interfacing with the video system properly.
Cheers
Mark O.
----------
From: Ogilvie, Mark [SMTP:[EMAIL PROTECTED]]
Sent: Monday, 3 May 1999 12:43
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: MI integration problem: reparented window not refreshing
We have a problem (described below) with our "integrated mapping"
application that we are very keen to solve. We have also found the
problem
in the sample Powerbuilder application that ships with MapBasic. I'm
not yet
sure that it is a PowerBuilder-specific problem.
The problem:
We are using the standard technique for embedding MapInfo map
windows in a
Powerbuilder application: PowerBuilder starts an instance of MapInfo
as an
OLE object, and then reparents the MapInfo map window into a
Powerbuilder
picture control. In general this works fine, except for the
following.
If another window (of any sort, whether another window in the
Powerbuilder
application, MapInfo, or an "external" application) covers the
picture and
then uncovers it (e.g. is closed or dragged away), the picture
frequently
won't refresh. It's variable as to what exactly happens. Sometimes
it's all
OK, sometimes the picture goes completely blank (either grey or
white),
sometimes blank except for the area where the other window was,
sometimes
just the "other window" space is blanked out. It's easy to force the
picture
to redraw: just click on it.
We also get the problem happening in the Powerbuilder integration
demo that
ships with MapBasic. To duplicate: open the sample app in PB, and
run it. Go
to the Help menu and select About. Drag the "About" box around over
the map
for a while. You may need to close the box (using the "OK" button).
Sooner
or later (usually sooner) you should see the map fail to redraw
properly in
one of the described ways.
Has anyone else ever seen this behaviour in an integrated
application (any
platform) before? If so, does anyone know how to fix it? We are
using
Powerbuilder, but I'm not yet sure that the problem is Powerbuilder
specific: it could also happen in, say, VB. We intend to test that
next.
Cheers
Mark Ogilvie
Compudigm International (for NZ Ministry of Fisheries)
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and
put
"unsubscribe MAPINFO-L" in the message body, or contact
[EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]