Board index » delphi » Mouse-Problem in Protected Mode BP7

Mouse-Problem in Protected Mode BP7

Hello all;
we want to change the shape of the mouse-cursor in a BP program. For this
we submit Bitmaps to the mouse interrupt.

If we compile our software in Real mode, everything works fine.
If we compile the same software in Protected mode, the mouse shape is nonsense.

It occurs only with quite new mouse drivers (windows95/OS/2 V3).

Any ideas??
Wolfgang Heinrichs
heinr...@mzdmza.zdv.uni-mainz.de

 

Re:Mouse-Problem in Protected Mode BP7


On 24 Nov 1995 13:58:17 GMT,

Quote
vollj...@zdv.uni-mainz.de  <vollj...@zdv.uni-mainz.de> wrote:
>Hello all;
>we want to change the shape of the mouse-cursor in a BP program. For this
>we submit Bitmaps to the mouse interrupt.

>If we compile our software in Real mode, everything works fine.
>If we compile the same software in Protected mode, the mouse shape is nonsense.

>It occurs only with quite new mouse drivers (windows95/OS/2 V3).

Its quite likely whatever software maps the INT requests does not
know about that mouse driver option.  This means it doesnt know
to translate the protect mode address of your cursor into a real-mode
address that the mouse driver expects.  

Its often a guessing game when trying fancy INT calls.  Some of them
are mapped automatically by some layer, others are not.

You can get around this by allocating the mouse image with
GlobalDOSAlloc() to ensure its in low DOS memory, then
pass the real-mode address of the mouse pointer.

-----------------------------------------------------------------------
George R. Gonzalez                        g...@boombox.micro.umn.edu
Sr. Sys. Programmer                       University of Minnesota

6AF6 = 2 * 6E5?

Re:Mouse-Problem in Protected Mode BP7


Quote
In article <494j1p$...@kralle.zdv.Uni-Mainz.DE> vollj...@zdv.uni-mainz.de writes:
>Hello all;
>we want to change the shape of the mouse-cursor in a BP program. For this
>we submit Bitmaps to the mouse interrupt.
>If we compile our software in Real mode, everything works fine.
>If we compile the same software in Protected mode, the mouse shape is nonsense.

You must allocate the _low_ memory (within the first megabyte), because the
mouse interrupt cannot access it otherwise, and then copy the mouse shape
data to it. The allocation of low memory can be done using GlobalDOSAlloc
from WinAPI (I think) or (better) you can use one of those units for work
under DPMI (they can be found in SWAG and probably on Borland FTP server as
well).

Quote
>It occurs only with quite new mouse drivers (windows95/OS/2 V3).

The problem doesn't depend on the used _DOS_ mouse driver.

                                     Tomas Hajny, XHaj...@vse.cz on Internet

Other Threads