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

SetForegroundWindow mystery flag ?

7 views
Skip to first unread message

The PocketTV Team

unread,
Dec 10, 2003, 11:56:56 PM12/10/03
to
Does anyone know what is the effect of this mystery flag or'ed to the window
handle ?

SetForegroundWindow ((HWND) (((DWORD)hWnd) | 0x01));

This line is generated automatically by eVC++ when creating a "Hello Word"
C++ project.

It is not documented in the MSDN library, under SetForegroundWindow...


Alex Feinman [MVP]

unread,
Dec 11, 2003, 12:17:24 AM12/11/03
to
I do not remember exactly, but it is either one of the following or both:
1) Restore the window if iit was minimized
2) Bring to foreground the last active popup that belongs to the window

"The PocketTV Team" <do-not-rep...@pockettv.com> wrote in message
news:%23znS0M6...@TK2MSFTNGP12.phx.gbl...

The PocketTV Team

unread,
Dec 11, 2003, 1:01:09 AM12/11/03
to

"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message
news:uh$zQY6vD...@TK2MSFTNGP09.phx.gbl...

> I do not remember exactly, but it is either one of the following or both:
> 1) Restore the window if iit was minimized
> 2) Bring to foreground the last active popup that belongs to the window

thanks.

may I suggest that it would be a good idea if it was documented by MSFT...

or at least, if undocumented in the official documentation, they should
include a comment that explains what this does,

i don't like black magic! :)


Alex Feinman [MVP]

unread,
Dec 11, 2003, 1:26:55 AM12/11/03
to
I'm totally with you on this one.

"The PocketTV Team" <do-not-rep...@pockettv.com> wrote in message

news:%23B1Jtw6...@TK2MSFTNGP12.phx.gbl...

The PocketTV Team

unread,
Dec 11, 2003, 2:57:00 AM12/11/03
to
so, since you are an MVP and therefore have some mysterious powers, maybe
you could log this in their "knowledge" database ?

thanks in advance...

"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message

news:u6z3G$6vDHA...@tk2msftngp13.phx.gbl...

Rob Elmer [MSFT]

unread,
Dec 11, 2003, 4:28:36 PM12/11/03
to
This is correct, it does 1 and 2. It's not documented because it may change
at some point, but it's indeed *curious* that eVC is generating code that
shows this trick :)

--
Rob Elmer
Mobile Devices Product Group
This posting is provided "AS IS" with no warranties, and confers no rights.


"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message
news:uh$zQY6vD...@TK2MSFTNGP09.phx.gbl...

0 new messages