🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2085

Re: Windows, Exec, Subprogram

#2085
From: Paul Bonneau
Date: Sun, 14 Apr 1991 18:43
20 lines
1122 bytes
In article <1991Apr12.211658.28611@netcom.COM> ergo@netcom.COM (Isaac Rabinovitch) writes:
>
>Which reminds me of a problem that's been bothering me since I first
>started playing with windows:  when you WinExec() or LoadModule() a
>program, how to you find out the handle of the window you've just
>created?
>
You can do this with either:

	EnumWindows()

	for (hwnd = GetWindow(hwndNull, GW_HWNDFIRST);
	    IsWindow(hwnd);
	    hwnd = GetWindow(hwnd, GW_HWNDNEXT))

Either way, the idea is to compare the string returned from
GetClassName() with the name of the class of the main window
in the new program.

cheers - Paul Bonneau.
Technical Details
Message-ID: <1991Apr14.184311.26236@hyper.hyper.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
References: <1997375683@1991Apr10.170742.799@bellcore.be> <1266500005@cdp> <1991Apr12.211658.28611@netcom.COM>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: Windows, Exec, Subprogram
Message-ID: <1991Apr14.184311.26236@hyper.hyper.com>
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <1997375683@1991Apr10.170742.799@bellcore.be> <1266500005@cdp> <1991Apr12.211658.28611@netcom.COM>
Date: Sun, 14 Apr 1991 18:43:11 GMT