|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
acp693
Joined: 04 Sep 2006 Posts: 56
|
Posted: Mon May 11, 2009 4:00 pm Post subject: trouble with scrollbar handle |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue May 12, 2009 9:40 am Post subject: |
|
|
%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 |
|
|
acp693
Joined: 04 Sep 2006 Posts: 56
|
Posted: Tue May 12, 2009 10:01 am Post subject: |
|
|
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 |
|
|
|
|
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
|