[WIN] Bug in win32libv0_53???

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

Hi There,

I seem to have a bug in win32libv0_53 with multi-windows.

I have an app with two windows, when either window looses focus, and either
window gains focus again it crashes with a
"This program has caused an illegal opperation and will be closed down.."

I wrote a cut down version to try to locate the error and it seems to appear
if the second window has a control on it (say a pushbutton), if the sub
window doesn't have any controls then the bug doesn't appear to occur.

See attached demo program:
Note: by commenting the two lines that create a control on the second
window removes the bug.
------------------------------
--
-- Test win32libv0_53 bug with multi forms
-- Ray Smith 30/10/2000

with trace
with type_check
without warning

include win32lib.ew

-- main window
constant
frmMain = create(Window, "Test Windows", 0, Default,Default,580,400,
                    or_all({WS_DLGFRAME, WS_SYSMENU, WS_MINIMIZEBOX})),

butShowSub = create(PushButton, "&Sub Window", frmMain, 440, 180, 100, 25,
0)

-- sub window
constant
frmSubWindow = create(Window, "Sub Window", 0, Default,Default, 450,350,
                    or_all({WS_DLGFRAME, WS_SYSMENU}))

-- comment following two lines and bug disappears
constant
butDummy = create(PushButton, "&Dummy", frmSubWindow, 140, 80, 100, 25, 0)


procedure click_sub_window()
-- open sub window
   openWindow(frmSubWindow, Modal)
end procedure
onClick[butShowSub]    = routine_id("click_sub_window")


-- start win32lib
WinMain( frmMain, Normal )

-------------------------------

Run the program,
click the "sub window" button,
now click on the first window again, and the error occurs.

Remove the pushbutton from the second window and the error doesn't occur.


Win32Lib is looking really good,
I haven't played with it for about a year, and it has improved greatly.

I am using the toolbars, status bar, rich edit, and blit functions.\,
fantastic!.

Regards,

Ray Smith

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

Search



Quick Links

User menu

Not signed in.

Misc Menu