subClass.h


/*
	$RCSfile: subClass.h $
	$Revision: 1.3 $
	$Date: 1997/03/13 15:50:28 $
	$Author: doomer $
	Copyright (c) 1997 John Dumais.  All rights reserved.
*/

#if !defined(_SubClassIncluded_)
#define _SubClassIncluded_

/*
	Group information related to the state of the window our
	calling thread owns.
*/
struct SubClassInfo{
	HWND windowOfInterest;					// The application thread's window
	DWORD windowThread;						// The thread we are called from
	WNDPROC originalWndProc;				// The original message processor
	unsigned char windowIsSubclassed	:1;	// Are we intercepting window messsages?
};

#define SUCCESS 0
#define FAILURE 1
#define IT_SUCCEEDED(x) ((x) == SUCCESS)
#define IT_FAILED(x) ((x) != SUCCESS)
#define STYLE_BITS WS_BORDER | WS_CAPTION | WS_SIZEBOX | WS_SYSMENU | WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MINIMIZEBOX

BOOL WINAPI	DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved);
HWND findApplicationWindow(struct SubClassInfo *scInfo);
BOOL CALLBACK enumWindowsCallback(HWND aWnd, LPARAM windowThreadInfo);
LRESULT CALLBACK SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL SubclassAppWindow(struct SubClassInfo *sci, WNDPROC newProc);
BOOL CoverScreen(HWND aWindow);
BOOL UncoverScreen(HWND aWindow);

#endif

/*
	$Log: subClass.h $
	Revision 1.3  1997/03/13 15:50:28  doomer
	a fully function window subclassing DLL.
	Revision 1.2  1997/03/13 11:32:52  doomer
	added directives to prevent multiple inclusion.
	added originalWndProc field to SubClassInfo struct.
	added success and failure macro definitions.
	added function prototypes.
	Revision 1.1  1997/03/12 17:50:50  doomer
	Initial revision
*/