Re: Finding HWND of the current thread

Jan Wassenberg <[email protected]>
Newsgroups gmane.games.devel.windows
Message-ID <opsbualmnfgzpdqz@localhost>
On Thu, 15 Jul 2004 14:19:49 -0400, Brian Hook <[email protected]> 
wrote:
>> GetConsoleWindow
> As a library, I won't know if it's a console window or not.
You can check the Subsystem field of the PE "optional" header (always 
present): if it's equal IMAGE_SUBSYSTEM_WINDOWS_CUI (3), you've got a 
console app.
void* base = (void*)0x400000 (or GetModuleHandle(0))
IMAGE_NT_HEADERS* h = ImageNtHeader(base)
h->OptionalHeader.Subsystem == 3?

Disclaimer: off the top of my head and ugly to boot ;)



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.