Strings.cpp
上传用户:zhanglf88
上传日期:2013-11-19
资源大小:6036k
文件大小:38k
源码类别:

金融证券系统

开发平台:

Visual C++

  1. // strings.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. #include "StdAfx.h"
  13. #include "Qianlong.h"
  14. #include "Shenglong.h"
  15. #include "SelfDB.h"
  16. #include "Strings.h"
  17. #ifdef CLKLAN_ENGLISH_US
  18. char CQianlong::m_szDataType[] = "QianLong";
  19. char CShenglong::m_szDataType[] = "Salon";
  20. char CSelfDB::m_szDataType[] = "Ninebulls-Stock";
  21. #else
  22. char CQianlong::m_szDataType[] = "钱龙";
  23. char CShenglong::m_szDataType[] = "胜龙";
  24. char CSelfDB::m_szDataType[] = "策略为王";
  25. #endif
  26. //////////////////////////////////////////////////////////////////////////////////
  27. // 字符串
  28. #ifdef CLKLAN_ENGLISH_US
  29. char sz_stockname_fund[] = "基金";
  30. char sz_stockname_bond[] = "债券";
  31. char sz_stockname_index[] = "指数";
  32. char sz_stockname_bondindex[] = "国债指数";
  33. char sz_stockname_bondindexcorp[] = "企债指数";
  34. #else
  35. char sz_stockname_fund[] = "基金";
  36. char sz_stockname_bond[] = "债券";
  37. char sz_stockname_index[] = "指数";
  38. char sz_stockname_bondindex[] = "国债指数";
  39. char sz_stockname_bondindexcorp[] = "企债指数";
  40. #endif
  41. //////////////////////////////////////////////////////////////////////////////////
  42. // 指标买卖信号字符串
  43. #ifdef CLKLAN_ENGLISH_US
  44. char its_sellintense[] = "Strong Sell";
  45. char its_sell[] = "Sell";
  46. char its_sellfeeble[] = "Faintly Sell";
  47. char its_nothing[] = "Nothing";
  48. char its_buyfeeble[] = "Faintly Buy";
  49. char its_buy[] = "Buy";
  50. char its_buyintense[] = "Strong Buy";
  51. char itsc_nothing[] = "nothing";
  52. char itsc_deviateonbottom[] = "deviate on bottom";
  53. char itsc_deviateontop[] = "deviate on top";
  54. char itsc_goldenfork[] = "golden fork";
  55. char itsc_deadfork[] = "dead fork";
  56. char itsc_long[] = "long";
  57. char itsc_short[] = "short";
  58. char itsc_overbought[] = "overbought";
  59. char itsc_oversold[] = "oversold";
  60. char itsc_support[] = "support";
  61. char itsc_resistance[] = "resistance";
  62. #else
  63. char its_sellintense[] = "强烈卖出";
  64. char its_sell[] = "卖出";
  65. char its_sellfeeble[] = "微弱卖出";
  66. char its_nothing[] = "无";
  67. char its_buyfeeble[] = "微弱买进";
  68. char its_buy[] = "买进";
  69. char its_buyintense[] = "强烈买进";
  70. char itsc_nothing[] = "无";
  71. char itsc_deviateonbottom[] = "底背离";
  72. char itsc_deviateontop[] = "顶背离";
  73. char itsc_goldenfork[] = "金叉";
  74. char itsc_deadfork[] = "死叉";
  75. char itsc_long[] = "多头强势";
  76. char itsc_short[] = "空头强势";
  77. char itsc_overbought[] = "超买";
  78. char itsc_oversold[] = "超卖";
  79. char itsc_support[] = "支撑";
  80. char itsc_resistance[] = "压力";
  81. #endif
  82. //////////////////////////////////////////////////////////////////////////////////
  83. // 指标字符串
  84. // 给定技术指标唯一编号,返回技术指标中文名称
  85. CSPString AfxGetSTTName( UINT nTech )
  86. {
  87. static CSPString stt_names[STT_MAX+1];
  88. SP_ASSERT( STT_MAX >= 0 );
  89. if( stt_names[0].GetLength() <= 0 )
  90. {
  91. // stt_names
  92. stt_names[0] = "STTNames";
  93. #ifdef CLKLAN_ENGLISH_US
  94. // K线属性类
  95. stt_names[STT_MA] = ("Moving Average");
  96. stt_names[STT_BBI] = ("BBI");
  97. stt_names[STT_BOLL] = ("Boollinger Bands");
  98. stt_names[STT_PV] = ("Price/Volume");
  99. stt_names[STT_SAR] = ("Stop And Reverse");
  100. stt_names[STT_DJ] = ("Superposition");
  101. stt_names[STT_CW] = ("Chips Distribution");
  102. // 趋势类
  103. stt_names[STT_MACD] = ("Moving Average Convergence/Divergence");
  104. stt_names[STT_MIKE] = ("Mike Base");
  105. stt_names[STT_PSY] = ("Psychological Line");
  106. // 能量类
  107. stt_names[STT_VOLUME] = ("Volume");
  108. stt_names[STT_NVI] = ("Negative Volume Indicator");
  109. stt_names[STT_PVI] = ("Positive Volume Indicator");
  110. stt_names[STT_VR] = ("Volume Ratio");
  111. stt_names[STT_VROC] = ("Volume Rate Indicator");
  112. stt_names[STT_OBV] = ("On Balance Volume");
  113. stt_names[STT_MOBV] = ("Moving On Balance Volume");
  114. stt_names[STT_MFI] = ("Money Flow Indicator");
  115. stt_names[STT_VMACD] = ("Volume Moving Average Convergence/Divergence");
  116. stt_names[STT_WVAD] = ("William's Variable Accumulation Distribution");
  117. stt_names[STT_EMV] = ("Ease of Movement Value");
  118. stt_names[STT_VRSI] = ("Volume Relative Strength Indicator");
  119. stt_names[STT_NVRSI] = ("New Volume Relative Strength Indicator");
  120. stt_names[STT_AD] = ("Accumulation/Distribution");
  121. stt_names[STT_CI] = ("Cumulation Indicator");
  122. // 摆动类
  123. stt_names[STT_KDJ] = ("Stochastics");
  124. stt_names[STT_R] = ("William's Overbought/Oversold Indicator");
  125. stt_names[STT_RSI] = ("Relative Strength Indicator");
  126. stt_names[STT_BIAS] = ("Bias");
  127. stt_names[STT_MTM] = ("Momentum");
  128. stt_names[STT_DMI] = ("Directional Movement Indicator");
  129. stt_names[STT_ROC] = ("Rate Of Change");
  130. stt_names[STT_CCI] = ("Commodity Channel Indicator");
  131. stt_names[STT_CV] = ("Chavkin");
  132. stt_names[STT_ARBR] = ("AR BR");
  133. stt_names[STT_CR] = ("CR");
  134. stt_names[STT_OSC] = ("Oscillator");
  135. stt_names[STT_UOS] = ("Ultimate Oscillator");
  136. stt_names[STT_MAOSC] = ("Moving Average Oscillator");
  137. stt_names[STT_36BIAS] = ("3-6 Bias");
  138. stt_names[STT_DPO] = ("Detrended Price Oscillator");
  139. stt_names[STT_KST] = ("Know Sure Things");
  140. // 其他类
  141. stt_names[STT_REI] = ("Range Expansion Indicator");
  142. stt_names[STT_DMKI] = ("Demaker Indicator");
  143. stt_names[STT_PCNT] = ("Percent");
  144. stt_names[STT_HLC] = ("Highest and Lowest and Close Price");
  145. stt_names[STT_CDP] = ("CDP");
  146. stt_names[STT_ASI] = ("Accumulation Swing Indicator");
  147. stt_names[STT_ATR] = ("Average True Ranger");
  148. // 策略为王指标类
  149. stt_names[STT_CYO] = ("Cycle Oscillator");
  150. stt_names[STT_DCYO] = ("Degaussed Cycle Oscillator");
  151. stt_names[STT_HSL] = ("Relative Change Hands");
  152. stt_names[STT_DPER] = ("Detrended Percent Oscillator");
  153. #else
  154. // K线属性类
  155. stt_names[STT_MA] = ("移动平均线");
  156. stt_names[STT_BBI] = ("多空指标");
  157. stt_names[STT_BOLL] = ("布林带");
  158. stt_names[STT_PV] = ("汇证均价线");
  159. stt_names[STT_SAR] = ("停损点转向指标");
  160. stt_names[STT_DJ] = ("叠加图");
  161. stt_names[STT_CW] = ("筹码分布图");
  162. // 趋势类
  163. stt_names[STT_MACD] = ("指数平滑异同移动平均线");
  164. stt_names[STT_MIKE] = ("麦克指标");
  165. stt_names[STT_PSY] = ("心理线");
  166. // 能量类
  167. stt_names[STT_VOLUME] = ("成交量");
  168. stt_names[STT_NVI] = ("负成交量指标");
  169. stt_names[STT_PVI] = ("正成交量指标");
  170. stt_names[STT_VR] = ("容量比率");
  171. stt_names[STT_VROC] = ("成交量变动率指标");
  172. stt_names[STT_OBV] = ("能量线");
  173. stt_names[STT_MOBV] = ("主力进出");
  174. stt_names[STT_MFI] = ("资金流动指数");
  175. stt_names[STT_VMACD] = ("量指数平滑异同移动平均线");
  176. stt_names[STT_WVAD] = ("威廉变异离散量");
  177. stt_names[STT_EMV] = ("简易波动指标");
  178. stt_names[STT_VRSI] = ("量相对强弱指标");
  179. stt_names[STT_NVRSI] = ("新量相对强弱指标");
  180. stt_names[STT_AD] = ("聚/散指标");
  181. stt_names[STT_CI] = ("累积指数");
  182. // 摆动类
  183. stt_names[STT_KDJ] = ("随机指标");
  184. stt_names[STT_R] = ("威廉指标");
  185. stt_names[STT_RSI] = ("相对强弱指标");
  186. stt_names[STT_BIAS] = ("乖离率");
  187. stt_names[STT_MTM] = ("动量指标");
  188. stt_names[STT_DMI] = ("动向指标");
  189. stt_names[STT_ROC] = ("变动率指标");
  190. stt_names[STT_CCI] = ("顺势通道指标");
  191. stt_names[STT_CV] = ("佳庆指标");
  192. stt_names[STT_ARBR] = ("人气意愿指标");
  193. stt_names[STT_CR] = ("中间意愿指标");
  194. stt_names[STT_OSC] = ("摆动量");
  195. stt_names[STT_UOS] = ("极摆动指标");
  196. stt_names[STT_MAOSC] = ("移动平均摆动量");
  197. stt_names[STT_36BIAS] = ("3减6日乖离");
  198. stt_names[STT_DPO] = ("去势价格摆动指数");
  199. stt_names[STT_KST] = ("确然指标");
  200. // 其他类
  201. stt_names[STT_REI] = ("范围膨胀指数");
  202. stt_names[STT_DMKI] = ("迪马克尔指标");
  203. stt_names[STT_PCNT] = ("幅度比");
  204. stt_names[STT_HLC] = ("幅度分析");
  205. stt_names[STT_CDP] = ("逆势操作指标");
  206. stt_names[STT_ASI] = ("累积摆动指标");
  207. stt_names[STT_ATR] = ("均幅指标");
  208. // 策略为王指标类
  209. stt_names[STT_CYO] = ("周期摆动量");
  210. stt_names[STT_DCYO] = ("去噪周期摆动量");
  211. stt_names[STT_HSL] = ("相对换手率");
  212. stt_names[STT_DPER] = ("去势百分比指标");
  213. #endif
  214. }
  215. if( nTech >= STT_MIN && nTech <= STT_MAX )
  216. {
  217. return stt_names[nTech];
  218. }
  219. if( nTech >= STT_USER_MIN )
  220. {
  221. return CTechUser::GetTechUserName( nTech );
  222. }
  223. return "";
  224. }
  225. // 给定技术指标唯一编号,返回技术指标英文简称
  226. CSPString AfxGetSTTShortName( UINT nTech )
  227. {
  228. static CSPString stt_shortnames[STT_MAX+1];
  229. SP_ASSERT( STT_MAX >= 0 );
  230. if( stt_shortnames[0].GetLength() <= 0 )
  231. {
  232. // stt_shortnames
  233. stt_shortnames[0] = "STTShortNames";
  234. // K线属性类
  235. stt_shortnames[STT_MA] = ("MA");
  236. stt_shortnames[STT_BBI] = ("BBI");
  237. stt_shortnames[STT_BOLL] = ("BOLL");
  238. stt_shortnames[STT_PV] = ("P/V");
  239. stt_shortnames[STT_SAR] = ("SAR");
  240. stt_shortnames[STT_DJ] = ("DJ");
  241. stt_shortnames[STT_CW] = ("CW");
  242. // 趋势类
  243. stt_shortnames[STT_MACD] = ("MACD");
  244. stt_shortnames[STT_MIKE] = ("MIKE");
  245. stt_shortnames[STT_PSY] = ("PSY");
  246. // 能量类
  247. stt_shortnames[STT_VOLUME] = ("VOLUME");
  248. stt_shortnames[STT_NVI] = ("NVI");
  249. stt_shortnames[STT_PVI] = ("PVI");
  250. stt_shortnames[STT_VR] = ("VR");
  251. stt_shortnames[STT_VROC] = ("VROC");
  252. stt_shortnames[STT_OBV] = ("OBV");
  253. stt_shortnames[STT_MOBV] = ("MOBV");
  254. stt_shortnames[STT_MFI] = ("MFI");
  255. stt_shortnames[STT_VMACD] = ("VMACD");
  256. stt_shortnames[STT_WVAD] = ("WVAD");
  257. stt_shortnames[STT_EMV] = ("EMV");
  258. stt_shortnames[STT_VRSI] = ("VRSI");
  259. stt_shortnames[STT_NVRSI] = ("NVRSI");
  260. stt_shortnames[STT_AD] = ("A/D");
  261. stt_shortnames[STT_CI] = ("CI");
  262. // 摆动类
  263. stt_shortnames[STT_KDJ] = ("KDJ");
  264. stt_shortnames[STT_R] = ("R");
  265. stt_shortnames[STT_RSI] = ("RSI");
  266. stt_shortnames[STT_BIAS] = ("BIAS");
  267. stt_shortnames[STT_MTM] = ("MTM");
  268. stt_shortnames[STT_DMI] = ("DMI");
  269. stt_shortnames[STT_ROC] = ("ROC");
  270. stt_shortnames[STT_CCI] = ("CCI");
  271. stt_shortnames[STT_CV] = ("CV");
  272. stt_shortnames[STT_ARBR] = ("ARBR");
  273. stt_shortnames[STT_CR] = ("CR");
  274. stt_shortnames[STT_OSC] = ("OSC");
  275. stt_shortnames[STT_UOS] = ("UOS");
  276. stt_shortnames[STT_MAOSC] = ("MAOSC");
  277. stt_shortnames[STT_36BIAS] = ("3-6BIAS");
  278. stt_shortnames[STT_DPO] = ("DPO");
  279. stt_shortnames[STT_KST] = ("KST");
  280. // 其他类
  281. stt_shortnames[STT_REI] = ("REI");
  282. stt_shortnames[STT_DMKI] = ("DMKI");
  283. stt_shortnames[STT_PCNT] = ("PCNT");
  284. stt_shortnames[STT_HLC] = ("HLC");
  285. stt_shortnames[STT_CDP] = ("CDP");
  286. stt_shortnames[STT_ASI] = ("ASI");
  287. stt_shortnames[STT_ATR] = ("ATR");
  288. // 策略为王指标类
  289. stt_shortnames[STT_CYO] = ("CYO");
  290. stt_shortnames[STT_DCYO] = ("DCYO");
  291. stt_shortnames[STT_HSL] = ("HSL");
  292. stt_shortnames[STT_DPER] = ("DPER");
  293. }
  294. if( nTech >= STT_MIN && nTech <= STT_MAX )
  295. {
  296. return stt_shortnames[nTech];
  297. }
  298. if( nTech >= STT_USER_MIN )
  299. {
  300. return CTechUser::GetTechUserShortName( nTech );
  301. }
  302. return "";
  303. }
  304. // 给定技术指标唯一编号,返回技术指标中文名称+英文简称
  305. CSPString AfxGetSTTFullName( UINT nTech )
  306. {
  307. return AfxGetSTTName( nTech ) + "(" + AfxGetSTTShortName( nTech ) + ")";
  308. }
  309. // 给定技术指标唯一编号,返回技术指标类别名称
  310. CSPString AfxGetSTTClassName( UINT nTech )
  311. {
  312. static CSPString stt_classnames[STT_CLASS_MAX+1];
  313. SP_ASSERT( STT_MAX >= 0 );
  314. if( stt_classnames[0].GetLength() <= 0 )
  315. {
  316. // stt_classnames
  317. stt_classnames[0] = "STTClassNames";
  318. #ifdef CLKLAN_ENGLISH_US
  319. stt_classnames[STT_CLASS_KLINE] = "K Line Attribute";
  320. stt_classnames[STT_CLASS_TREND] = "Trend";
  321. stt_classnames[STT_CLASS_ENERGY] = "Energy";
  322. stt_classnames[STT_CLASS_SWING] = "Swing";
  323. stt_classnames[STT_CLASS_OTHER] = "Others";
  324. stt_classnames[STT_CLASS_CLK] = "Ninebulls-Stock";
  325. stt_classnames[STT_CLASS_USER] = "User Define";
  326. #else
  327. stt_classnames[STT_CLASS_KLINE] = "K线属性类";
  328. stt_classnames[STT_CLASS_TREND] = "趋势类";
  329. stt_classnames[STT_CLASS_ENERGY] = "能量类";
  330. stt_classnames[STT_CLASS_SWING] = "摆动类";
  331. stt_classnames[STT_CLASS_OTHER] = "其它类";
  332. stt_classnames[STT_CLASS_CLK] = "策略为王指标类";
  333. stt_classnames[STT_CLASS_USER] = "外挂指标类";
  334. #endif
  335. }
  336. if( nTech >= STT_KLINE_MIN && nTech <= STT_KLINE_MAX )
  337. return stt_classnames[STT_CLASS_KLINE];
  338. else if( nTech >= STT_TREND_MIN && nTech <= STT_TREND_MAX )
  339. return stt_classnames[STT_CLASS_TREND];
  340. else if( nTech >= STT_ENERGY_MIN && nTech <= STT_ENERGY_MAX )
  341. return stt_classnames[STT_CLASS_ENERGY];
  342. else if( nTech >= STT_SWING_MIN && nTech <= STT_SWING_MAX )
  343. return stt_classnames[STT_CLASS_SWING];
  344. else if( nTech >= STT_OTHER_MIN && nTech <= STT_OTHER_MAX )
  345. return stt_classnames[STT_CLASS_OTHER];
  346. else if( nTech >= STT_CLK_MIN && nTech <= STT_CLK_MAX )
  347. return stt_classnames[STT_CLASS_CLK];
  348. else if( nTech >= STT_USER_MIN )
  349. return stt_classnames[STT_CLASS_USER];
  350. return "";
  351. }
  352. // 给定买卖信号值,得到中文说明
  353. CSPString AfxGetIntensityString( int nIntensity )
  354. {
  355. if( nIntensity >= ITS_MIN && nIntensity <= ITSG_SELLINTENSE )
  356. return its_sellintense;
  357. else if( nIntensity > ITSG_SELLINTENSE && nIntensity <= ITSG_SELL )
  358. return its_sell;
  359. else if( nIntensity > ITSG_SELL && nIntensity <= ITSG_SELLFEEBLE )
  360. return its_sellfeeble;
  361. else if( nIntensity > ITSG_SELLFEEBLE && nIntensity < ITSG_BUYFEEBLE  )
  362. return its_nothing;
  363. else if( nIntensity >= ITSG_BUYFEEBLE && nIntensity < ITSG_BUY )
  364. return its_buyfeeble;
  365. else if( nIntensity >= ITSG_BUY && nIntensity < ITSG_BUYINTENSE )
  366. return its_buy;
  367. else if( nIntensity >= ITSG_BUYINTENSE && nIntensity <= ITS_MAX )
  368. return its_buyintense;
  369. SP_ASSERT( FALSE );
  370. return "";
  371. }
  372. // 给定买卖信号理由说明值,得到中文说明
  373. CSPString AfxGetIntensityCodeString( UINT nCode )
  374. {
  375. switch( nCode )
  376. {
  377. case ITSC_NOTHING: return itsc_nothing;
  378. case ITSC_DEVIATEONBOTTOM: return itsc_deviateonbottom;
  379. case ITSC_DEVIATEONTOP: return itsc_deviateontop;
  380. case ITSC_GOLDENFORK: return itsc_goldenfork;
  381. case ITSC_DEADFORK: return itsc_deadfork;
  382. case ITSC_LONG: return itsc_long;
  383. case ITSC_SHORT: return itsc_short;
  384. case ITSC_OVERBOUGHT: return itsc_overbought;
  385. case ITSC_OVERSOLD: return itsc_oversold;
  386. case ITSC_SUPPORT: return itsc_support;
  387. case ITSC_RESISTANCE: return itsc_resistance;
  388. default:
  389. SP_ASSERT( FALSE );
  390. }
  391. return "";
  392. }
  393. CSPString AfxGetKTypeString( int ktype )
  394. {
  395. #ifdef CLKLAN_ENGLISH_US
  396. if( CKData::ktypeMonth == ktype )
  397. return "Month Line";
  398. else if( CKData::ktypeWeek == ktype )
  399. return "Week Line";
  400. else if( CKData::ktypeDay == ktype )
  401. return "Day Line";
  402. else if( CKData::ktypeMin5 == ktype )
  403. return "5 Minutes Line";
  404. else if( CKData::ktypeMin15 == ktype )
  405. return "15 Minutes Line";
  406. else if( CKData::ktypeMin30 == ktype )
  407. return "30 Minutes Line";
  408. else if( CKData::ktypeMin60 == ktype )
  409. return "60 Minutes Line";
  410. else
  411. return "Unknown";
  412. #else
  413. if( CKData::ktypeMonth == ktype )
  414. return "月线";
  415. else if( CKData::ktypeWeek == ktype )
  416. return "周线";
  417. else if( CKData::ktypeDay == ktype )
  418. return "日线";
  419. else if( CKData::ktypeMin5 == ktype )
  420. return "五分钟线";
  421. else if( CKData::ktypeMin15 == ktype )
  422. return "十五分钟线";
  423. else if( CKData::ktypeMin30 == ktype )
  424. return "三十分钟线";
  425. else if( CKData::ktypeMin60 == ktype )
  426. return "六十分钟线";
  427. else
  428. return "未知";
  429. #endif
  430. return "";
  431. }
  432. CSPString AfxGetMaindataTypeString( int type )
  433. {
  434. #ifdef CLKLAN_ENGLISH_US
  435. if( CKData::mdtypeClose == type )
  436. return "Close Price";
  437. else if( CKData::mdtypeOpen == type )
  438. return "Open Price";
  439. else if( CKData::mdtypeAverage == type )
  440. return "Average Price";
  441. else
  442. return "Unknown";
  443. #else
  444. if( CKData::mdtypeClose == type )
  445. return "收盘价";
  446. else if( CKData::mdtypeOpen == type )
  447. return "开盘价";
  448. else if( CKData::mdtypeAverage == type )
  449. return "平均价";
  450. else
  451. return "未知";
  452. #endif
  453. return "";
  454. }
  455. //////////////////////////////////////////////////////////////////////////////////
  456. // 股票列表列名称字符串
  457. #ifdef CLKLAN_ENGLISH_US
  458. char slh_hdrday[] = "Day";
  459. char slh_avrcode[] = "AVR";
  460. char slh_avrname[] = "Average";
  461. char slh_wavrcode[] = "WAVR";
  462. char slh_wavrname[] = "Weight-Average";
  463. #else
  464. char slh_hdrday[] = "日";
  465. char slh_avrcode[] = "AVR";
  466. char slh_avrname[] = "平均值";
  467. char slh_wavrcode[] = "WAVR";
  468. char slh_wavrname[] = "加权平均";
  469. #endif
  470. CSPString AfxGetSLHTitle( UINT nSLH )
  471. {
  472. static CSPString slh_titles[SLH_MAX+1];
  473. SP_ASSERT( SLH_MAX >= 0 );
  474. if( slh_titles[0].GetLength() <= 0 )
  475. {
  476. // slh_titles
  477. slh_titles[SLH_NONE] = "SLHTitles";
  478. #ifdef CLKLAN_ENGLISH_US
  479. slh_titles[SLH_CODE] = "Code";
  480. slh_titles[SLH_NAME] = "Name";
  481. // 技术数据
  482. slh_titles[SLH_DATE] = "Trade Time";
  483. slh_titles[SLH_LASTCLOSE] = "Prev Close";
  484. slh_titles[SLH_OPEN] = "Open";
  485. slh_titles[SLH_CLOSE] = "Last Trade";
  486. slh_titles[SLH_HIGH] = "High";
  487. slh_titles[SLH_LOW] = "Low";
  488. slh_titles[SLH_AVERAGE] = "Average";
  489. slh_titles[SLH_DIFF] = "Change";
  490. slh_titles[SLH_DIFFPERCENT] = "Change(%)";
  491. slh_titles[SLH_SCOPE] = "Range(%)";
  492. slh_titles[SLH_VOLUME] = "Volume(100)";
  493. slh_titles[SLH_AMOUNT] = "Amount(1000)";
  494. slh_titles[SLH_VOLUP] = "Up Vol.";
  495. slh_titles[SLH_VOLDOWN] = "Down Vol.";
  496. slh_titles[SLH_DIFFPERCENT_MIN5] = "5-Minute Change(%)";
  497. slh_titles[SLH_SELLBUYRATIO] = "Consign Ratio(%)";
  498. slh_titles[SLH_SELLBUYDIFF] = "Consign Volume Difference";
  499. slh_titles[SLH_BUYPRICE3] = "Bid 3";
  500. slh_titles[SLH_BUYPRICE2] = "Bid 2";
  501. slh_titles[SLH_BUYPRICE1] = "Bid 1";
  502. slh_titles[SLH_SELLPRICE1] = "Ask 1";
  503. slh_titles[SLH_SELLPRICE2] = "Ask 2";
  504. slh_titles[SLH_SELLPRICE3] = "Ask 3";
  505. slh_titles[SLH_BUYVOLUME3] = "Bid Vol 3(100)";
  506. slh_titles[SLH_BUYVOLUME2] = "Bid Vol 2(100)";
  507. slh_titles[SLH_BUYVOLUME1] = "Bid Vol 1(100)";
  508. slh_titles[SLH_SELLVOLUME1] = "Ask Vol 1(100)";
  509. slh_titles[SLH_SELLVOLUME2] = "Ask Vol 2(100)";
  510. slh_titles[SLH_SELLVOLUME3] = "Ask Vol 3(100)";
  511. // 主要基本指标
  512. slh_titles[SLH_REPORTTYPE] = "Report Forms";
  513. slh_titles[SLH_PE] = "P/E";
  514. slh_titles[SLH_PNETASSET] = "P/B";
  515. slh_titles[SLH_PMAININCOME] = "P/S"; // "Market Capitalisation/Income";
  516. slh_titles[SLH_RATIO_PCASH] = "Price/Cash";
  517. slh_titles[SLH_RATIO_CURRENCY] = "Currency Percent(%)";
  518. slh_titles[SLH_RATIO_CHANGEHAND] = "Change hands Percent(%)";
  519. slh_titles[SLH_RATIO_VOLUME] = "Volume Ratio";
  520. slh_titles[SLH_RS] = "Relative Strength";
  521. slh_titles[SLH_MARKETVALUE] = "Market Capitalisation(10000)";
  522. slh_titles[SLH_MARKETVALUEA] = "A Market Capitalisation(10000)";
  523. slh_titles[SLH_MARKETVALUEB] = "B Market Capitalisation(10000)";
  524. // ★偿债能力
  525. slh_titles[SLH_RATIO_LIQUIDITY] = "Liquidity Ratio";
  526. slh_titles[SLH_RATIO_QUICK] = "Quickassets Ratio";
  527. slh_titles[SLH_VELOCITY_RECEIVABLES]= "Receivables Velocity";
  528. // ★经营能力
  529. slh_titles[SLH_VELOCITY_MERCHANDISE]= "Merchandise Velocity";
  530. slh_titles[SLH_MAIN_INCOME] = "Income(10000)";
  531. slh_titles[SLH_CASH_PS] = "Cash per share";
  532. // ★盈利能力
  533. slh_titles[SLH_PROFIT_MARGIN] = "Profit Margin(%)";
  534. slh_titles[SLH_NETASSET_YIELD] = "Return On Equity(%)";
  535. // ★资本结构
  536. slh_titles[SLH_DATE_BEGIN] = "IPO Date";
  537. slh_titles[SLH_SHARE_COUNT_TOTAL] = "Total Shares(10000)";
  538. slh_titles[SLH_SHARE_COUNT_A] = "Issued Shares A(10000)";
  539. slh_titles[SLH_SHARE_COUNT_B] = "Issued Shares B(10000)";
  540. slh_titles[SLH_SHARE_COUNT_H] = "Issued Shares H(10000)";
  541. slh_titles[SLH_SHARE_COUNT_NATIONAL]= "National Shares(10000)";
  542. slh_titles[SLH_SHARE_COUNT_CORP] = "Corporation Shares(10000)";
  543. slh_titles[SLH_PROFIT_PSUD] = "Not Assigned Profit per Share";
  544. slh_titles[SLH_ASSET] = "Total Asset(10000)";
  545. slh_titles[SLH_RATIO_HOLDERRIGHT] = "Shareholders Rights Ratio(%)";
  546. slh_titles[SLH_RATIO_LONGDEBT] = "Long Debt Ratio(%)";
  547. slh_titles[SLH_RATIO_DEBT] = "Debt Ratio(%)";
  548. // ★投资收益能力
  549. slh_titles[SLH_NETASSET_PS] = "Net Asset per Share";
  550. slh_titles[SLH_NETASSET_PS_REGULATE]= "Net Asset per Share Regulated";
  551. slh_titles[SLH_EPS] = "EPS"; // "Earnings per Share";
  552. slh_titles[SLH_EPS_DEDUCT] = "EPS Deducted"; // "Earnings per Share Deducted";
  553. slh_titles[SLH_NET_PROFIT] = "Net Profit/Loss(10000)";
  554. slh_titles[SLH_MAIN_PROFIT] = "Main Profit/Loss(10000)";
  555. slh_titles[SLH_TOTAL_PROFIT] = "Total Profit/Loss(10000)";
  556. slh_titles[SLH_PROFIT_INC] = "Profit Increase(%)";
  557. slh_titles[SLH_INCOME_INC] = "Income Increase(%)";
  558. slh_titles[SLH_ASSET_INC] = "Asset Increase(%)";
  559. slh_titles[SLH_ANNGAINS_AVERAGE] = "Average Ann-Gains(%)";
  560. slh_titles[SLH_ANNGAINS_STDDEV] = "Ann-Gains Standard Deviation(%)";
  561. slh_titles[SLH_BETA] = "Beta";
  562. slh_titles[SLH_SHARP] = "Sharp Venture";
  563. slh_titles[SLH_TRADE] = "Business Classification";
  564. slh_titles[SLH_PROVINCE] = "Province";
  565. #else
  566. slh_titles[SLH_CODE] = "代码";
  567. slh_titles[SLH_NAME] = "名称";
  568. // 技术数据
  569. slh_titles[SLH_DATE] = "日期";
  570. slh_titles[SLH_LASTCLOSE] = "昨收";
  571. slh_titles[SLH_OPEN] = "开盘价";
  572. slh_titles[SLH_CLOSE] = "现价";
  573. slh_titles[SLH_HIGH] = "最高价";
  574. slh_titles[SLH_LOW] = "最低价";
  575. slh_titles[SLH_AVERAGE] = "均价";
  576. slh_titles[SLH_DIFF] = "涨跌";
  577. slh_titles[SLH_DIFFPERCENT] = "涨幅%";
  578. slh_titles[SLH_SCOPE] = "震幅%";
  579. slh_titles[SLH_VOLUME] = "成交量(手)";
  580. slh_titles[SLH_AMOUNT] = "成交额(千元)";
  581. slh_titles[SLH_VOLUP] = "外盘";
  582. slh_titles[SLH_VOLDOWN] = "内盘";
  583. slh_titles[SLH_DIFFPERCENT_MIN5] = "五分钟涨幅%";
  584. slh_titles[SLH_SELLBUYRATIO] = "委比%";
  585. slh_titles[SLH_SELLBUYDIFF] = "委量差";
  586. slh_titles[SLH_BUYPRICE3] = "买价三";
  587. slh_titles[SLH_BUYPRICE2] = "买价二";
  588. slh_titles[SLH_BUYPRICE1] = "买价一";
  589. slh_titles[SLH_SELLPRICE1] = "卖价一";
  590. slh_titles[SLH_SELLPRICE2] = "卖价二";
  591. slh_titles[SLH_SELLPRICE3] = "卖价三";
  592. slh_titles[SLH_BUYVOLUME3] = "买量三";
  593. slh_titles[SLH_BUYVOLUME2] = "买量二";
  594. slh_titles[SLH_BUYVOLUME1] = "买量一";
  595. slh_titles[SLH_SELLVOLUME1] = "卖量一";
  596. slh_titles[SLH_SELLVOLUME2] = "卖量二";
  597. slh_titles[SLH_SELLVOLUME3] = "卖量三";
  598. // 主要基本指标
  599. slh_titles[SLH_REPORTTYPE] = "报表类型";
  600. slh_titles[SLH_PE] = "市盈率";
  601. slh_titles[SLH_PNETASSET] = "市净率";
  602. slh_titles[SLH_PMAININCOME] = "市销率";
  603. slh_titles[SLH_RATIO_PCASH] = "价格净现金比";
  604. slh_titles[SLH_RATIO_CURRENCY] = "流通率%";
  605. slh_titles[SLH_RATIO_CHANGEHAND] = "换手率%";
  606. slh_titles[SLH_RATIO_VOLUME] = "量比";
  607. slh_titles[SLH_RS] = "相对强度";
  608. slh_titles[SLH_MARKETVALUE] = "总市值-万";
  609. slh_titles[SLH_MARKETVALUEA] = "A股市值-万";
  610. slh_titles[SLH_MARKETVALUEB] = "B股市值-万";
  611. // ★偿债能力
  612. slh_titles[SLH_RATIO_LIQUIDITY] = "流动比率";
  613. slh_titles[SLH_RATIO_QUICK] = "速动比率";
  614. slh_titles[SLH_VELOCITY_RECEIVABLES]= "应收账款周率";
  615. // ★经营能力
  616. slh_titles[SLH_VELOCITY_MERCHANDISE]= "存货周转率";
  617. slh_titles[SLH_MAIN_INCOME] = "主营收入-万";
  618. slh_titles[SLH_CASH_PS] = "每股净现金";
  619. // ★盈利能力
  620. slh_titles[SLH_PROFIT_MARGIN] = "主营利润率%";
  621. slh_titles[SLH_NETASSET_YIELD] = "净资产收益率%";
  622. // ★资本结构
  623. slh_titles[SLH_DATE_BEGIN] = "上市日期";
  624. slh_titles[SLH_SHARE_COUNT_TOTAL] = "总股本-万";
  625. slh_titles[SLH_SHARE_COUNT_A] = "A股-万";
  626. slh_titles[SLH_SHARE_COUNT_B] = "B股-万";
  627. slh_titles[SLH_SHARE_COUNT_H] = "H股-万";
  628. slh_titles[SLH_SHARE_COUNT_NATIONAL]= "国有股-万";
  629. slh_titles[SLH_SHARE_COUNT_CORP] = "法人股-万";
  630. slh_titles[SLH_PROFIT_PSUD] = "每股未分利润";
  631. slh_titles[SLH_ASSET] = "总资产-万";
  632. slh_titles[SLH_RATIO_HOLDERRIGHT] = "股东权益比%";
  633. slh_titles[SLH_RATIO_LONGDEBT] = "长期负债率%";
  634. slh_titles[SLH_RATIO_DEBT] = "资产负债率%";
  635. // ★投资收益能力
  636. slh_titles[SLH_NETASSET_PS] = "每股净资产";
  637. slh_titles[SLH_NETASSET_PS_REGULATE]= "调整每股净资产";
  638. slh_titles[SLH_EPS] = "每股收益";
  639. slh_titles[SLH_EPS_DEDUCT] = "扣除每股收益";
  640. slh_titles[SLH_NET_PROFIT] = "净利润-万";
  641. slh_titles[SLH_MAIN_PROFIT] = "主营业务利润-万";
  642. slh_titles[SLH_TOTAL_PROFIT] = "利润总额-万";
  643. slh_titles[SLH_PROFIT_INC] = "主营利润增长率%";
  644. slh_titles[SLH_INCOME_INC] = "收入增长率%";
  645. slh_titles[SLH_ASSET_INC] = "总资产增长率%";
  646. slh_titles[SLH_ANNGAINS_AVERAGE] = "年平均收益率%";
  647. slh_titles[SLH_ANNGAINS_STDDEV] = "收益标准差%";
  648. slh_titles[SLH_BETA] = "β值";
  649. slh_titles[SLH_SHARP] = "夏普风险指数";
  650. slh_titles[SLH_TRADE] = "行业";
  651. slh_titles[SLH_PROVINCE] = "省份";
  652. #endif
  653. }
  654. if( nSLH >= SLH_MIN && nSLH <= SLH_MAX )
  655. {
  656. return slh_titles[nSLH];
  657. }
  658. return "";
  659. }
  660. CSPString AfxGetSLHDescript( UINT nSLH )
  661. {
  662. static CSPString slh_descripts[SLH_MAX+1];
  663. SP_ASSERT( SLH_MAX >= 0 );
  664. if( slh_descripts[0].GetLength() <= 0 )
  665. {
  666. // slh_descripts
  667. #ifdef CLKLAN_ENGLISH_US
  668. slh_descripts[SLH_PE] = "Ratio of Price and Earnings per Share";
  669. slh_descripts[SLH_PNETASSET] = "Ratio of Price and Net Asset per Share";
  670. slh_descripts[SLH_PMAININCOME] = "Ratio of Market Capitalisation and Income";
  671. slh_descripts[SLH_RATIO_PCASH] = "Ratio of Price and Cash per Share";
  672. slh_descripts[SLH_RS] = "Ratio of Rising and Falling in n Days";
  673. slh_descripts[SLH_ANNGAINS_AVERAGE]="Average Ann-Gains";
  674. slh_descripts[SLH_ANNGAINS_STDDEV]= "Ann-Gains Standard Deviation";
  675. slh_descripts[SLH_BETA] = "Correlation with Indicator";
  676. slh_descripts[SLH_SHARP] = "Ratio of Ann-Gains and Ann-Gains' Standard Deviation";
  677. #else
  678. slh_descripts[SLH_PE] = "每股价格比每股收益";
  679. slh_descripts[SLH_PNETASSET] = "每股价格比每股净资产";
  680. slh_descripts[SLH_PMAININCOME] = "总市值比主营收入";
  681. slh_descripts[SLH_RATIO_PCASH] = "每股价格比每股净现金";
  682. slh_descripts[SLH_RS] = "n日内涨幅与跌幅之比";
  683. slh_descripts[SLH_ANNGAINS_AVERAGE]="投资该股票年收益率";
  684. slh_descripts[SLH_ANNGAINS_STDDEV]= "年收益率的标准差";
  685. slh_descripts[SLH_BETA] = "表示与大盘相关性";
  686. slh_descripts[SLH_SHARP] = "年收益率比标准差";
  687. #endif
  688. }
  689. if( nSLH >= SLH_MIN && nSLH <= SLH_MAX )
  690. {
  691. return slh_descripts[nSLH];
  692. }
  693. return "";
  694. }
  695. //////////////////////////////////////////////////////////////////////////////////
  696. // 表达式错误提示字符串
  697. #ifdef CLKLAN_ENGLISH_US
  698. char express_errparserstack[] = "Expression: Expression is too long and stack overflow.";
  699. char express_errbadrange[] = "Expression: Value is out of range.";
  700. char express_errexpression[] = "Expression: Strings error.";
  701. char express_erroperator[] = "Expression: Operator Sign error.";
  702. char express_erropenparen[] = "Expression: Open parenthesis error.";
  703. char express_errcloseparen[] = "Expression: Close parenthesis error.";
  704. char express_errinvalidnum[] = "Expression: Invalid number.";
  705. char express_errmath[] = "Expression: Mathematical error.";
  706. char express_errunknown[] = "Expression: Unknown.";
  707. #else
  708. char express_errparserstack[] = "表达式:表达式太长,栈溢出。";
  709. char express_errbadrange[] = "表达式:数值超出范围。";
  710. char express_errexpression[] = "表达式:字符串出现错误。";
  711. char express_erroperator[] = "表达式:操作符出现错误。";
  712. char express_erropenparen[] = "表达式:左括号出现错误。";
  713. char express_errcloseparen[] = "表达式:右括号出现错误。";
  714. char express_errinvalidnum[] = "表达式:非法数字。";
  715. char express_errmath[] = "表达式:数学计算出现错误。";
  716. char express_errunknown[] = "表达式:未知错误。";
  717. #endif
  718. //////////////////////////////////////////////////////////////////////////////////
  719. // 股票板块字符串
  720. #ifdef CLKLAN_ENGLISH_US
  721. char domain_self[] = "Favorites";
  722. #else
  723. char domain_self[] = "自选股";
  724. #endif
  725. //////////////////////////////////////////////////////////////////////////////////
  726. // 界面配色方案字符串
  727. #ifdef CLKLAN_ENGLISH_US
  728. char colorclass_standard[] = "Standard color schemes";
  729. char colorclass_byzantinesque[] = "Byzantinesque color schemes";
  730. char colorclass_gothic[] = "Gothic color schemes";
  731. char colorclass_baroque[] = "Barococo color schemes";
  732. #else
  733. char colorclass_standard[] = "传统式配色方案";
  734. char colorclass_byzantinesque[] = "拜占庭式配色方案";
  735. char colorclass_gothic[] = "哥特式配色方案";
  736. char colorclass_baroque[] = "巴洛克式配色方案";
  737. #endif
  738. //////////////////////////////////////////////////////////////////////////////////
  739. // 服务器说明、技术支持
  740. #ifdef CLKLAN_ENGLISH_US
  741. char sz_mainserverinfo[] = "Main Server";
  742. char sz_mailsubjectsupport[] = "Support";
  743. #else
  744. char sz_mainserverinfo[] = "主服务器";
  745. char sz_mailsubjectsupport[] = "技术支持";
  746. #endif
  747. //////////////////////////////////////////////////////////////////////////////////
  748. // 周
  749. #ifdef CLKLAN_ENGLISH_US
  750. char sz_sunday[] = "Sunday";
  751. char sz_monday[] = "Monday";
  752. char sz_tuesday[] = "Tuesday";
  753. char sz_wednesday[] = "Wednesday";
  754. char sz_thursday[] = "Thursday";
  755. char sz_friday[] = "Friday";
  756. char sz_saturday[] = "Saturday";
  757. #else
  758. char sz_sunday[] = "星期日";
  759. char sz_monday[] = "星期一";
  760. char sz_tuesday[] = "星期二";
  761. char sz_wednesday[] = "星期三";
  762. char sz_thursday[] = "星期四";
  763. char sz_friday[] = "星期五";
  764. char sz_saturday[] = "星期六";
  765. #endif
  766. //////////////////////////////////////////////////////////////////////////////////
  767. // 报表类型
  768. #ifdef CLKLAN_ENGLISH_US
  769. char sz_reportQuarter[] = "1st quarter";
  770. char sz_reportMid[] = "midyear";
  771. char sz_reportQuarter3[] = "3rd quarter";
  772. char sz_reportAnnals[] = "annals";
  773. #else
  774. char sz_reportQuarter[] = "第一季度季报";
  775. char sz_reportMid[] = "中报";
  776. char sz_reportQuarter3[] = "第三季度季报";
  777. char sz_reportAnnals[] = "年报";
  778. #endif
  779. //////////////////////////////////////////////////////////////////////////////////
  780. // 数据字符串
  781. #ifdef CLKLAN_ENGLISH_US
  782. char db_errcreateselfdb[] = "Fail to create file, reinstall this software, please.";
  783. char db_errrootpath[] = "Fail to initialize data, reinstall this software, please.";
  784. char db_errqianlongpath[] = "Fail to read referred QianLong data source.";
  785. #else
  786. char db_errcreateselfdb[] = "创建数据文件失败,请重新安装本软件,或者与软件供应商联系";
  787. char db_errrootpath[] = "初始化数据失败,请重新安装本软件,或者与软件供应商联系";
  788. char db_errqianlongpath[] = "读取指定的钱龙数据源失败。";
  789. #endif
  790. //////////////////////////////////////////////////////////////////////////////////
  791. // 策略字符串
  792. #ifdef CLKLAN_ENGLISH_US
  793. char strategy_logicand[] = "All";
  794. char strategy_logicor[] = "Any";
  795. char strategy_sdonce[] = "Full";
  796. char strategy_sdtwice[] = "Half";
  797. char strategy_sdthird[] = "One-third";
  798. char strategy_sdforth[] = "Quarter";
  799. char strategy_sdfifth[] = "One-fifth";
  800. char strategy_sdsixth[] = "One-sixth";
  801. char strategy_sdseventh[] = "One-seventh";
  802. char strategy_sdeighth[] = "One-eighth";
  803. char strategy_sdninth[] = "One-ninth";
  804. char strategy_sdtenth[] = "One-tenth";
  805. char strategy_noselectedstock[] = "there is no selected stock.";
  806. char strategy_noselectedtech[] = "there is no selected indicator.";
  807. char strategy_optype_buy[] = "Buy";
  808. char strategy_optype_sell[] = "Sell";
  809. char strategy_optype_addstock[] = "Add Stock";
  810. char strategy_optype_removestock[] = "Remove Stock";
  811. char strategy_optype_addcash[] = "Add Cash";
  812. char strategy_optype_removecash[] = "Reduce Cash";
  813. char strategy_errfile[] = "File type is not coincident, the file is not strategy file.";
  814. char strategy_errfilever[] = "File version is not supported, please upgrade this software.";
  815. #else
  816. char strategy_logicand[] = "全部";
  817. char strategy_logicor[] = "任意一个";
  818. char strategy_sdonce[] = "全仓";
  819. char strategy_sdtwice[] = "半仓";
  820. char strategy_sdthird[] = "三分之一仓";
  821. char strategy_sdforth[] = "四分之一仓";
  822. char strategy_sdfifth[] = "五分之一仓";
  823. char strategy_sdsixth[] = "六分之一仓";
  824. char strategy_sdseventh[] = "七分之一仓";
  825. char strategy_sdeighth[] = "八分之一仓";
  826. char strategy_sdninth[] = "九分之一仓";
  827. char strategy_sdtenth[] = "十分之一仓";
  828. char strategy_noselectedstock[] = "没有选中股票";
  829. char strategy_noselectedtech[] = "没有选中指标";
  830. char strategy_optype_buy[] = "买入";
  831. char strategy_optype_sell[] = "卖出";
  832. char strategy_optype_addstock[] = "增加股票";
  833. char strategy_optype_removestock[] = "减少股票";
  834. char strategy_optype_addcash[] = "增加现金";
  835. char strategy_optype_removecash[] = "减少现金";
  836. char strategy_errfile[] = "文件类型不符,指定文件不是策略文件。";
  837. char strategy_errfilever[] = "错误的文件版本:请升级软件,以便可以读取高版本的策略文件。";
  838. #endif
  839. //////////////////////////////////////////////////////////////////////////////////
  840. // 快捷键
  841. // 给定快捷键唯一编号,返回快捷键及其中文名称
  842. CSPString AfxGetAccelerator( UINT nAcce, int nCharLeft )
  843. {
  844. static CSPString acce_names[ACCE_MAX+1];
  845. SP_ASSERT( ACCE_MAX >= 0 );
  846. if( acce_names[0].GetLength() <= 0 )
  847. {
  848. // acce_names
  849. acce_names[0] = "ACCENames";
  850. #ifdef CLKLAN_ENGLISH_US
  851. // 快捷键
  852. acce_names[ACCE_01] = "01      Hot Key F1";
  853. acce_names[ACCE_02] = "02      Hot Key F2";
  854. acce_names[ACCE_03] = "03      Hot Key F3";
  855. acce_names[ACCE_04] = "04      Hot Key F4";
  856. acce_names[ACCE_05] = "05      Hot Key F5";
  857. acce_names[ACCE_06] = "06      Hot Key F6";
  858. acce_names[ACCE_07] = "07      Hot Key F7";
  859. acce_names[ACCE_08] = "08      Hot Key F8";
  860. acce_names[ACCE_09] = "09      Hot Key F9";
  861. acce_names[ACCE_10] = "10      Hot Key F10";
  862. acce_names[ACCE_1] = "1       Shanghai A Shares List";
  863. acce_names[ACCE_2] = "2       Shanghai B Shares List";
  864. acce_names[ACCE_3] = "3       Shenzhen A Shares List";
  865. acce_names[ACCE_4] = "4       Shenzhen B Shares List";
  866. acce_names[ACCE_5] = "5       Shanghai Bond List";
  867. acce_names[ACCE_6] = "6       Shenzhen Bond List";
  868. acce_names[ACCE_61] = "61      Shanghai A Shares Change";
  869. acce_names[ACCE_62] = "62      Shanghai B Shares Change";
  870. acce_names[ACCE_63] = "63      Shenzhen A Shares Change";
  871. acce_names[ACCE_64] = "64      Shenzhen B Shares Change";
  872. acce_names[ACCE_65] = "65      Shanghai Bond Change";
  873. acce_names[ACCE_66] = "66      Shenzhen Bond Change";
  874. acce_names[ACCE_71] = "71      Shanghai Info.";
  875. acce_names[ACCE_72] = "72      Shenzhen Info.";
  876. acce_names[ACCE_73] = "73      Stockjobber Info.";
  877. acce_names[ACCE_81] = "81      Shanghai A Shares Sort";
  878. acce_names[ACCE_82] = "82      Shanghai B Shares Sort";
  879. acce_names[ACCE_83] = "83      Shenzhen A Shares Sort";
  880. acce_names[ACCE_84] = "84      Shenzhen B Shares Sort";
  881. acce_names[ACCE_85] = "85      Shanghai Bond Sort";
  882. acce_names[ACCE_86] = "86      Shenzhen Bond Sort";
  883. acce_names[ACCE_LBDK] = "LBDK    Volume Ratio";
  884. acce_names[ACCE_MMLD] = "MMLD    Consign Ratio";
  885. #else
  886. // 快捷键
  887. acce_names[ACCE_01] = "01      热键F1";
  888. acce_names[ACCE_02] = "02      热键F2";
  889. acce_names[ACCE_03] = "03      热键F3";
  890. acce_names[ACCE_04] = "04      热键F4";
  891. acce_names[ACCE_05] = "05      热键F5";
  892. acce_names[ACCE_06] = "06      热键F6";
  893. acce_names[ACCE_07] = "07      热键F7";
  894. acce_names[ACCE_08] = "08      热键F8";
  895. acce_names[ACCE_09] = "09      热键F9";
  896. acce_names[ACCE_10] = "10      热键F10";
  897. acce_names[ACCE_1] = "1       上A报价";
  898. acce_names[ACCE_2] = "2       上B报价";
  899. acce_names[ACCE_3] = "3       深A报价";
  900. acce_names[ACCE_4] = "4       深B报价";
  901. acce_names[ACCE_5] = "5       上债报价";
  902. acce_names[ACCE_6] = "6       深债报价";
  903. acce_names[ACCE_61] = "61      上A涨跌";
  904. acce_names[ACCE_62] = "62      上B涨跌";
  905. acce_names[ACCE_63] = "63      深A涨跌";
  906. acce_names[ACCE_64] = "64      深B涨跌";
  907. acce_names[ACCE_65] = "65      上债涨跌";
  908. acce_names[ACCE_66] = "66      深债涨跌";
  909. acce_names[ACCE_71] = "71      上证信息";
  910. acce_names[ACCE_72] = "72      深证信息";
  911. acce_names[ACCE_73] = "73      券商信息";
  912. acce_names[ACCE_81] = "81      上A综合";
  913. acce_names[ACCE_82] = "82      上B综合";
  914. acce_names[ACCE_83] = "83      深A综合";
  915. acce_names[ACCE_84] = "84      深B综合";
  916. acce_names[ACCE_85] = "85      上债综合";
  917. acce_names[ACCE_86] = "86      深债综合";
  918. acce_names[ACCE_LBDK] = "LBDK    量比(多空)";
  919. acce_names[ACCE_MMLD] = "MMLD    买卖力道(涨跌率)";
  920. #endif
  921. }
  922. if( nAcce >= ACCE_MIN && nAcce <= ACCE_MAX )
  923. {
  924. if( 8 == nCharLeft )
  925. return acce_names[nAcce];
  926. CSPString strResult = acce_names[nAcce];
  927. int nIndex = strResult.Find( ' ' );
  928. if( -1 != nIndex )
  929. strResult = strResult.Left(nIndex) + strResult.Mid(8);
  930. return strResult;
  931. }
  932. return "";
  933. }
  934. //////////////////////////////////////////////////////////////////////////////////
  935. // 国家或地区
  936. void AfxGetAllDistrict( CSPStringArray & astr )
  937. {
  938. #ifdef CLKLAN_ENGLISH_US
  939. astr.SetSize( 0, 30 );
  940. astr.Add( "Australia & NZ" );
  941. astr.Add( "Argentina" );
  942. astr.Add( "Brazil" );
  943. astr.Add( "Canada" );
  944. astr.Add( "China" );
  945. astr.Add( "Denmark" );
  946. astr.Add( "France" );
  947. astr.Add( "Germany" );
  948. astr.Add( "Hong Kong" );
  949. astr.Add( "India" );
  950. astr.Add( "Italy" );
  951. astr.Add( "Japan" );
  952. astr.Add( "Korea" );
  953. astr.Add( "Mexico" );
  954. astr.Add( "Norway" );
  955. astr.Add( "Singapore" );
  956. astr.Add( "Spain" );
  957. astr.Add( "Sweden" );
  958. astr.Add( "Taiwan" );
  959. astr.Add( "UK & Ireland" );
  960. astr.Add( "U.S." );
  961. astr.Add( "Other" );
  962. #else
  963. astr.SetSize( 0, 30 );
  964. astr.Add( "澳大利亚" );
  965. astr.Add( "阿根廷" );
  966. astr.Add( "巴西" );
  967. astr.Add( "加拿大" );
  968. astr.Add( "中国" );
  969. astr.Add( "丹麦" );
  970. astr.Add( "法国" );
  971. astr.Add( "德国" );
  972. astr.Add( "中国香港" );
  973. astr.Add( "印度" );
  974. astr.Add( "意大利" );
  975. astr.Add( "日本" );
  976. astr.Add( "韩国" );
  977. astr.Add( "墨西哥" );
  978. astr.Add( "挪威" );
  979. astr.Add( "新加坡" );
  980. astr.Add( "西班牙" );
  981. astr.Add( "瑞典" );
  982. astr.Add( "中国台湾" );
  983. astr.Add( "英国" );
  984. astr.Add( "美国" );
  985. astr.Add( "其他" );
  986. #endif
  987. }
  988. //////////////////////////////////////////////////////////////////////////////////
  989. // 简单翻译
  990. #define CHS_ENU_MAX_WORDS 32
  991. typedef struct chs_enu_pair_t {
  992. char chs[CHS_ENU_MAX_WORDS];
  993. char enu[CHS_ENU_MAX_WORDS];
  994. }CHS_ENU_PAIR;
  995. CSPString AfxFaintlyChsToEnu( const char * szCh )
  996. {
  997. static CHS_ENU_PAIR chs_enu_pairs[] = {
  998. { "中国", " China " },
  999. { "指数", " Index " },
  1000. { "上证", " Shanghai " },
  1001. { "深证", " Shenzhen " },
  1002. { "基金", " Fund " },
  1003. { "国债", " Bond " },
  1004. { "债券", " Bond " },
  1005. { "转债", " Convertible Bond " },
  1006. { "银行", " Bank " },
  1007. { "其他", " Other " },
  1008. { "银行业", " Bank " },
  1009. { "", "" },
  1010. };
  1011. CSPString sResult = szCh;
  1012. int i = 0;
  1013. while( * chs_enu_pairs[i].chs )
  1014. {
  1015. sResult.Replace( chs_enu_pairs[i].chs, chs_enu_pairs[i].enu );
  1016. i ++;
  1017. }
  1018. sResult.TrimLeft();
  1019. sResult.TrimRight();
  1020. return sResult;
  1021. }