Win32Lib bug?
- Posted by Larry Miller <larrymiller at sasktel.net> Jan 28, 2005
- 460 views
I am having a problem with Win32Lib v .60.6, although it might possibly be my code. In any case this is the situation: My application opens a modal dialog box with a listview control. The first time it opens and closes with no errors or warnings. But if the dialog is opened a second time I receive the following warning from Win32Lib: Error code 497 getHandle: Object is destroyed The Listview requires no images and none have been added with addIcon but it does use the LVS_EX_CHECKBOXES extended style. The problem only occurs when the dialog window is destroyed, not if it is simply closed. When I use setWarning(2) I get the following in the error file (partial). ... called from D:\euphoria\win32lib\include\win32lib.ew:7841 in function getHandle() id = 177 hWnd = <no value> ... called from D:\euphoria\win32lib\include\win32lib.ew:14270 in procedure setImageList() id = 178 IL = 177 size = 0 message = <no value> ... called from D:\euphoria\win32lib0\include\win32lib.ew:16975 in function createEx() pControl = 39''' pCaption = {} pOwner = 163 pLeft = 5 pTop = 5 pWidth = 230 pHeight = 180 styleFlags = 16389 exFlags = 0 id = 178 at = <no value> hotkey = <no value> bgControl = <no value> style = <no value> result = <no value> hWnd = 1508342 flags = 1417756741 extendedflags = 512 lParenthWnd = 852932 szClassName = 9150460 szCaption = 9261060 hMenu = 163 newhWnd = <no value> pstr = <no value> struct = <no value> ok = <no value> newobj = <no value> lvcol = { {{},18,0}, {{},192,0} } BBox = {5,5,230,180} sbPanels = <no value> lHintText = {} lIconInfo = <no value> autoclose = 0 lBGColor = {{}} lUserPre = {} lUserPost = <no value> lTemp = <no value> i = 2 It appears to me that the Image list is being destroyed when the Listview is destroyed. I know that I can avoid the warning with setWarning(0) but this doesn't deal with the underlying problem. Is this normal behaviour for Win32Lib or am I doing something wrong? Larry Miller