forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Forcing complete format window update

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Thu Jul 12, 2007 10:42 am    Post subject: Forcing complete format window update Reply with quote

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
View user's profile Send private message Visit poster's website
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Thu Jul 12, 2007 12:51 pm    Post subject: Complete update Reply with quote

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
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Jul 12, 2007 2:01 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Thu Jul 12, 2007 6:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Jul 13, 2007 7:24 am    Post subject: Reply with quote

>>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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group