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 

trouble with scrollbar handle

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



Joined: 04 Sep 2006
Posts: 56

PostPosted: Mon May 11, 2009 4:00 pm    Post subject: trouble with scrollbar handle Reply with quote

Hello, I have the following code snippet, but on running I get a run time error: can't obtain window of non-existant control

and gives the line number to the line : i=winio@('%lc&', scrhnd)
which should get the handle of the scrollbar
Code:

  i=winio@('%ww[no_border]&')
  i=winio@('%mn[&File[&Open]]&',open_func)
  i=winio@('%mn[[E&xit]]&','EXIT')
  i=winio@('%hx&',hxi,20L,20L)
  i=winio@('%lc&', scrhnd)
  i=winio@('%pv%`fr&',400L,300L,ctrl3)


Any idea what is wrong?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue May 12, 2009 9:40 am    Post subject: Reply with quote

%hx attaches a scroll bar to the next control so ClearWin+ does not provide access to the handle of the scrollbar. There is also %hs (which is nolonger documented and not very useful). This gives you an independent scrollbar control, presumably with its own handle.

Your best way forward may be to get the handle of the control to which you are attaching the scrollbar via %hx and then use the API GetWindow to derive the handle to the scrollbar. You can use the new Spy tool in Plato or the equivalent tool in Visual Studio to work out the Z-order of the windows.
Back to top
View user's profile Send private message AIM Address
acp693



Joined: 04 Sep 2006
Posts: 56

PostPosted: Tue May 12, 2009 10:01 am    Post subject: Reply with quote

Thank you Paul, I will look into this. I was looking for some means to hide the scrollbar when it's not needed, and intended to use the windows api function showscrollbar in order to achieve this. However I found out that by setting the %hx parameters step, and max_val to the same value also hides the scrollbar .

regards

Albert
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
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