// CJCaptionPopupWnd.h : header file
//
// This file is part of the CJLibrary for Visual C++ / MFC
// Copyright C 1998-1999 COdejock Software, All Rights Reserved.

// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 1, or (at your option)
// any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
/////////////////////////////////////////////////////////////////////////////
/****************************************************************************
 *
 * $Date: 2005/08/09 00:22:44 $
 * $Revision: 1.2 $
 * $Archive: /CodeJock/Include/CJCaptionPopupWnd.h $
 *
 * $History: CJCaptionPopupWnd.h $
 * 
 * *****************  Version 5  *****************
 * User: Kirk Stowell Date: 10/31/99   Time: 11:44p
 * Updated in $/CodeJock/Include
 * Modified resource include for static builds.
 * 
 * Fixed potential resource and memory leak problems.
 * 
 * *****************  Version 4  *****************
 * User: Kirk Stowell Date: 8/31/99    Time: 1:11a
 * Updated in $/CodeJockey/Include
 * Updated copyright and contact information.
 * 
 * *****************  Version 3  *****************
 * User: Kirk Stowell Date: 7/25/99    Time: 12:42a
 * Updated in $/CodeJockey/Include
 * 
 * *****************  Version 2  *****************
 * User: Kirk Stowell Date: 6/23/99    Time: 12:33a
 * Updated in $/CodeJockey/Include
 * 
 * *****************  Version 1  *****************
 * User: Kirk Stowell Date: 7/14/99    Time: 9:46p
 * Created in $/CodeJockey/Include
 * Initial creation. Added popup class as a helper class for the
 * CCJCaption class. This class is used to display a popup window which
 * contains a child CWnd derived object.
 * 
 ***************************************************************************/
/////////////////////////////////////////////////////////////////////////////

#ifndef __CJCAPTIONPOPUPWND_H__
#define __CJCAPTIONPOPUPWND_H__

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CCJCaptionPopupWnd window

#include "CJCaption.h"
#include "CJFlatButton.h"

// caption popup window messages
#define CM_ONPUSHPINBUTTON   WM_USER + 1001        // push pin clicked.
#define CM_ONPUSHPINCANCEL   WM_USER + 1002        // push pin clicked.

// CCJCaptionPopupWnd is a CWnd derived class which is used by
// the CCJCaption class to display a popup child window simular to Outlook
class _CJX_EXT_CLASS CCJCaptionPopupWnd : public CWnd
{
// Construction
public:
	CCJCaptionPopupWnd();

// Attributes
public:
	CWnd*			m_pParentWnd;
	CWnd*			m_pChildWnd;
	CWnd*			m_pChildParent;
protected:
	CCJCaption		m_Caption;
	CCJFlatButton	m_CaptionButton;
	HICON			m_hIconOn;		// handle to normal button icon.
	HICON			m_hIconOff;		// handle to pressed button icon.

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCJCaptionPopupWnd)
	public:
	virtual BOOL Create(const CRect& rect, CWnd* pParentWnd, CWnd* pChildWnd);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CCJCaptionPopupWnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CCJCaptionPopupWnd)
	afx_msg void OnDestroy();
	afx_msg void OnCaptButton();
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(__CJCAPTIONPOPUPWND_H__)
