w32lib error?

new topic     » topic index » view thread      » older message » newer message

I was getting a divide by zero error from Win32Lib.ew, so I modified it in routine createPixmap() to put in the code marked below by ===> (obviously, the "===>" is not in the code when I am running it, this is just to highlight it here) in an effort to debug it:

===>  atom result 
 
        -- get the dc of the screen 
        hdc = getDC( Screen ) 
 
        -- create a window sized bitmap compatible with the screen 
===>  result = message_box ( sprintf("pWidth = %d, pHeight = %d", { pWidth, pHeight }), "createPixmap", 0) 
   
        handle = w32Func( xCreateCompatibleBitmap, { hdc, pWidth, pHeight } ) 
        -- release the dc 
        releaseDC( Screen ) 
 
        if handle = NULL then 
            warnErr( Err_CREATEPIXMAP ) 
        end if 

This showed me that the value used for pWidth is 26833 and for pHeight is 3556. This is consistent with what my own code told me it was passing to setRect() which then calls setCtlSize() which in turn calls createPixmap(). The program then dies with a divide by zero error as shown in this bit of the DOS window from it dying:

c:\euphoria-40b2\win32lib\include\w32msgs.e:113 in procedure fShowError() attempt to divide by 0

... called from c:\euphoria-40b2\win32lib\include\Win32Lib.ew:12885 in procedure createPixmap()

... called from c:\euphoria-40b2\win32lib\include\Win32Lib.ew:19539 in procedure setCtlSize()

... called from c:\euphoria-40b2\win32lib\include\Win32Lib.ew:19611 in procedure setRect()

Line 12885 as referenced is the call to the warnErr() routine shown in the code snippet above.

This code works until I try to use it with these large values, but this was working for the last several days, even on this large virtual window. The call to Win32Lib.ew which failed here is no different than it has been for the last few days.

Any ideas what is wrong here? Could my Vista box just be in need of rebooting? It looks like this is in the Windows function code that the divide is happening.

Thanks for any suggestions.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu