?? afxcore.h
字號:
/*
Cross Platform Core Code.
Copyright(R) 2001-2002 Balang Software.
All rights reserved.
Using:
some afx-global-functions
*/
#if !defined( __STKLIB_AFXCORE_H__ )
#define __STKLIB_AFXCORE_H__
#include "SpString.h"
#include "Profile.h"
//////////////////////////////////////////////////////////////////////
// The following is implemented by MFC
UINT AFXAPI AfxGetFileTitle(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
void AFXAPI AfxGetModuleShortFileName(HINSTANCE hInst, CString& strShortName);
BOOL AFXAPI AfxFullPath(LPTSTR lpszPathOut, LPCTSTR lpszFileIn);
BOOL AFXAPI AfxResolveShortcut(CWnd* pWnd, LPCTSTR pszShortcutFile,
LPTSTR pszPath, int cchPath);
/////////////////////////////////////////////////////////////////////
// The Following is command functions
// 根據當前語言和高度選擇pDC適應的Font
CFont * AfxSelectDCFont( CDC * pDC, int nHeight );
// Register Function
BOOL AfxSetRegKey(LPCTSTR lpszKey, LPCTSTR lpszValue, LPCTSTR lpszValueName = NULL);
LONG AfxGetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata);
BOOL AfxDeleteRegKey(LPCTSTR lpszKey);
HKEY AfxGetSectionKey(HKEY hKey, LPCTSTR szRegKeyGroup,
LPCTSTR szRegKeyCompany, LPCTSTR szRegKeyApp, LPCTSTR lpszSection );
BOOL AfxRegSetValue( LPCTSTR szRegKeyCompany, LPCTSTR szRegKeyApp, LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszValue );
CString AfxRegQueryString(HKEY hKey, LPCTSTR szRegKeyGroup,
LPCTSTR szRegKeyCompany, LPCTSTR szRegKeyApp, LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault );
BOOL AfxRegQueryString(HKEY hKey, LPCTSTR szRegKeyGroup, LPCTSTR szRegKeyCompany, LPCTSTR szRegKeyApp,
CStringArray &astrName, CStringArray &astrData );
// Goto URL functions
HINSTANCE AfxGotoURL(LPCTSTR url, int showcmd);
// ActiveX Functions
BOOL AfxRegisterActiveXCtrls( LPCTSTR lpszOcxFileName );
CString AfxGetVersionString( );
CString AfxGetFileTitle( LPCTSTR lpszPathName );
CString AfxGetFileTitleNoExt( LPCTSTR lpszPathName );
CString AfxGetFileDirectoryExist( LPCTSTR lpszPathName, LPCTSTR lpszDefault );
/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
// Chinese To English Translation
BOOL AfxIsEnglish( const char * sz, int maxlen, float ratio = 0.0 );
CSPString AfxFaintlyChsToEnu( const char * szCh );
CSPString AfxMakeSpellCode( CSPString & strSrc, int nMode = 0x0001 );
////////////////////////////////////////////////////////////////////////////////////
// global data
CStProfile & AfxGetProfile( );
CStockContainer & AfxGetStockContainer( );
CDomainContainer & AfxGetDomainContainer( );
CDomainContainer & AfxGetGroupContainer( );
CStDatabase & AfxGetDB();
void AfxSetDB(CStDatabase * pdb);
CStock & AfxGetStockMain(DWORD dwMarket=CStock::marketSHSE);
////////////////////////////////////////////////////////////////////////////////////
// database functions
BOOL AfxInitializeDB( LPSTR lpBuf, UINT nMaxSize );
BOOL AfxReleaseDB( );
BOOL AfxReloadStockMain( );
BOOL AfxReloadStock( CStock & stock );
BOOL AfxPrepareStockData( CStDatabase * pDatabase, CStock &stock, int nKType, int nKFormat, int nMaindataType, BOOL bFullFill, BOOL bReload );
int AfxRefreshStockContainerMinute( CStockContainer & container, LONG lStockType, int nSecondsToRead = -1 );
////////////////////////////////////////////////////////////////////////////////////
// usful functions
CSPString AfxGetTimeString( time_t time, LPCTSTR lpszTimeFmt, BOOL bAddWeekDay );
CSPString AfxGetReportTypeString( int reporttype );
CSPString AfxGetFileDirectory( CSPString strPathName, CSPString strDefault );
CSPString AfxGetFilePath( CSPString strDir, CSPString strFileTitle );
////////////////////////////////////////////////////////////////////////////////////
// 以下函數實現體在 Strings.cpp
CSPString AfxGetKTypeString( int ktype );
CSPString AfxGetMaindataTypeString( int type );
CSPString AfxGetSTTName( UINT nTech ); // 給定技術指標唯一編號,得到指標中文名稱
CSPString AfxGetSTTShortName( UINT nTech ); // 給定技術指標唯一編號,得到指標英文簡稱
CSPString AfxGetSTTFullName( UINT nTech ); // 給定技術指標唯一編號,得到指標中文名稱+英文簡稱
CSPString AfxGetSTTClassName( UINT nTech ); // 給定技術指標唯一編號,得到指標所屬分類,如:趨勢類、能量類
CSPString AfxGetIntensityString( int nIntensity ); // 給定買賣信號值,得到中文說明
CSPString AfxGetIntensityCodeString( UINT nCode ); // 給定買賣信號理由說明值,得到中文說明
CSPString AfxGetSLHTitle( UINT nSLH ); // 給定股票列表列號,返回列名稱
CSPString AfxGetSLHDescript( UINT nSLH ); // 給定股票列表列號,返回列說明
void AfxGetAllDistrict( CSPStringArray & astr ); // 獲得所有國家和地區名稱列表
#define ACCE_MIN 1
#define ACCE_01 1 // 熱鍵F1
#define ACCE_02 2 // 熱鍵F2
#define ACCE_03 3 // 熱鍵F3
#define ACCE_04 4 // 熱鍵F4
#define ACCE_05 5 // 熱鍵F5
#define ACCE_06 6 // 熱鍵F6
#define ACCE_07 7 // 熱鍵F7
#define ACCE_08 8 // 熱鍵F8
#define ACCE_09 9 // 熱鍵F9
#define ACCE_10 10 // 熱鍵F10
#define ACCE_1 11 // 上A報價
#define ACCE_2 12 // 上B報價
#define ACCE_3 13 // 深A報價
#define ACCE_4 14 // 深B報價
#define ACCE_5 15 // 上債報價
#define ACCE_6 16 // 深債報價
#define ACCE_61 17 // 上A漲跌
#define ACCE_62 18 // 上B漲跌
#define ACCE_63 19 // 深A漲跌
#define ACCE_64 20 // 深B漲跌
#define ACCE_65 21 // 上債漲跌
#define ACCE_66 22 // 深債漲跌
#define ACCE_71 23 // 上證信息
#define ACCE_72 24 // 深證信息
#define ACCE_73 25 // 券商信息
#define ACCE_81 26 // 上A綜合
#define ACCE_82 27 // 上B綜合
#define ACCE_83 28 // 深A綜合
#define ACCE_84 29 // 深B綜合
#define ACCE_85 30 // 上債綜合
#define ACCE_86 31 // 深債綜合
#define ACCE_LBDK 32 // 顯示分時行情量比多空指標
#define ACCE_MMLD 33 // 顯示分時行情買賣力道指標
#define ACCE_MAX 33
CSPString AfxGetAccelerator( UINT nAcce, int nCharLeft = 8 ); // 給定快捷鍵編號,返回快捷鍵及其中文名稱
// End
////////////////////////////////////////////////////////////////////////////////////
#endif // __STKLIB_AFXCORE_H__
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -