1. No Valid ID revisited
- Posted by Euman <euman at BELLSOUTH.NET> Dec 10, 2000
- 360 views
- Last edited Dec 11, 2000
Hello Win32Lib and Euphoria Guru's I use Win32Lib and the below procedure to make Controls Visible / inVisible in my program and I continue to recieve Code 499 getHandle:The stored hWnd is no longer attached to the ID. I recieve this error 1 out of 10 runs of my program and this only happens on startup. my program runs perfectly 9 out 10 times but, I'm shooting for 10 / 10 I coded my procedure (below) to write to file "badID.txt" the Control that DID NOT have a Valid ID Well, I ran my program several hundred times and each time I recieved Code 499 the Control ID that failed was different. *** Begin Test Procedure *** -- I create the Controls and a sequence of the Controls i.e: controls = {int_id0,int_id1,int_id2} -- This way I can change Control Sequences to either hide or show a set of Controls global constant show = 1, hide = 0 global sequence controls controls = {} global procedure Visible(integer SorH) integer len, fn, handle object VOID fn = open("badID.txt","w") len = length(controls) for x = 1 to len do print(fn,controls[x]) -- Print to File all ID's up to The Failed ID puts(fn, "\n") flush(fn) -- Dump each Loop handle = getHandle( controls[x] ) -- Fails on getHandle(inValid id) VOID = c_func( xShowWindow, { handle , SorH } ) end for close(fn) end procedure *** End *** Based on this procedure and the Control(ID) Failing being different each time Where should I go from here? Question I posted to myself: ? is Euphoria not assigning a Value in RAM or pointer to the control as they are created *I thought about name collision or similar names being a problem so I gave all of the controls very unique names.. ? is Win32Lib missing Controls and not creating an ID or are the Controls being Mangled. * I tested the problem out on Win32Lib versions .50 and .54.5 so as to elliminate the robust memory service Derek Parnell wrote for .54.5 Failing Controls are Different types of Controls i.e: Toolbar,TreeView,ListView,PushButtons etc. Hell, I dont know why... I would send anyone the code if they could just help me figure this out.. Thanks in Advance euman at bellsouth.net
2. Re: No Valid ID revisited
- Posted by Derek Parnell <derekp at SOLACE.COM.AU> Dec 11, 2000
- 363 views
Ok, I'll see what I can find out today. ----- cheers, Derek Parnell
3. Re: No Valid ID revisited
- Posted by John <jwr6dmr at CS.COM> Dec 12, 2000
- 364 views
This is WAY over my head, but I have seen this before (VC++) when I "tried " to make my on controls from the DLLs . I always get method and properties confused but it basically came down to init the new control.. not sure how .. but to make the data "persist" it has to be written and read back by windows... good luck..