|
// DbMainWnd.h
#include "CeLib.h"
#include <shellapi.h>
//extern CeModule theApp;
///////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////
#define SORTCOL_NAME 1
#define SORTCOL_SIZE 2
#define SORTCOL_TYPE 3
#define SORTCOL_DATE 4
#define SORTCOL_ATTRIB 5
typedef struct tagLISTSORTINFO
{
tagLISTSORTINFO()
{
// Sort the list after adding
hwndList = NULL;
nColumnNo = -1;
nColType = SORTCOL_NAME;
bAscending = true;
}
HWND hwndList;
int nColumnNo;
int nColType;
bool bAscending;
}
LISTSORTINFO;
extern LISTSORTINFO g_sortinfo;
///////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////
typedef struct tagOPTIONS
{
bool m_bUseSysIcons;
bool m_bCloseButton;
bool m_bIconbar;
bool m_bROM;
bool m_bCol_Type;
bool m_bCol_Size;
bool m_bCol_Date;
bool m_bCol_Attrib;
void SaveToRegistry();
void RestoreFromRegistry();
}
OPTIONS;
extern OPTIONS g_options;
///////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////
class CeMainWnd: public CeSplitFrame
{
private:
void CreateBars();
DWORD m_dwFontSize;
HFONT m_hFont;
HWND m_hwndList;
HWND m_hwndTree;
// quick hack, should change
HIMAGELIST m_ilSmall;
HIMAGELIST m_hImages;
CeString m_strCurrentDirectory;
bool m_bCurrentFtp;
NOTIFYICONDATA m_nid;
private:
void SetCtrlFont(HFONT hFont);
void OnRun();
void OnDelete();
void OnRename();
void OnNewFolder();
void OnNewShortcut();
void OnEmptyRecycleBin();
void OnProperties();
void OnAbout();
void OnOptions();
void OnFont();
void OnNewSite();
void OnRefresh();
CeFtpClient m_ftpConn;
HTREEITEM m_hConnected;
void StoreOptions();
void LoadOptions();
void AddColumns();
CeString GetTreePath(HTREEITEM Item, bool& bFtp);
BOOL PopulateDirectory(HTREEITEM hItem, LPCTSTR szDir, bool bFtp);
void PopulateFilelist(HTREEITEM hItem, LPCTSTR szDir, bool bFtp);
BOOL PopulateFtpSites(HTREEITEM hItem);
void InsertFile(LPCTSTR szDir, WIN32_FIND_DATA* pFD, bool bFtp, int iInsertItem = -1);
BOOL Execute(LPCTSTR lpszDir, LPCTSTR lpszFile);
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 LRESULT OnNotify(int nCtrlId, LPNMHDR pNMH, bool& bHandled);
LRESULT OnTreeViewNotify(NMTREEVIEW* pNMTV);
LRESULT OnListViewNotify(NMLISTVIEW* pNMLV);
void OnColumnClick(NMLISTVIEW * pLV);
LRESULT OnBeginDragTree(NMTREEVIEW* pNMTV);
LRESULT OnBeginDragList(NMLISTVIEW* pNMLV);
virtual void OnLButtonUp( UINT nFlags, POINT point, bool& bHandled );
virtual void OnMouseMove( UINT nFlags, POINT point, bool& bHandled );
HIMAGELIST m_hDragImage;
bool m_bDragging;
HWND m_hDropWnd;
POINT m_ptDropPoint;
DWORD m_dwDragItem;
DWORD m_dwDropItem;
//
void ShowIconBar(bool bShow);
void OnConnect();
void OnDisconnect();
public:
CeMainWnd();
};
|
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.