|
// DbMainWnd.h
#include "CeLib.h"
#include "CeMap.h"
#define MAX_RECS 40
class CeDbMainWnd: public CeSplitFrame
{
private:
// CeCmdBar m_cmdbar;
int m_nFontSize;
HFONT m_hFont;
HWND m_hwndList;
HWND m_hwndTree;
CeSimpleMap<DWORD,WORD> m_mapColumn;
int m_nCols;
CEOID m_oidDb;
CeDb m_db;
// quick hack, should change
int m_nFirst;
int m_nRecs;
CeDbRecord m_records[MAX_RECS];
CEOID m_oids[MAX_RECS];
HIMAGELIST m_hImages;
bool m_bPalm;
bool m_bMoving;
private:
void CreateBars();
void CreateList(CeRect& rcList, bool bOwnerData);
void ReCreateList(bool bOwnerData);
bool CacheRecords(int nStart, int nCount);
void ResetList();
void ResetContent(CEOID oidDb, DWORD dwProp);
CEOID GetListOid(int nSel);
bool DeleteRecord(int nRecord);
bool AddDatabases();
void SetCtrlFont(HFONT hFont);
void OnDeleteDb();
void OnDeleteRecord();
void OnRefresh();
void OnProperties();
void OnAbout();
void OnOptions();
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual BOOL OnCreate(LPCREATESTRUCT lpCS, bool& bHandled);
virtual void OnDestroy(bool& bHandled);
virtual void OnClose(bool& bHandled);
virtual LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual void OnSettingChange( WORD wFlag, LPCTSTR pszSection, bool& bHandled );
virtual LRESULT OnNotify(int nCtrlId, LPNMHDR pNMH, bool& bHandled);
void OnColumnClick(NMLISTVIEW * pLV);
LRESULT OnDispInfo(NMLVDISPINFO * pDI);
LRESULT OnCacheHint(NMLVCACHEHINT * pCH);
LRESULT OnFindItem(NMLVFINDITEM * pFI);
// virtual void OnLButtonDown( UINT nFlags, POINT point, bool& bHandled );
// virtual void OnLButtonUp( UINT nFlags, POINT point, bool& bHandled );
// virtual void OnMouseMove( UINT nFlags, POINT point, bool& bHandled );
// virtual void OnPaint( bool& bHandled );
public:
CeDbMainWnd();
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.