124 lines
2.8 KiB
C++
124 lines
2.8 KiB
C++
/*=========================================================================
|
|
*
|
|
* CPAdTip.h : class CPA_DialogTip
|
|
*
|
|
*
|
|
* Version 1.0
|
|
* Creation date
|
|
* Revision date
|
|
*
|
|
* Shaitan
|
|
*=======================================================================*/
|
|
#ifdef ACTIVE_EDITOR
|
|
|
|
|
|
#ifndef __DIALOGTIP_H__
|
|
#define __DIALOGTIP_H__
|
|
|
|
/****************************************/
|
|
#ifndef CPA_EXPORT
|
|
#if defined(CPA_WANTS_IMPORT)
|
|
#define CPA_EXPORT __declspec(dllimport)
|
|
#elif defined(CPA_WANTS_EXPORT)
|
|
#define CPA_EXPORT __declspec(dllexport)
|
|
#else
|
|
#define CPA_EXPORT
|
|
#endif
|
|
#endif
|
|
/****************************************/
|
|
|
|
#include <afxtempl.h>
|
|
|
|
#include "CPARes.h"
|
|
#include "CPAMCapt.hpp"
|
|
|
|
class CPA_Interface;
|
|
class CPA_EditorBase;
|
|
|
|
/*///////////////////////////////////////////////////////////////////////////*/
|
|
/* CPA_ColorEdit control*/
|
|
class CPA_EXPORT CPA_ColorEdit : public CEdit
|
|
{
|
|
protected:
|
|
COLORREF m_crTextColor;
|
|
COLORREF m_crBackColor;
|
|
CBrush m_brBrush;
|
|
|
|
public:
|
|
CPA_ColorEdit();
|
|
|
|
void fn_vSetColors (COLORREF crText, COLORREF crBack);
|
|
|
|
protected:
|
|
/*{{AFX_MSG(CPA_ColorEdit)*/
|
|
afx_msg HBRUSH CtlColor (CDC* pDC, UINT nCtlColor);
|
|
afx_msg void OnLButtonDown (UINT nFlags, CPoint point);
|
|
/*}}AFX_MSG*/
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
/*///////////////////////////////////////////////////////////////////////////*/
|
|
/* CPA_DialogTip dialog*/
|
|
|
|
class CPA_EXPORT CPA_DialogTip : public CDialog, public CPA_MouseCapturer
|
|
{
|
|
protected:
|
|
CString m_csFileName;
|
|
CString m_csEditor;
|
|
CString m_csTag;
|
|
CString m_csText;
|
|
long m_lCurrentTip;
|
|
|
|
CList<CStatic *, CStatic *> m_stListOfBitmaps;
|
|
HBITMAP m_hTitle;
|
|
|
|
|
|
public:
|
|
/*any class deriving from CPA_MouseCapturer one must declare this method as is*/
|
|
CWnd *m_p_oGrabCapture() { return m_p_oGrabCaptureFor(this); }
|
|
|
|
/* standard constructor*/
|
|
CPA_DialogTip(CWnd* pParent = NULL);
|
|
|
|
/* dialog*/
|
|
void fn_vDoDialog (CString csEditor, CString csTag, CString csFile, long lCurrentTip);
|
|
void fn_vGetNextTip (void);
|
|
|
|
HBITMAP m_hLoadImage(CString _csName, int _cx, int _cy);
|
|
|
|
/* Dialog Data*/
|
|
/*{{AFX_DATA(CPA_DialogTip)*/
|
|
enum { IDD = CPA_IDD_DIALOGTIP };
|
|
CPA_ColorEdit m_cTipText;
|
|
CStatic m_cTitle;
|
|
CStatic m_cEditor;
|
|
CButton m_cNextTip;
|
|
CButton m_cFirstOnly;
|
|
/*}}AFX_DATA*/
|
|
|
|
|
|
/* Overrides*/
|
|
/* ClassWizard generated virtual function overrides*/
|
|
/*{{AFX_VIRTUAL(CPA_DialogTip)*/
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); /* DDX/DDV support*/
|
|
/*}}AFX_VIRTUAL*/
|
|
|
|
/* Implementation*/
|
|
protected:
|
|
|
|
/* Generated message map functions*/
|
|
/*{{AFX_MSG(CPA_DialogTip)*/
|
|
virtual void OnNextTip();
|
|
virtual void OnCloseTip();
|
|
virtual void OnCancel();
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnDestroy();
|
|
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
|
/*}}AFX_MSG*/
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
#endif /*__DIALOGTIP_H__*/
|
|
#endif /* ACTIVE_EDITOR*/
|