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 

Property sheet crash
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1880
Location: Sydney

PostPosted: Wed Feb 07, 2018 12:33 am    Post subject: Re: Reply with quote

PaulLaidler wrote:
At the very least I recommend that you change all the callback return values from 1 to 2

Dan,

I think this may be very useful advice, as a call back response of 1 can do a lot of unnecessary screen updates. I am in the process of implementing this change to respond to other devilry I have located. You may see my recent post of problems when using export_image@. It wasn't this routine as I did some changes to file open/close and I scared off the devilry (for the moment). I am now cleaning up the interrupt responses throughout the program.

John
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1708
Location: South Pole, Antarctica

PostPosted: Wed Feb 07, 2018 7:19 am    Post subject: Reply with quote

John, Thanks for reminding as I often do not care about this. After checking the code it looks like I have done that for all functions called by %PS couple years back when this issue with them =1 or =2 surfaced. And since this did not change anything of course I'm kind of semi-forgot about this. May still miss this somewhere in damn amount of used functions. Will try to enforce further cleaning searching around "end function" statements when I will have sleeping difficulty Smile
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Feb 07, 2018 10:53 am    Post subject: Reply with quote

One other thought...

If a "Settings" dialog is somehow causing instability because of multiple calls to callback functions then you could consider forming a more stable environment by creating the "Settings" dialog just once. You would hide this dialog instead of closing/destroying it and show it rather than recreate it. In this way the connection between this dialog and its variables in your code would be fixed and permanent. In theory it ought to make no difference but there is apparently something nasty going on because of the way in which your callbacks are interacting.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1708
Location: South Pole, Antarctica

PostPosted: Thu Feb 08, 2018 10:40 am    Post subject: Re: Reply with quote

PaulLaidler wrote:
One other thought...

If a "Settings" dialog is somehow causing instability because of multiple calls to callback functions then you could consider forming a more stable environment by creating the "Settings" dialog just once. You would hide this dialog instead of closing/destroying it and show it rather than recreate it. In this way the connection between this dialog and its variables in your code would be fixed and permanent. In theory it ought to make no difference but there is apparently something nasty going on because of the way in which your callbacks are interacting.


Paul, I use opening and closing property sheet to save settings after changing something. By the way, how to hide the entire window?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Feb 08, 2018 4:17 pm    Post subject: Reply with quote

The simple and direct way is to call the Windows API ShowWindow.

Code:
include <windows.ins>
integer ir
integer(7) hwnd
ir = ShowWindow(hwnd, SW_SHOW)
ir = ShowWindow(hwnd, SW_HIDE)
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1708
Location: South Pole, Antarctica

PostPosted: Thu Feb 08, 2018 8:48 pm    Post subject: Reply with quote

Cool, will play with this option too. Thanks, Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
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