📄 uicommon.h
字号:
#if !defined(UI_COMMON_H__3D07E7E6_6B51_4D53_853B_2C48771983A2__INCLUDED_)
#define UI_COMMON_H__3D07E7E6_6B51_4D53_853B_2C48771983A2__INCLUDED_
// the position and size of the window
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
// color key used for DDraw overlay surface.
#define KEY_COLOR RGB(173,215,132)//RGB(0,255,0)
// color for pannel background and for message box backgnd
#define PANNEL_COLOR RGB(179,190,238)
// color for pannel background and for message box backgnd
#define ROUTE_INFO_BK_COLOR RGB(46,77,124)
// the menu bar height
#define TOP_MENU_BAR_HEIGHT 29
#define BOTTOM_MENU_BAR_HEIGHT 42
#define SCRMAP_MENU_BAR_HEIGHT 225
#define SCRMAP_MENU_BAR_WIDTH 95
#define MENU_BAR_COLOR RGB(89,115,152)
#define SCRMAP_BAR_COLOR RGB(167,178,182)
// MP = multimedia player
#define MP_BAR_HEIGHT 47
#define MP_BAR_COLOR RGB(132,154,173)
// PV = photo viewer
#define PV_BAR_HEIGHT 40
#ifdef __cplusplus
extern "C"{
#endif
extern HRGN g_hRgnNULL;
extern HANDLE g_hMDEvent;
extern BOOL g_bIsDraggingMap;
extern HDC g_hTempMemDC;
extern HDC g_hdcUI;
void SetDraggingMap(BOOL bDrag);
BOOL IsDraggingMap();
HDC NGetTempMemDC();
UINT RoundScale(UINT ulScaleVal);
HINSTANCE NGetInstanceHandle();
extern UINT g_uPrevMapScale;
UINT GetPrevMapScale();
void SetPrevMapScale(UINT scale);
#ifdef __cplusplus
}
#endif
// the following code only used in UI, not in other thread(MD,RP,etc.)
// so excluded them in .c file
#ifdef __cplusplus
#include "ddraw.h"
#include "NWnd.h"
#include "windows.h"
// initiallizing functions
BOOL InitNavGPS();
void FreeNavGPS();
HFONT NavGetFont(int nIndex);
BOOL InitUI();
void FreeUI();
// global variables
extern CNWnd* g_pMainWnd ;
extern HINSTANCE g_hInstance;
extern HFONT g_hNavFont;
extern HCURSOR g_hNavCursor;
CNWnd* NGetMainWnd();
CNWnd* NGetActiveWindow();
BOOL IsActiveApp();
LPSYSTEMTIME GetGPSTime();
HFONT NGetNavFont();
BOOL InitNavFont();
void FreeNavFont();
LPCTSTR NGetCurrentDir();
UINT GetMapScaleInfo(LPTSTR szBuffer, UINT nBufferSize);
HBITMAP NavLoadBitmap(int nWidth,int nHeight,UINT nIDResource);
BOOL ProcessKeyEvent(LONG lKeyCode);
void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr);
void FillSolidRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clr);
typedef struct
{
TCHAR FilePath[MAX_PATH+1];
TCHAR FileName[MAX_PATH+1];
} FILE_NAME;
FILE_NAME* GetFileList(const LPCTSTR pPath, const LPCTSTR pFileName);
void ReleaseFileList();
int GetCount();
void AddToFileList(const LPCTSTR pFilePath, const LPCTSTR pFileName);
BOOL SearchFile(LPCTSTR buf_path, LPCTSTR dir_name);
#endif // #ifdef __cplusplus
#endif // !defined(UI_COMMON_H__3D07E7E6_6B51_4D53_853B_2C48771983A2__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -