Re: MI window redraw ..

1999-08-24 Thread Dmitry Bogdanov

Hello Scott!

Is there a mapbasic command (or some other way in MB) to force a map window to 
re-draw ?

For Map window, you can use Set Map Redraw On statement. If this is not sufficient (as 
it was
in my recent case with Integrated Mapping) - use InvalidateRect and UpdateWindow APIs:

Declare Function InvalidateRect Lib "user32" Alias "InvalidateRect" (ByVal hwnd, ByVal 
lpRect, ByVal bErase As Integer) As Integer
Declare Function UpdateWindow Lib "user32" Alias "UpdateWindow" (ByVal hwnd As 
Integer) As Integer

To obtain hwnd handle of the window you want to redraw - use 
WindowInfo(MapInfoWindowID, WIN_INFO_WND)

In call to InvalidateRect, supply 0 for both lpRect and bErase parameters.

Dmitry Bogdanov
GIS Department Manager
Kiev Software Factory Ltd.
room 46 9/12 Baumana St, Kiev, Ukraine 252190
Tel: (380 44) 442-6077; (380 44) 443-7925
Fax: (380 44) 443-7925
Internet: http://www.ksf.kiev.ua




--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI window redraw ..

1999-08-24 Thread Scott England

Thanks Dmitry,
I tried the "set map redraw" method and that did not seem to do the trick,
let me explain my problem ...

I'm creating a map using automation through a VB DLL I have created.  When I
output the map to a JPEG using the 'save window' command all the layers are
'mixed up'. By that I mean some parts of one layer are below another layer
but above it in other areas (wierd).
When I do the whole process manually from within MI the output is fine.  I
figured if I could re-draw the window within my code, then it would solve
the problem, but no joy so far
I would rather avoid using API calls if I can,

Scott..
- Original Message -
From: Dmitry Bogdanov [EMAIL PROTECTED]
To: "Scott England" [EMAIL PROTECTED]
Cc: MapInfo-L List [EMAIL PROTECTED]
Sent: Tuesday, August 24, 1999 3:38 PM
Subject: Re: MI window redraw ..


 Hello Scott!

 Is there a mapbasic command (or some other way in MB) to force a map
window to re-draw ?

 For Map window, you can use Set Map Redraw On statement. If this is not
sufficient (as it was
 in my recent case with Integrated Mapping) - use InvalidateRect and
UpdateWindow APIs:

 Declare Function InvalidateRect Lib "user32" Alias "InvalidateRect" (ByVal
hwnd, ByVal lpRect, ByVal bErase As Integer) As Integer
 Declare Function UpdateWindow Lib "user32" Alias "UpdateWindow" (ByVal
hwnd As Integer) As Integer

 To obtain hwnd handle of the window you want to redraw - use
WindowInfo(MapInfoWindowID, WIN_INFO_WND)

 In call to InvalidateRect, supply 0 for both lpRect and bErase parameters.

 Dmitry Bogdanov
 GIS Department Manager
 Kiev Software Factory Ltd.
 room 46 9/12 Baumana St, Kiev, Ukraine 252190
 Tel: (380 44) 442-6077; (380 44) 443-7925
 Fax: (380 44) 443-7925
 Internet: http://www.ksf.kiev.ua






--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI window redraw ..

1999-08-24 Thread SOLOMON ISLANDS POPULATION CENSUS




 


-Original Message-From: 
Scott England [EMAIL PROTECTED]To: 
[EMAIL PROTECTED] [EMAIL PROTECTED]Date: 25 
August 1999 01:08Subject: MI window redraw 
..
Is there a mapbasic command (or some other way in MB) to 
force a map window to re-draw ?

Cheers,
Scott..

Scott,

How about inserting the line:

Run Menu Command 610


Cheers 
Mick Saunders