Microsoft KB Archive/75952

= Function 38: Get Maximum Virtual Coordinates =

Article ID: 75952

Article Last Modified on 9/24/2003

-

APPLIES TO


 * Microsoft Mouse Driver 9.0 Standard Edition
 * Microsoft Mouse Driver 9.1 Standard Edition
 * Microsoft Mouse Driver 7.04 Standard Edition
 * Microsoft Mouse Driver 8.2 Standard Edition

-



This article was previously published under Q75952



SUMMARY
The code example below demonstrates the use of mouse function 38. For additional information, refer to the &quot;Microsoft Mouse Programmer's Reference Guide.&quot;



MORE INFORMATION
Mouse function 38 returns whether the mouse is enabled, and returns the virtual X and Y maximum coordinates.

Note: If the mouse driver version is earlier than version 7.05, function 38 returns the current set virtual X & Y maximum (in current mode). For driver versions 7.05 and later, function 38 returns the absolute virtual X & Y maximum (in current mode). Input         Output -         --

AX = 38       BX = Mouse disabled flag 0 if mouse is enabled !0 if mouse is disabled CX = Virtual X maximum (in current video mode) DX = Virtual Y maximum (in current video mode)

// This is an example of mouse function 38. // Function 38: Get Maximum Virtual Coordinates


 * 1) include 
 * 2) include 


 * 1) define v626 0x0626
 * 2) define v705 0x0705

unsigned int bxr,cxr,dxr, dvr;

char *mdf, *vmm;

void main( void ) {

/* check driver version */ _asm {   mov ax,36 int 33h mov dvr,bx  ;save results }

if ( dvr < v626) { printf(&quot;function 38 requires driver 6.26 or greater \n&quot;); exit(0); }

/* function 38 */ _asm {   mov ax,38 int 33h mov bxr,bx   ;save results mov cxr,cx mov dxr,dx }

printf(&quot;Function 38 Returned Values \n&quot;); printf(&quot;  Value in BX is %Xh \n&quot;,bxr); printf(&quot;  Value in CX is %Xh \n&quot;,cxr); printf(&quot;  Value in DX is %Xh \n\n&quot;,dxr);

if (!bxr) mdf= &quot;ENABLED&quot;; else mdf= &quot;DISABLED&quot;; printf(&quot;MOUSE DISABLED FLAG.\n&quot;); printf(&quot;  mouse driver %s\n\n&quot;,mdf);

printf(&quot;MOUSE MAXIMUMS\n&quot;); printf(&quot;  {Note: if driver version is prior 7.05 this returns \n&quot;); printf(&quot;   current set virtual X & Y max (in current mode) \n&quot;); printf(&quot;   for driver version 7.05 and higher this returns\n&quot;); printf(&quot;   Absolute virtual X & Y max (in current mode)} \n\n&quot;);

if (dvr < v705)  vmm= &quot;CURRENTLY SET&quot;; else vmm = &quot;ACTUAL&quot;; printf(&quot;  %s virtual X max :>>%d<< (for current mode)\n&quot;,vmm,cxr); printf(&quot;  %s virtual Y max :>>%d<< (for current mode)\n&quot;,vmm,dxr);

printf(&quot;\n\n&quot;); }

Additional query words: 8.00 8.10 8.20 9.00

Keywords: KB75952

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.