89 lines
2.4 KiB
C++
89 lines
2.4 KiB
C++
#if !defined(AFX_MODELESSDIALOG_H__488F4D92_FD15_11D2_AB7D_0000E83E72AC__INCLUDED_)
|
|
#define AFX_MODELESSDIALOG_H__488F4D92_FD15_11D2_AB7D_0000E83E72AC__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// ModelessDialog.h : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CModelessDialog dialog
|
|
#include "adui.h"
|
|
#include "acui.h"
|
|
#include "captionbutton.h"
|
|
|
|
class TARCH_EXP CModelessDialog : public CAcUiDialog, public CCapBtnWnd
|
|
{
|
|
protected:
|
|
BOOL m_bThickFrame;
|
|
public:
|
|
BOOL m_bModeless;
|
|
UINT m_bChangeDocSwitch;//Use for Setfocus to AutoCAD.
|
|
CToolTipCtrl m_wndToolTip;
|
|
|
|
BOOL m_bAllowAutoHide;
|
|
BOOL m_bHide;
|
|
BOOL m_bAutoHide;
|
|
int m_nCapHeight;
|
|
int m_nBorderHeight;
|
|
int m_nMaxHeight;
|
|
int m_nYStep;
|
|
int m_nStepNum;//>0´ú±íÕýÔÚËõ·Å
|
|
int m_nCurStep;
|
|
CDC *m_pMemDC;
|
|
CWindowDC *m_pWndDC;
|
|
CBitmap *m_pBitmap;
|
|
COLORREF m_clrDraw;
|
|
// Construction
|
|
public:
|
|
DECLARE_DYNAMIC(ATSCModelessDialog)
|
|
CModelessDialog(UINT nIDTemplate,CWnd* pParent = NULL); // standard constructor
|
|
void WriteReg(int x,int y);
|
|
BOOL ReadReg(int &x,int &y);
|
|
|
|
INT_PTR DoModal() {
|
|
m_bModeless=FALSE;
|
|
return CAcUiDialog::DoModal();
|
|
}
|
|
|
|
bool IsShowNormal()const{return !m_bHide&&m_nStepNum==0;}
|
|
|
|
void MaxShow();
|
|
void AnimateMoveWindow(int step);
|
|
|
|
BOOL AddTip(UINT idControl);
|
|
BOOL AddTip(UINT idControl, const TCHAR *str);
|
|
|
|
void LockAutoHide();
|
|
void UnlockAutoHide();
|
|
|
|
protected:
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
virtual BOOL OnInitDialog();
|
|
DECLARE_MESSAGE_MAP()
|
|
afx_msg void OnDestroy();
|
|
afx_msg void OnClose();
|
|
afx_msg LONG_PTR onAcadKeepFocus ( UINT_PTR, LONG_PTR );
|
|
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
|
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
|
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
|
afx_msg void OnNcLButtonDown(UINT nHitTest,CPoint point);
|
|
|
|
virtual BOOL OnCommand(WPARAM wParam,LPARAM lParam);
|
|
int MessageBox(LPCTSTR lpszText,LPCTSTR lpszCaption=NULL,UINT nType=0);
|
|
};
|
|
class TARCH_EXP XPushAutoHide
|
|
{
|
|
public:
|
|
BOOL m_bAutoHide;
|
|
CModelessDialog *m_pDialog;
|
|
public:
|
|
XPushAutoHide(CModelessDialog*pDlg);
|
|
~XPushAutoHide();
|
|
};
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_MODELESSDIALOG_H__488F4D92_FD15_11D2_AB7D_0000E83E72AC__INCLUDED_)
|