CB32 1.2 sources
This commit is contained in:
parent
cf25bc7627
commit
fd87f89a19
100 changed files with 14543 additions and 0 deletions
166
CB32View.h
Normal file
166
CB32View.h
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
// CB32View.h : interface of the CCB32View class
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(AFX_CB32VIEW_H__20BFD1EF_4F52_11D1_AF86_000000000000__INCLUDED_)
|
||||
#define AFX_CB32VIEW_H__20BFD1EF_4F52_11D1_AF86_000000000000__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#define COLS 32 // number of columns + 1
|
||||
|
||||
class CFindDlg; // forward declarations
|
||||
|
||||
#include "history.h"
|
||||
#include "PropInfo.h"
|
||||
#include "MyHeaderCtrl.h"
|
||||
|
||||
class CCB32View : public CListView
|
||||
{
|
||||
protected: // create from serialization only
|
||||
CCB32View();
|
||||
DECLARE_DYNCREATE(CCB32View)
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
CCB32Doc* GetDocument();
|
||||
CFindDlg* m_pFindDialog; // find dialog
|
||||
CHistoryList m_searchHistory; // last used search history list
|
||||
CMyHeaderCtrl m_headerctrl;
|
||||
CStringArray arLabel;
|
||||
|
||||
protected:
|
||||
int m_iFirst;
|
||||
int nSortedCol;
|
||||
BOOL bSortAscending;
|
||||
|
||||
int m_nCharWidth;
|
||||
int m_nRowHeight;
|
||||
int m_nRowsPerPage;
|
||||
int m_nHighlight;
|
||||
CFont m_PrinterFont;
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void MakeDatabase();
|
||||
void AddDatabase();
|
||||
void SortDatabase();
|
||||
void OnViewFindNext(CString &s1);
|
||||
CString Sub(const CString& from, const CString& to, CString& str);
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CCB32View)
|
||||
public:
|
||||
virtual void OnDraw(CDC* pDC); // overridden to draw this view
|
||||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
protected:
|
||||
virtual void OnInitialUpdate(); // called first time after construct
|
||||
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
|
||||
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
|
||||
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
|
||||
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
virtual ~CCB32View();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void DrawItemText (CDC*, CString, CRect, int, int);
|
||||
BOOL AddDocItemToListView (CExpr*);
|
||||
BOOL AddItemToListView (CStringArray*);
|
||||
BOOL UpdateItemInListView (CStringArray*, int);
|
||||
void FreeItems ();
|
||||
BOOL GetPropData (CStringArray*, CPropInfo&);
|
||||
BOOL SetPropData (CPropInfo&, CStringArray*);
|
||||
void TryToCall(CString&, CString);
|
||||
void TryToLaunch(CString&, CString);
|
||||
void LaunchShortcut(CString);
|
||||
|
||||
static int CALLBACK CompareFuncAsc (LPARAM, LPARAM, LPARAM);
|
||||
static int CALLBACK CompareFuncDec (LPARAM, LPARAM, LPARAM);
|
||||
|
||||
BOOL MakeExpr (CExpr*, CStringArray*);
|
||||
|
||||
void FindNextItem(CString, int, int, BOOL, int);
|
||||
|
||||
void DragColumn(int source, int dest);
|
||||
void SaveColPos();
|
||||
void SetupColumns();
|
||||
|
||||
void PrintColumnHeadings(CDC *pDC, CPrintInfo *pInfo);
|
||||
void PrintHeader(CDC *pDC, CPrintInfo *pInfo);
|
||||
void PrintFooter(CDC *pDC, CPrintInfo *pInfo);
|
||||
int DrawRow(CDC *pDC, int nItem);
|
||||
|
||||
// Generated message map functions
|
||||
protected:
|
||||
//{{AFX_MSG(CCB32View)
|
||||
afx_msg void MeasureItem (LPMEASUREITEMSTRUCT);
|
||||
afx_msg void DrawItem (LPDRAWITEMSTRUCT);
|
||||
afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
afx_msg void OnEntryAdd();
|
||||
afx_msg void OnEntryEdit();
|
||||
afx_msg void OnEntryDelete();
|
||||
afx_msg void OnUpdateEntryEdit(CCmdUI* pCmdUI);
|
||||
afx_msg void OnUpdateEntryDelete(CCmdUI* pCmdUI);
|
||||
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
|
||||
afx_msg void OnEditFind();
|
||||
afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI);
|
||||
afx_msg void OnViewFindNext();
|
||||
afx_msg void OnUpdateViewFindNext(CCmdUI* pCmdUI);
|
||||
afx_msg void OnViewColset();
|
||||
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
|
||||
afx_msg void OnDialHome();
|
||||
afx_msg void OnDialWork();
|
||||
afx_msg void OnUpdateDialHome(CCmdUI* pCmdUI);
|
||||
afx_msg void OnUpdateDialWork(CCmdUI* pCmdUI);
|
||||
afx_msg void OnDialCell();
|
||||
afx_msg void OnUpdateDialCell(CCmdUI* pCmdUI);
|
||||
afx_msg void OnDialPager();
|
||||
afx_msg void OnUpdateDialPager(CCmdUI* pCmdUI);
|
||||
afx_msg void OnDialFax();
|
||||
afx_msg void OnUpdateDialFax(CCmdUI* pCmdUI);
|
||||
afx_msg void OnEmailAdd1();
|
||||
afx_msg void OnUpdateEmailAdd1(CCmdUI* pCmdUI);
|
||||
afx_msg void OnEmailAdd2();
|
||||
afx_msg void OnUpdateEmailAdd2(CCmdUI* pCmdUI);
|
||||
afx_msg void OnUrl1();
|
||||
afx_msg void OnUpdateUrl1(CCmdUI* pCmdUI);
|
||||
afx_msg void OnUrl2();
|
||||
afx_msg void OnUpdateUrl2(CCmdUI* pCmdUI);
|
||||
afx_msg void OnAppPrefs();
|
||||
afx_msg void OnTbarDial();
|
||||
afx_msg void OnUpdateTbarDial(CCmdUI* pCmdUI);
|
||||
afx_msg void OnTbarEmail();
|
||||
afx_msg void OnUpdateTbarEmail(CCmdUI* pCmdUI);
|
||||
afx_msg void OnTbarWeb();
|
||||
afx_msg void OnUpdateTbarWeb(CCmdUI* pCmdUI);
|
||||
afx_msg void OnViewColpos();
|
||||
afx_msg void OnEntryCopy();
|
||||
afx_msg void OnUpdateEntryCopy(CCmdUI* pCmdUI);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
void ChangeListCtrlStyle(long lStyle, BOOL bSetBit);
|
||||
};
|
||||
|
||||
#ifndef _DEBUG // debug version in CB32View.cpp
|
||||
inline CCB32Doc* CCB32View::GetDocument()
|
||||
{ return (CCB32Doc*)m_pDocument; }
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_CB32VIEW_H__20BFD1EF_4F52_11D1_AF86_000000000000__INCLUDED_)
|
||||
Reference in a new issue