📄 gsfinder.h
字号:
/*
* GSFinder+ - File manager software for WindowsCE
* Copyright(C) 2000-2005 Y.Nagamidori (based source code)
* Copyright(C) 2004-2005 M.Toda (modified source code)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#if !defined(__GSFINDER_H_INCLUDED)
#define __GSFINDER_H_INCLUDED
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
///////////////////////////////////////////////////////////////
#include "resource.h"
#ifndef __POCKET_PC
#include "afxres.h"
#endif
#include <windows.h>
#include <winuser.h>
#include <commctrl.h>
#include <commdlg.h>
#include <shellapi.h>
#include <dbt.h>
#ifdef __POCKET_PC
#include <Sipapi.h>
#include <Aygshell.h>
#include <projects.h>
#endif
#include "Strings.h"
#include "MainWnd.h"
///////////////////////////////////////////////////////////////
//DEFINE
#define MAX_LOADSTRING 100
#define APP_MAINWND_TITLE _T("GSFinder+ WM5") //MOD kawa
#define APP_MUTEX_NAME _T("GSFINDERWM5") //MOD kawa
#define APP_CMD_PARAM _T("/FOLDER:")
#define APP_CMD_PARAM_LEN 8
#ifdef __POCKET_PC
#define ID_EDIT_COPY IDM_EDIT_COPY
#define ID_EDIT_CUT IDM_EDIT_CUT
#define ID_EDIT_PASTE IDM_EDIT_PASTE
#define ID_FILE_OPEN IDM_FILE_OPEN
#define ID_VIEW_TOOLBAR IDM_VIEW_TOOLBAR
#endif
#if defined(__POCKET_PC) || (_WIN32_WCE < 400)
# define APP_SPLIT_SIZE 4
#else
# define APP_SPLIT_SIZE 6
#endif
#define COMPDLL_MODE_LHA 1 //ADD TODA
#define COMPDLL_MODE_ZIP 2 //ADD TODA
#define LIST_ITEM_UPPER 0
#define LIST_ITEM_FOLDER 1
#define LIST_ITEM_FILE 2
#define LIST_SORT_NAME 0
#define LIST_SORT_EXT 1
#define LIST_SORT_SIZE 2
#define LIST_SORT_TIME 3
#define RETCODE_YES 0
#define RETCODE_NO 1
#define RETCODE_ALL_YES 2
#define RETCODE_ALL_NO 3
#define ID_TIMER_TVSELECTED 2 //ADD TODA
#define ID_TIMER_MENUCANCEL 3 //ADD TODA
#define ID_TIMER_TAPHOLD 4 //ADD TODA
#define ID_TIMER_DEVICECHANGE 5 //ADD TODA
#define AREA_TAPHOLD 5 //ADD TODA
#define WM_DROPFILES 0x0233
#define WM_UPDATENOTIFY (WM_USER + 1) //ADD TODA (from Y.Nagamidori)
#define MENU_HEIGHT 26
//ADD START TODA (from GSFinder ver.1.99)
#define RECT_WIDTH(prc) ((prc)->right - (prc)->left)
#define RECT_HEIGHT(prc) ((prc)->bottom - (prc)->top)
#define REG_KEY_GSF _T("Software\\GreenSoftware\\GSFinder+")
#define REG_KEY_SETTINGS _T("Software\\GreenSoftware\\GSFinder+\\Settings")
#define REG_KEY_REBAR _T("Software\\GreenSoftware\\GSFinder+\\Settings\\Rebar")
#define REG_KEY_RECENT _T("Software\\GreenSoftware\\GSFinder+\\Settings\\Recent")
//ADD END
//ADD START TODA (PocketPC偺僉乕敾掕懳張)
#ifdef __POCKET_PC
#define GET_KEYSTATE GetKeyState
#else
#define GET_KEYSTATE GetAsyncKeyState
#endif
//ADD END
///////////////////////////////////////////////////////////////
// 僌儘乕僶儖曄悢:
extern HINSTANCE g_hInst; // 尰嵼偺僀儞僗僞儞僗
extern CMainWnd g_MainWnd; //儊僀儞僂僀儞僪僂
extern LPTSTR g_lpszFirstLoadFolder;
extern BOOL g_bDraging; //ADD TODA
///////////////////////////////////////////////////////////////
extern "C"
{
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
DWORD GetVersion();
BOOL VGACheck();
void CenterWindow(HWND);
void SetFormatInteger(LPTSTR, UINT);
void SetFormatDouble(LPTSTR, UINT);
void SetFormatDateTime(SYSTEMTIME*, LPTSTR, UINT, BOOL bToday=FALSE);
void SetKickExt(LPTSTR);
void SetExtFromFileName(LPTSTR, LPTSTR);
UINT GetFileAndFolderCount(LPCTSTR , LISTITEMINFO*, int);
BOOL IsFolderShortcut(LPCTSTR, LPCTSTR);
int CALLBACK PropSheetCallback(HWND, UINT, LPARAM);
BOOL DefDlgPaintProc(HWND hDlg, WPARAM wParam, LPARAM lParam);
BOOL DefDlgPaintProc2(HWND hDlg, WPARAM wParam, LPARAM lParam);
BOOL DefDlgCtlColorStaticProc(HWND hDlg, WPARAM wParam, LPARAM lParam);
int CALLBACK ListSortCompareFuncByName(LPARAM, LPARAM, LPARAM);
int CALLBACK ListSortCompareFuncByExt(LPARAM, LPARAM, LPARAM);
int CALLBACK ListSortCompareFuncBySize(LPARAM, LPARAM, LPARAM);
int CALLBACK ListSortCompareFuncByTime(LPARAM, LPARAM, LPARAM);
#ifdef __POCKET_PC
DWORD GetIMStatus();
#endif
void SetFormatSize(DWORD dwSize, TCHAR szBuff[64], LPTSTR lpszFmtKB, LPTSTR lpszFmtMB);
LPCTSTR GetRootName(); //ADD TODA
int AddRootIcon(HIMAGELIST hImageList); //ADD TODA
HFONT MyCreateFont(int, BYTE, LPTSTR); //ADD TODA
void InitUpdateNotify(); //ADD TODA
void EnableUpdateNotify(); //ADD TODA
void DisableUpdateNotify(); //ADD TODA
void SetUpdateNotify(LPCTSTR pszDir); //ADD TODA
void UninitUpdateNotify(); //ADD TODA
#if _WIN32_WCE < 400
__inline
UINT WINAPI IsDlgButtonChecked(HWND hDlg, int nIDButton) {
return SendDlgItemMessage((hDlg), (nIDButton), BM_GETCHECK, (WPARAM)0, (LPARAM)0);
}
char *_strlwr(char*);
char *_strupr(char *);
#endif
};
///////////////////////////////////////////////////////////////
#endif // !defined(__GSFINDER_H_INCLUDED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -