View previous topic :: View next topic |
Author |
Message |
acw
Joined: 04 Nov 2005 Posts: 165 Location: Darkest Devon
|
Posted: Thu Jul 12, 2007 10:42 am Post subject: Forcing complete format window update |
|
|
Is there any way of forcing all the controls in a format window to update their values when not within a callback function - ie. the equivalent of returning 1 from a callback. I can always do WINDOW_UPDATE@ on the individual control variables but thought something like a WINDOW_UPDATE@ using the window handle might exist to force the updates.
Thanks,
Alan |
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Thu Jul 12, 2007 12:51 pm Post subject: Complete update |
|
|
Here's a suggestion - I haven't tried it
Regards
Ian
Use a %dl co execute a callback at the rate you wish to update. This callback would just return setting its value to 1.
If you don't want the update to occur, write a subroutine, such as set_update(i)
where the value of i is stored in a common block accessible to the %dl callback and is used as the return value, e.g.
integer update_callback
external update_callback
i=winio@('%dl',1d0,update_callback)
* either activate updates
call set_update(1)
* or deactivate
call set_update(2)
integer function update_callback()
common/update_mode/ireturn_val
* prevent a zero value from terminating the program
update_callback = max(1,ireturn_val)
end
subroutine set_update(i)
common/update_mode/ireturn_val
ireturn_val = i
end |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Jul 12, 2007 2:01 pm Post subject: |
|
|
There are two kinds of update. The Windows API UpdateWindow updates any areas that have been overlaid by other windows etc. In contrast the ClearWin+ routine window_update@ refreshes the display for a given variable change before calling UpdateWindow with the relevant hwnd.
If you want a global window_update@ for all variables that are displayed in some way then in theory call window_update@(CORE4(0)) should do the trick but it looks like this has got broken somewhere along the line. It should be easy enough to fix but it is broken at the moment. |
|
Back to top |
|
|
acw
Joined: 04 Nov 2005 Posts: 165 Location: Darkest Devon
|
Posted: Thu Jul 12, 2007 6:39 pm Post subject: |
|
|
Thanks for that. I've ended up just updating all the control variables this time round.
Paul, while fixing window_update@(CORE4(0)) would it be easy to allow the format window handle to be passed in to just update the controls for that window ? Not a big issue though. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Jul 13, 2007 7:24 am Post subject: |
|
|
>>would it be easy to allow the format window handle to be passed in to just update the controls for that window?
Not really. You would need a new routine. |
|
Back to top |
|
|
|