Sign in to follow this  
Followers 0
RealisT

Newer Pics Layered Below Older Ones

8 posts in this topic

Windows XP SP3

Script is creating some GUI Pic objects on my GUI form. Initial objects display correctly. Unfortunately, when the code creates some more GUI pics dynamically later on, they show up layered underneath the initial pics.

(In other languages, one can designate a 'z-index' to manage things like this, But I understand that AutoIt manages it by 'newest one goes on top').

How can I cause these later pics to show up on the topmost display layer?

Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Take a look at _WinAPI_SetWindowPos(), I think it can change the z-order of controls too. Note you have to pass the handles to everything with that function. No ControlID.

:x

Edit: Maybe not. Quickie demo didn't work, and I don't have to time to play with it right now.

:P

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

_WinAPI_SetWindowPos did not work, at least with my attempt at using it for a control instead of a window.

What's really getting me: setting the new pics to extended style $WS_EX_TOPMOST doesn't work either. Crazy!

I don't believe I have ever had this problem before. How could I mess up a 'newest pic on top' method anyway?

Any other suggestions are welcome.

Thanks

Share this post


Link to post
Share on other sites

Additional info:

New labels appear on top, but the new pics appear underneath older pics. Very confusing.

Share this post


Link to post
Share on other sites

And sometimes, when the newest pic is created, it appears for an instant to be layered on top. But something seems to "force" it down below older pics.

I've tried to replace the older pics with labels. No change; the newer pics still are layered underneath!

What must I do?

Share this post


Link to post
Share on other sites

Surprisingly little response. Oh well.

Can't identify the cause of the problem, but there is a simple enough workaround. GUICtrlSetPos() moves the pic to the top as long as at least one value is changed from the original. Still seems kludgy to me, but it will have to do for now.

Can someone at least answer how a GUI-oriented language such as AutoIt can be so weak at control layering functionality? Don't people take pride in their work anymore?

Share this post


Link to post
Share on other sites

I don't have time to write something for you but I am convinced that PsaltyDS is correct. Winapi_setwindowpos should work. Please post a code snippet...hard to help without.

Share this post


Link to post
Share on other sites

Another MVP verified for me that _WinAPI_SetWindowPos() has the same limitation as GuiCtrlSetPos(), it requires a change in at least one value to have effect.

Don't people take pride in their work anymore?

You are welcome to go find somewhere else where they do so to your satisfaction...

:x


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0