No Valid ID revisited

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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu