From: Nick Friend on
I want to float a modeless window permanently on the shell window of
our application, but by default it should be in the background with
all other windows being opened lying over it.

Any ideas how to achieve this?... I'm guessing it will be by
manipulating the z order, but I'm not sure how to achieve this.

TIA

Nick
From: Gerhard Bunzel on
Nick,

open your permanent window with the shell as owner and set the style
WS_EX_TOPMOST:

SELF:odlgMyWindow := dlgMyPermanentWindow{SELF}
SetWindowLong(SELF:odlgMyWindow:Handle(), GWL_EXSTYLE,
_or(GetWindowLong(SELF:odlgMyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))

Don't close this permanent window. With the close button you only hide this
window.
METHOD OnAbort () CLASS dlgMyPermanentWindow
SELF:IsInWork := FALSE
SELF:Hide()

And then you only have to show this window from the shell for the next time.
With WS_EX_TOPMOST it will be always on top.
You can also use a hotkey to call this method:

METHOD ShowMyPermanentWindow () CLASS winShell

IF SELF:odlgMyWindow:IsInWork
Send(SELF:odlgMyWindow, #OnAbort)
ELSE
SELF:odlgMyWindow:IsInWork := TRUE
SELF:odlgMyWindow:Show(SHOWNORMAL)
ENDIF

RETURN


Dont't forget to close this permanent window at the end of your app!


HTH

Gerhard



"Nick Friend" <nicktekhne(a)googlemail.com> schrieb im Newsbeitrag
news:7d920217-b2d1-4303-bc05-52ffef1351b3(a)u9g2000yqb.googlegroups.com...
>I want to float a modeless window permanently on the shell window of
> our application, but by default it should be in the background with
> all other windows being opened lying over it.
>
> Any ideas how to achieve this?... I'm guessing it will be by
> manipulating the z order, but I'm not sure how to achieve this.
>
> TIA
>
> Nick


From: Karl Faller on
Gerhard,
>but by default it should be in the background with
> all other windows being opened lying over it.
Nick needs the revers - "Backmost", but i don't think, that exists...
Karl


>Nick,
>
>open your permanent window with the shell as owner and set the style
>WS_EX_TOPMOST:
>
>SELF:odlgMyWindow := dlgMyPermanentWindow{SELF}
>SetWindowLong(SELF:odlgMyWindow:Handle(), GWL_EXSTYLE,
>_or(GetWindowLong(SELF:odlgMyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))
>
>Don't close this permanent window. With the close button you only hide this
>window.
>METHOD OnAbort () CLASS dlgMyPermanentWindow
> SELF:IsInWork := FALSE
> SELF:Hide()
>
>And then you only have to show this window from the shell for the next time.
>With WS_EX_TOPMOST it will be always on top.
>You can also use a hotkey to call this method:
>
>METHOD ShowMyPermanentWindow () CLASS winShell
>
> IF SELF:odlgMyWindow:IsInWork
> Send(SELF:odlgMyWindow, #OnAbort)
> ELSE
> SELF:odlgMyWindow:IsInWork := TRUE
> SELF:odlgMyWindow:Show(SHOWNORMAL)
> ENDIF
>
> RETURN
>
>
>Dont't forget to close this permanent window at the end of your app!
>
>
>HTH
>
>Gerhard
>
>
>
>"Nick Friend" <nicktekhne(a)googlemail.com> schrieb im Newsbeitrag
>news:7d920217-b2d1-4303-bc05-52ffef1351b3(a)u9g2000yqb.googlegroups.com...
>>I want to float a modeless window permanently on the shell window of
>> our application, but by default it should be in the background with
>> all other windows being opened lying over it.
>>
>> Any ideas how to achieve this?... I'm guessing it will be by
>> manipulating the z order, but I'm not sure how to achieve this.
>>
>> TIA
>>
>> Nick
>
From: Nick Friend on
That's right.. but...

I think I was working too late last night. I'd created the window as a
dialog, so obviously it always comes up on top. Changing to a
datawindow and tweaking the styles gives the desired result.

Thanks

Nick


On 18 Mar, 08:11, Karl Faller <k.faller_withoutth...(a)onlinehome.de>
wrote:
> Gerhard,>but by default it should be in the background with
> > all other windows being opened lying over it.
>
> Nick needs the revers - "Backmost", but i don't think, that exists...
> Karl
>
>
>
> >Nick,
>
> >open your permanent window with the shell as owner and set the style
> >WS_EX_TOPMOST:
>
> >SELF:odlgMyWindow := dlgMyPermanentWindow{SELF}
> >SetWindowLong(SELF:odlgMyWindow:Handle(), GWL_EXSTYLE,
> >_or(GetWindowLong(SELF:odlgMyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))
>
> >Don't close this permanent window. With the close button you only hide this
> >window.
> >METHOD OnAbort () CLASS dlgMyPermanentWindow
> >  SELF:IsInWork := FALSE
> >  SELF:Hide()
>
> >And then you only have to show this window from the shell for the next time.
> >With WS_EX_TOPMOST it will be always on top.
> >You can also use a hotkey to call this method:
>
> >METHOD ShowMyPermanentWindow () CLASS winShell
>
> > IF SELF:odlgMyWindow:IsInWork
> >  Send(SELF:odlgMyWindow, #OnAbort)
> > ELSE
> >  SELF:odlgMyWindow:IsInWork := TRUE
> >  SELF:odlgMyWindow:Show(SHOWNORMAL)
> > ENDIF
>
> > RETURN
>
> >Dont't forget to close this permanent window at the end of your app!
>
> >HTH
>
> >Gerhard
>
> >"Nick Friend" <nicktek...(a)googlemail.com> schrieb im Newsbeitrag
> >news:7d920217-b2d1-4303-bc05-52ffef1351b3(a)u9g2000yqb.googlegroups.com...
> >>I want to float a modeless window permanently on the shell window of
> >> our application, but by default it should be in the background with
> >> all other windows being opened lying over it.
>
> >> Any ideas how to achieve this?... I'm guessing it will be by
> >> manipulating the z order, but I'm not sure how to achieve this.
>
> >> TIA
>
> >> Nick- Hide quoted text -
>
> - Show quoted text -