--- In [email protected], "brucexs" <bswit...@...> wrote:
>
> --- In [email protected], "p.renfrew" <p.renfrew@> wrote:
> >
> > --- In [email protected], "brucexs" <bswitzer@> wrote:
> > > > 
> > > > Can I easily create a script loop that only runs while my bar is 
> > > > running and restores if state is minimized?
> > > > 
> > > > 
> > > Maybe (not tested)
> > > event.create(500, 0, "if(win.minned(?=Myclist=)\rwin.show(?=myclist=,1)")
> > 
> > I have discovered that this can not work because PPro is a 
> > WS_EX_TOOLWINDOW. The method does work in a sample dialog app if it isn't a 
> > toolWindow (it then receives WM_WINDOWPOSCHANGED which can immediately 
> > restore the window).
> > 
> > Show Desktop (IShellDispatch4.ToggleDesktop()), will minimize all 
> > minimizable windows by forcing a "ShowWindow(SW_MINIMIZE)", but toolWindows 
> > do not move; the desktop is activated and placed in front of them.  That is 
> > why windows with (WS_EX_TOPMOST | WS_EX_TOOLWINDOW) will remain after a 
> > "Show Desktop", along with those that have the desktop as a parent.
> > 
> > But, I can't think of a ppro event and function that would allow me to 
> > bring ppro in front of the desktop if (and only if) the desktop comes in 
> > front of it.
> >
> 
> If you know PowerPro bar overlaps position x, y on desktop, then if 
> mainhandlefrompoint(x,y) is not the powerpro bar, can you move the bar back 
> on top with win.showna(no activate) or failing that do a setwindowpos with 
> dll.call as a test (I can throw setwindopos into win plugin if dll.call works 
> and you don't want to rely on distributing dll plugin).
>

My bar has transparency 255. mainhandlefrompoint() returns the desktop handle 
if that point within my bar is a transparent point. Can I dynamically figure 
out what points are not transparent in my bar after moving it around?  (I was 
just using win.left/top).

After reading the following thread I tried out Rainlander to see if its "stick 
on bottom" option worked on Win7.  It does, which gives the pinned to desktop 
effect.  It is accomplished with SetWindowPos and HWND_BOTTOM  (SWP_NOMOVE | 
SWP_NOSIZE | SWP_NOACTIVATE) (perhaps in every PAINT?  I didn't look through 
all of the code yet).

http://stackoverflow.com/questions/365094/window-on-desktop

It is not pinned when "Show Desktop" is called, so that is one more step of 
event processing I suppose.  



Reply via email to