1 #if !defined(AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_)
2 #define AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_
6 #endif // _MSC_VER > 1000
7 // ACWnd.h : Header-Datei
10 /*********************************************************************
13 * Copyright (c) 200 by Andreas Kapust
14 * All rights reserved.
17 *********************************************************************/
19 #include <afxtempl.h> // CArray
20 #define ENAC_UPDATE WM_USER + 1200
21 /////////////////////////////////////////////////////////////////////////////
23 #define IDTimerInstall 10
24 class CACListWnd
: public CWnd
29 void Init(CWnd
*pWnd
);
30 bool EnsureVisible(int item
,bool m_bWait
);
31 bool SelectItem(int item
);
32 int FindString(int nStartAfter
, LPCTSTR lpszString
, bool m_bDisplayOnly
= false);
33 int FindStringExact( int nIndexStart
, LPCTSTR lpszFind
);
34 int SelectString(LPCTSTR lpszString
);
35 bool GetText(int item
, CString
& m_Text
);
36 void AddSearchString(LPCTSTR lpszString
){m_SearchList
.Add(lpszString
);}
37 void RemoveAll(){m_SearchList
.RemoveAll(); m_DisplayList
.RemoveAll();}
39 CString
GetNextString(int m_iChar
);
42 void SortSearchList(){SortList(m_SearchList
);}
51 CStringArray m_SearchList
;
53 // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen
54 //{{AFX_VIRTUAL(CACListWnd)
59 virtual ~CACListWnd();
60 void DrawItem(CDC
* pDC
,long m_lItem
,long width
);
62 // Generierte Nachrichtenzuordnungsfunktionen
64 //{{AFX_MSG(CACListWnd)
65 afx_msg
void OnPaint();
66 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
67 afx_msg BOOL
OnEraseBkgnd(CDC
* pDC
);
68 afx_msg
void OnNcPaint();
69 afx_msg
void OnKeyDown(UINT nChar
, UINT nRepCnt
, UINT nFlags
);
70 afx_msg
void OnNcCalcSize(BOOL bCalcValidRects
, NCCALCSIZE_PARAMS FAR
* lpncsp
);
71 afx_msg
void OnVScroll(UINT nSBCode
, UINT nPos
, CScrollBar
* pScrollBar
);
72 afx_msg
void OnActivateApp(BOOL bActive
, DWORD dwThreadID
);
73 afx_msg LRESULT
OnNcHitTest(CPoint point
);
74 afx_msg
void OnLButtonDown(UINT nFlags
, CPoint point
);
75 afx_msg
void OnRButtonDown(UINT nFlags
, CPoint point
);
76 afx_msg BOOL
OnSetCursor(CWnd
* pWnd
, UINT nHitTest
, UINT message
);
77 afx_msg
void OnShowWindow(BOOL bShow
, UINT nStatus
);
78 afx_msg
void OnNcLButtonDown(UINT nHitTest
, CPoint point
);
79 afx_msg
void OnMouseMove(UINT nFlags
, CPoint point
);
80 afx_msg
void OnTimer(UINT_PTR nIDEvent
);
81 afx_msg
void OnGetMinMaxInfo(MINMAXINFO FAR
* lpMMI
);
85 CStringArray m_DisplayList
;
86 CScrollBar m_VertBar
, m_HoriBar
;
87 CRect m_LastSize
, m_ParentRect
;
89 CFont fontDC
, boldFontDC
;
94 long m_lTopIndex
,m_lCount
,m_ItemHeight
,m_VisibleItems
,m_lSelItem
;
96 int HitTest(CPoint point
);
99 long ScrollBarWidth();
100 void InvalidateAndScroll();
101 void SortList(CStringArray
& m_List
);
102 static int CompareString(const void* p1
, const void* p2
);
105 /////////////////////////////////////////////////////////////////////////////
107 //{{AFX_INSERT_LOCATION}}
108 // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
110 #endif // AFX_ACWND_H__5CED9BF8_C1CB_4A74_B022_ABA25680CC42__INCLUDED_