Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Removing my dialogbased app from the ALT-TAB window

0 views
Skip to first unread message

shadow

unread,
Jun 25, 1998, 3:00:00 AM6/25/98
to

Well... As the title goes!
btw: I don't want to disable ALT-TAB merely remove my app.

Girish Bharadwaj [MVP]

unread,
Jun 26, 1998, 3:00:00 AM6/26/98
to

I think there is some code for this on the archives for this newsgroup to make a
hidden window owner of the dialog. That should avoid your app listed in the
ALT-TAB window. Search www.dejanews.com for David Lowndes as the author and
hidden window as search text. You might find it.

--
Girish Bharadwaj [VC++/MVP]
Please don't send email queries.Post them here.
MS Knowledge base articles : http://support.microsoft.com/support


shadow wrote in message <6mu78i$crk$1...@news.uni-c.dk>...

David Lowndes

unread,
Jun 26, 1998, 3:00:00 AM6/26/98
to

>I think there is some code for this on the archives for this newsgroup to make a
>hidden window owner of the dialog. That should avoid your app listed in the
>ALT-TAB window. Search www.dejanews.com for David Lowndes as the author and
>hidden window as search text. You might find it.

Hi Girish,

That technique works for hiding the application from the taskbar, but
it will still appear in the Alt+Tab window.

If shadow wants to remove the Alt+Tab facility, how will anyone
activate his application?

I've never played with this, but I'd assume that Windows only shows
top level windows in the Alt+Tab list, so maybe a child window with a
parent of a hidden top level window would be one solution, but whether
you can do it as a dialog I don't know.

Dave
----
Address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow up email copies.

Willliam DePalo

unread,
Jun 27, 1998, 3:00:00 AM6/27/98
to

David Lowndes wrote in message >

>I've never played with this, but I'd assume that Windows only shows
>top level windows in the Alt+Tab list, so maybe a child window with a
>parent of a hidden top level window would be one solution, but whether
>you can do it as a dialog I don't know.
>

I have a modeless dialog which is accessible via an icon in the tray and a
hotkey. I keep it out of the ALT+Tab list with

dwExStyle = GetWindowLong(hModeless, GWL_EXSTYLE);

SetWindowLong(hModeless, GWL_EXSTYLE, WS_EX_TOOLWINDOW | dwExStyle);

Regards,
Will


David Lowndes

unread,
Jun 28, 1998, 3:00:00 AM6/28/98
to

>I have a modeless dialog which is accessible via an icon in the tray and a
>hotkey. I keep it out of the ALT+Tab list with
>
>dwExStyle = GetWindowLong(hModeless, GWL_EXSTYLE);
>
>SetWindowLong(hModeless, GWL_EXSTYLE, WS_EX_TOOLWINDOW | dwExStyle);

That sounds nice & simple Will. Does it affect the dialog's caption
bar by making it a small one?

Willliam DePalo

unread,
Jun 28, 1998, 3:00:00 AM6/28/98
to

David Lowndes wrote in message <35958098...@207.68.144.15>...

>>I have a modeless dialog which is accessible via an icon in the tray and a
>>hotkey. I keep it out of the ALT+Tab list with
>>
>>dwExStyle = GetWindowLong(hModeless, GWL_EXSTYLE);
>>
>>SetWindowLong(hModeless, GWL_EXSTYLE, WS_EX_TOOLWINDOW | dwExStyle);
>
>That sounds nice & simple Will. Does it affect the dialog's caption
>bar by making it a small one?
>

Hi Dave,

Oops! Not for me. I guess it would in the general case.

I should have pointed out that the dialog in question has a caption which I
paint myself in order that it be truly half-height.

Will

David Lowndes

unread,
Jun 29, 1998, 3:00:00 AM6/29/98
to

>I have a modeless dialog which is accessible via an icon in the tray and a
>hotkey. I keep it out of the ALT+Tab list with
>
>dwExStyle = GetWindowLong(hModeless, GWL_EXSTYLE);
>
>SetWindowLong(hModeless, GWL_EXSTYLE, WS_EX_TOOLWINDOW | dwExStyle);

For an MFC based dialog application, you can get the desired result by
setting the dialog as a tool window style, and removing the
WS_EX_APPWINDOW style programmatically in OnInitDialog:

ModifyStyleEx( WS_EX_APPWINDOW, 0 );

If you don't set the tool window style in the dialog editor, but
instead set it programmatically, the dialog displays with a
transparent portion of the caption (the gap between a small & normal
caption).

The resultant dialog isn't in the Alt+Tab list, and doesn't have a
taskbar button - both exclusions make it pretty hard to re-activate!

0 new messages