Sending a gadget to the back

BlitzPlus Forums/BlitzPlus Programming/Sending a gadget to the back

Rottbott(Posted 2004) [#1]
Is there a way to make a gadget appear behind other gadgets, regardless of the order in which they were created?


soja(Posted 2004) [#2]
If it's a Blitz-created (and Blitz-controlled) gadget, I seriously doubt it. I wanted to do this myself, but it seems to me as if Blitz' internal gadget renderer redraws them in the opposite order as they were created. I even tried tricks like disabling/reenabling, hiding/showing gadgets in certain orders, etc, but it didn't work really well. (It might have worked a little bit, but I can't remember -- I just remember feeling diappointed.)

My suspicion is that the only real way to do this would be just to draw the gadgets yourself (via WinAPI), but then you're stuck with having to repaint them and such yourself, and since we don't have access to Blitz' message pump/queue, it would be a royal pain.

If anybody has found anything to the contrary, please, let us know.


Eikon(Posted 2004) [#3]
You could try the SetWindowPos API with the HWND_BOTTOM (1) flag, just a thought.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefSetWindowPos.asp


Rottbott(Posted 2004) [#4]
Thanks guys.

I've gone for deleting and recreating the gadget in this case.