Silverfrost Forums

Welcome to our forums

%hw

8 Oct 2005 7:59 #400

*** Sent via Email ***

I'm having trouble with some Windows code under Salford.

The background to the code is that a programmer colleague wrote an image processing program a few years back, and I cut this down to a 'shell' a couple of years back. I don't have any real experience with Salford windows-gui based programming, so I was flying blind.

It compiled at the time, and ran successfully, including creating child windows and closing them by clicking on the top right cross.

I need to develop some windows-gui based code for graphing sonar data, and so I decided to cut-and-paste into the shell.

However, I now can't get it to run, in the sense that it creates child windows and allows me to resize them, but hangs when I attempt to close them by clicking on the top right cross.

I've run it through with SDBG and the trouble seems to be do with %hw - returning the handle of the child window:

     irs = Winio@ ( '%hw&', nCHand(NumChild) )

at around line 333; when the program comes to use the value, it says the handle is undefined.

I've also tried this by returning a scalar, and then transferring the value to nCHand(NumChild), but to no avail.

There are two aspects to the e-mail:

  1. can you or someone at Silverfrost tell me what I 'm doing wrong

OR

  1. can you or someone at Salford or Silverfrost provide me with a simple example which creates child windows - I couldn't find one on the examples that Salford provides, though I would have sworn that I saw one some time back.

Administrator Silverfrost Forums


-- Admin Silverfrost Limited
9 Oct 2005 11:18 #401

Assuming that NumChild is in the index range of nCHand, there is nothing wrong with the given line of code.

For a 'simple' example program see http://forums.silverfrost.com/forums/forum.asp?forumid=3&page=8&select=658#xx658xx

Please login to reply.