/*
	MSGLOOP.HPP - Die Windows-Nachrichtenschleife
	(C) 1990 by Joachim Kainz 'On a mission from Bhudda'
*/
	#if !defined (__MSGLOOP_HPP)
	#define __MSGLOOP_HPP

	#include "jfklib.hpp"

	class MSGLOOP {

	  private:
		HWND* phDlg;
		WORD  wDlg,
			  wMaxDlg;

		HWND  hWnd,
			  hMDIClient;

		BOOL IsMDILoop    () { return hMDIClient != NULL; }
		HWND GetMDIClient () { return hMDIClient;		  }

	  public:
		EXPORT MSGLOOP ();
		EXPORT ~MSGLOOP ();

		BOOL EXPORT AddDlg	  (HWND hDlg	   );
		BOOL EXPORT RemoveDlg (HWND hDlg = NULL);

		BOOL EXPORT SetMDIMode (HWND hWnd, HWND hMDIClient);
		void EXPORT ProcessMsg (LPMSG lpMsg				  );

		int  EXPORT Loop ();
		BOOL EXPORT Peek ();

	};
	#endif
