1.股票通用的辅助画线工具都有什么?
2.lcc币合法吗
3.Lccwin32 C CompilerçLccwin32 C Compiler使ç¨ä»ç»
4.通信达公式问题,超强组合指标公式,谁可以解释一下。我看不明白,java游戏魔塔源码源代码如下
股票通用的辅助画线工具都有什么?
通达信黄金分割压力和支撑画线主图指标公式,演示在源码下面网址里.
N1:=;
N2:=;
N3:=5;
AA:=REF(H,N1)=HHV(H,2*N1+1);
QY:=BACKSET(AA,N1+1);
CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{ 顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
{ DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLORFF,POINTDOT,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT,LINETHICK2;}
AA1:=REF(L,N1)=LLV(L,2*N1+1);
QY1:=BACKSET(AA1,N1+1);
CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
{ DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORFF,POINTDOT,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORYELLOW,POINTDOT,LINETHICK2;}
LAA:=REF(H,N2)=HHV(H,2*N2+1);
LQY:=BACKSET(LAA,N2+1);
LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);
LDDD:=BARSLAST(LCC);
LGDTS:=IF(LCC,CURRBARSCOUNT,0);
LDINGBU:=IF(LDDD,REF(H,LDDD),H);{ 顶部}
LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);
LDINGBU1:=REF(LDINGBU,LDDD+1);
LGDCS1:=CONST(LDINGBUTS);
LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);
LGDCS2:=CONST(LDINGBUTS1);
LDINGBU2:=REF(LDINGBU1,LDDD+1);
LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);
{ DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1),COLORFF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),COLORYELLOW,POINTDOT;}
LAA1:=REF(L,N2)=LLV(L,2*N2+1);
LQY1:=BACKSET(LAA1,N2+1);
LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);
LDD1:=BARSLAST(LCC1);
LDDTS:=IF(LCC1,CURRBARSCOUNT,0);
LYDB:=IF(LDD1,REF(L,LDD1),L);
LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);
LDDCS1:=CONST(LDDTS1);
LZDB:=REF(LYDB,LDD1+1);
LDDTS2:=REF(LDDTS1,DD1+1);
LDDCS2:=CONST(LDDTS2);
DDYL2:=DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE;
DDZC2:=DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE;
ZGSTAR:=(DDYL2+DDZC2)/2;
ZGEND:=CONST((DDYL2+DDZC2)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
LLAA:=REF(H,N3)=HHV(H,2*N3+1);
LLQY:=BACKSET(LLAA,N3+1);
LLCC:=FILTER(LLQY,N3) AND H=HHV(H,N3+1);
LLDDD:=BARSLAST(LLCC);
LLGDTS:=IF(LLCC,CURRBARSCOUNT,0);
LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{ 顶部}
LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);
LLDINGBU1:=REF(LLDINGBU,LLDDD+1);
LLGDCS1:=CONST(LLDINGBUTS);
LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);
LLGDCS2:=CONST(LLDINGBUTS1);
LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);
LLMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);
{ DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1),COLORFF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1),COLORYELLOW,POINTDOT;}
LLAA1:=REF(L,N3)=LLV(L,2*N3+1);
LLQY1:=BACKSET(LLAA1,N3+1);
LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);
LLDD1:=BARSLAST(LCC1);
LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);
LLYDB:=IF(LLDD1,REF(L,LLDD1),L);
LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);
LLDDCS1:=CONST(LLDDTS1);
LLZDB:=REF(LLYDB,LLDD1+1);
LLDDTS2:=REF(LLDDTS1,DD1+1);
LLDDCS2:=CONST(LLDDTS2);
GDYL3:=DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORYELLOW;
DDZC3:=DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORYELLOW;
LZGSTAR:=(GDYL3+DDZC3)/2;
LZGEND:=CONST((GDYL3+DDZC3)/2);
LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);
GDYL1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED;
DDZC1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED;
长线压力:DDZC1+(GDYL1-DDZC1)*0.,COLORRED;
长线支撑:DDZC1+(GDYL1-DDZC1)*0.,COLORRED;
中线压力:DDZC2+(DDYL2-DDZC2)*0.,COLORGREEN;
中线支撑:DDZC2+(DDYL2-DDZC2)*0.,COLORGREEN;
短线压力:DDZC3+ (GDYL3-DDZC3)*0.,COLORBLUE;
短线支撑:DDZC3+(GDYL3-DDZC3)*0.,COLORBLUE;
L中轨:DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBAR,LZGEND,1),COLORYELLOW;
中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORWHITE;
长GDYL:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED,POINTDOT;
长DDZC:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,POINTDOT;
中DDYL:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE,POINTDOT;
中DDZC:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE,POINTDOT;
短GDYL:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORYELLOW,POINTDOT;
短DDZC:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORYELLOW,POINTDOT;
lcc币合法吗
你上网搜下《互联网传销识别指南(版)》里面有很好的解释~~~~
虚拟货币本身是开源程序,在Github社区维护。源码偏移码其总量限制的参数和方式,均显示在开源代码中。而传销货币的开源是完全抄袭别人的开源代码,且没有使用开源代码来搭建程序,所以其本质跟Q币一样是可受网站控制的。
(4)是否给出源代码链接。一般的槽函数源码去中心化数字货币都会在官网的显要位置给出源代码的链接,这样做是为了公开透明地展示货币系统的运作机制。而传销货币重点宣传的是充值购买交易流程,并不提及其运作机制,axure载入源码甚至网站都没有源代码的链接地址。
Lccwin C CompilerçLccwin C Compiler使ç¨ä»ç»
声ææ¬æ没æä»»ä½æç¡®çæè å«èç表达说ææ¬ææ¯å®å ¨æ£ç¡®çï¼å¯¹äºåºç¨æ¬æå 容æ
产ççä»»ä½ç»æï¼æ¬äººæ¦ä¸è´è´£ã
请åè° æ¬æå¨è¯è¨åè¯æ³ççè¿ç¨ä¸çé误ï¼æ¬äººæçå¦æµ ï¼è¿æ¯ä¸å¯é¿å çã
ç®å½
* ç®ä»
* ç¼è¯å¨çå®è£
* Lcc-Winçä¸äºåºæ¬æ¦å¿µ
* å个å°ç¨åºï¼
* 使ç¨å·¥ç¨ç®¡ç
* 第ä¸ä¸ªWindowsç¨åº
* ç¨åºçæå导
* 使ç¨WeditReså建èµæº
* æ·»å å ¶å®ç±»åçèµæº
* 使ç¨éè§æ ¼èµæº
* éæåºåå¨æåº
ç®ä»
å ¶å®æè°çç®ä»è¿ä¸ªé¨åçå 容è¶ååå³äºä½è ãä½æ¯ææ读è¿çä¸äºæåé½æ¯ç±ä¸ä¸ªâç®ä»âå¼å§çï¼è¿é¨åçå 容é常é½æ¯å¨éå¤è¯»è ä¼å¨ä¸é¢çå°çä¸è¥¿ï¼ä½æ¯ä¹æçç®ä»åªæ¯ä½è çä¸äºæ³æ³ãä»ç»çæ³ä¸ä¸ï¼å ¶å®è¿ä¸ªä»ç»å¹¶ä¸æ¯ä¸ä»¶ç®åçäºæ ãé¦å ï¼å¦æä½ è¦æ¯å¼é¨è§å±±çç´å¥ä¸»é¢ï¼è¿æ¯ä¸ç¤¼è²çï¼èä¸åºäºwebçæåä¹ä¸åºè¯¥æè¶ å¤§ä¸ªçç®ä»ï¼ä¸åºè¯¥è®©è¯»è å¨è¿ä¸ªä¸è¥¿ä¸æµªè´¹æ¶é´åéé±ãçæ¥æçåºè¯ä¹å¤å¤çäºï¼è®©æ们åå ¥æ£é¢ãè¿ä¸ªæåæ¯å页çï¼å»ºè®®ä½ çæµè§å¨ä¸è½½å®æ¯åä¿åä¸ä»½æ·è´æ¥ç¦»çº¿é 读ã
ç¼è¯å¨çå®è£
ç¼è¯å¨çå®è£ ç®åæäºï¼åªè¦ææ¨ä¸è½½çæ件è¿è¡ä¸ä¸å°±OKäºï¼åºè¯¥ä¸ä¼éå°ä»ä¹
é®é¢ãä½æ¯æ³¨æå®è£ çæåè¦ç¼è¯åºæ件ï¼å¯è½è¦è±ç¹æ¶é´ï¼è¦è§ä½ çæºå¨é度èå®ã
Lcc-Winçä¸äºåºæ¬æ¦å¿µ
Lcc-Winç¼è¯ç³»ç»æ¯ç±å¤ä¸ªæ件ææçãå®ä»¬çå ±åçä»»å¡æ¯æææ¬æ ¼å¼çæºä»£
ç ç¼è¯ä½å¯ä»¥è¿è¡çäºè¿å¶æ ¼å¼ãä¼è¯ä¸ªéè¦çæ件åå«æ¯ç¼è¯å¨ï¼lcc.exeï¼åè¿æ¥
å¨ï¼lcclnk.exeï¼ã
ç¼è¯å¨æ¯ç¨æ¥æä½ ç¼åçææ¬ç¿»è¯æå¤çå¨å¯ä»¥æ§è¡çæ ¼å¼çç¨åºãè¿æ¥å¨ç¨æ¥è½¬
æ¢ç¼è¯å¨çæçäºè¿å¶æ件ï¼é常å«åç®æ æ件ï¼ï¼å¹¶æ·»å æä½ç³»ç»ç¨æ¥æç¨åºè°å ¥å
å并æ§è¡æéè¦çä¿¡æ¯å®å¯ä»¥æå¤ä¸ªç®æ æ件é¾æ¥ä¸ºä¸ä¸ªåç¬çç¨å¯æ§è¡ç¨åºï¼è¿æ ·å°±
å¯ä»¥ä½¿ä½ å¯ä»¥æä¸ä¸ªç¨åºç代ç ææ¡£åå²ä¸ºå 个模åï¼è¿ä¸ªè½åå¨ä½ å¼å大åç¨åºæ¶æ¯
å¾éè¦çã
è½ç¶è¿äºå¬èµ·æ¥å¥½åååçç®åï¼ä½æ¯å®é ä¸å¹¶ä¸æ¯è¿ä¸ªæ ·åçãç¼è¾å¨åé¾æ¥å¨
éè¦ä½ å¨å½ä»¤è¡æ¹å¼ä¸é®å ¥ä½ è¦å»ºç«çç¨åºçææä¿¡æ¯ï¼è¿å°éè¦ä½ è®°ä½å¤§éçå½ä»¤è¡
åæ°ååç§åæ ·çå¼å ³ï¼è¿æ¶å°±éè¦IDEââéæå¼åç¯å¢ï¼wedit.exeï¼æ¥æä¾æ¹ä¾¿äºã
IDEçåºæ¬åè½æ¯ç¼è¾ææ¬ï¼ä½ å¯ä»¥å¨è¿ä¸ªç¯å¢éç¼è¾ç¨åºçæºä»£ç ï¼ä½æ¯è¿è¿ä¸
æ¢æè¿ä¸ªåè½ãå®è¿ç»ä½ æä¾äºä¸ä¸ªè°ç¨ç¼è¯å¨åé¾æ¥å¨çç®åæ¹æ³ï¼è¿æ ·å¨ç¼è¯ç¨åº
çæ¶åä½ å°±ä¸ç¨å»è®°ä½é£ä¹å¤çå½ä»¤è¡åæ°äºã
ä½ å¯ä»¥ç®åçæWeditæ³è±¡æä½ çæ§å¶å°ï¼å¨è¿éä½ å¯ä»¥æ§å¶ææçæµç¨ã
好å§ï¼ç°å¨ä½ å¯ä»¥ç¨ä½ çé¼ æ ç¹ä¸ä¸Windowsçâå¼å§âæé®ï¼å¨ç¨åºé¡¹çåèåäº
寻æ¾âlcc-winâï¼å¥½äºåï¼ç°å¨ä½ å·²ç»åå¤å¥½å¨Lcc-Winä¸åä½ ç第ä¸ä¸ªç¨åºäºã
å个å°ç¨åºï¼
ä½ ç¥éåï¼èªä»ç¬¬ä¸ä¸ªCç¼è¯å¨äº§ç以æ¥ï¼ä¹è®¸å¯è½æ´æ©ä¸äºï¼ï¼æä¸ä¸ªæ¯ä¾å°±æ¯
为è¿ä¸ªç¼è¯å¨åç第ä¸ä¸ªç¨åºæ¯âHello Worldâï¼æ为ææ¥æçææç¼è¯å¨é½åè¿ï¼
ç°å¨æ们就æ¥åä¸ä¸ªã
第ä¸æ¥æ¯å建æºç æ件ãå¨âFileâèåä¸éæ©ânewâ项ï¼ç¶åå¨åºç°ç对è¯æ¡
ä¸è¾å ¥âhello.câ并ç¹ä¸ä¸âOKâã
ç°å¨ä½ çå°çæ¯ä¸ä¸ªæ é¢ä¸ºâhello.câç空ç½çªå£ï¼è¾å ¥ä¸é¢ç代ç ï¼
#include <stdio.h>
void main (void)
{
printf (Hello World from LCC-Win!\n);
}
ä¿åæ们çå°ç¨åºï¼å¨âFileâèåä¸éæ©âSaveâ项ã
ç°å¨æ们å¯ä»¥ç¼è¯è¿ä¸ªç¨åºäºãéæ©âCompilerâèåä¸çâCompile hello.câ
è°ç¨ç¼è¯å¨ãè¿æ¶ä¸ä¸ªæ°çªå£ä¼åºç°å¨IDEçåºé¨ï¼è¿æ¯ä¿¡æ¯çªå£ï¼å½ç¼è¯å¨å¤çå®æï¼
å¨è¿ä¸ªçªå£ä¸å°ä¼æ¾ç¤ºâHELLO.exe build successfully.âï¼å¦æç¼è¯åºéï¼åºéä¿¡
æ¯ä¹å°ä¼è¢«æ¾ç¤ºå¨è¿éã
å¦æç¼è¯åºéäºï¼å¨ä¿¡æ¯çªå£å¤åå»ä¿¡æ¯æ¾ç¤ºæå¨è¡ï¼å¨ç¼è¾çªå£å å°é«äº®åº¦æ¾ç¤º
åºé代ç è¡ï¼ä»ç»çæ£æ¥ä¸ä¸ä½ åçç¨åºåä¸é¢æåçä¸æ ·ï¼è¿ééè¦æ³¨æçæ¯Cè¯è¨
æ¯å¤§å°åææçç¨åºè¯è¨ï¼è¿æå³çâprintfâåâPrintfâ对ç¼è¯å¨æ¯ä¸ç¸åã
ç°å¨ä½ å·²ç»ç¼è¯å¥½äºè¿ä¸ªç¨åºï¼æ[Ctrl]+[F5]é®è¿è¡ä¸ä¸ï¼ç»æ对åï¼
使ç¨å·¥ç¨ç®¡ç
ç°å¨ä½ å·²ç»ç¼è¯äºä½ ç第ä¸ä¸ªç¨åºï¼ä½ å¯è½æ³ç¥éââæ§è¡æ件å¨åªéï¼
åçæ¯ï¼æä¹ä¸ç¥éï¼è¿å¯è½å¬èµ·æ¥å¾å»ï¼çç¡®ä¹æ¯ï¼ï¼ä½æ¯è¿æ¯çä½ å¨ç¼è¯ç¨åº
æ¶ç缺çç®å½æ¯ä»ä¹ï¼æä»¥ä½ åºè¯¥å¨ä½ ç硬çéæç´¢ä¸ä¸ªå«åâhello.exeâçæ件ã
ä½ è¯å®ä¸ä¼æ³è¦æ¯å¼åä¸ä¸ªç¨åºé½è¦æç´¢ä¸ä¸ç¡¬ççï¼è¿ç§æ åµä¸ä½ å°±è¦ä½¿ç¨å·¥ç¨ã
å·¥ç¨æ¯ä¸äºç¼è¯å¨è¦ç¥æç建ç«ç¨åºæéè¦çä¿¡æ¯ãè¿å æ¬ç¨åºæºæ件ãç¼è¯å¥½ç
æ件çåæ¾å°ç¹ãè¦ç¼è¯ä¸ºä»ä¹ç±»åçå¯æ§è¡æ件ï¼ä¸ä¸ªå¥½çæ³æ³æ¯ä¸ºæ¯ä¸ä¸ªç¨åºå»ºç«
ä¸ä¸ªå·¥ç¨ã
äºå®ä¸ï¼å¯¹äºæ们çâHelloWorldâç¨åºè¿æ¯æä¸ä¸ªå·¥ç¨çï¼Lcc=Winä¼ä¸ºæ²¡æ
ææå·¥ç¨çç¨åºå»ºç«ä¸ä¸ªç¼ºççå·¥ç¨ãéæ©âProjectâèåçâErase...â项ï¼Wedit
ä¼æ¾ç¤ºä¸ä¸ªå·¥ç¨å表ï¼ä½ ä¼çå°ä¸ä¸ªé¡¹ç®å«åâHELLOâï¼ç°å¨æ们毫ä¸çæ çå é¤å®ã
ä¸å ¶ä»çç¼è¯å¨ä¸åçæ¯ï¼Lcc-Winçå·¥ç¨ä¿¡æ¯ä¸æ¯åå¨å¨ç¡¬çä¸çï¼èæ¯åå¨
å¨Windowsç注å表项éãè¿ä½¿å¾Weditå¯ä»¥âè®°ä½âææçå·¥ç¨ï¼çè³äºå¨ä¸åçç£ç
ä¸ãä½æ¯ä¼å¿æ们ä¹éè¦æ¸ é¤æ们ä¸å使ç¨çå·¥ç¨ï¼å¨è¿ç§æ åµä¸ï¼æ们å¯ä»¥æå·¥ç¨ä¿¡
æ¯å¯¼åºå°ç£çä¸ï¼ç¶åå¨IDEä¸å é¤å®ãçä¸ä¸âProjectâèåçé项ï¼ä½ å°±ä¼æç½äºã
ç°å¨ä½ å¯ä»¥è¯çå建ä¸ä¸ªâHELLOâå·¥ç¨ã
第ä¸ä¸ªWindowsç¨åº
ä½ å¯è½å·²ç»æ³¨æå°äºhello.exeçèµ·æ¥è±¡æ¯ä¸ä¸ªDOSç¨åºï¼ä½æ¯å®ä¸æ¯çï¼å®æ¯ä¸ä¸ª
çæ£Windowsç¨åºï¼ä½æ¯è¿ç§ç±»åçç¨åºè¢«ç§°ä¸ºWindowsæ§å¶å°ç¨åº,å°±æ¯å¨ææ¬æ¨¡å¼ä¸
è¿è¡çWindowsç¨åºãå¦æä½ ä¸ç¸ä¿¡ï¼å¯ä»¥è¯çå¨Windowsç纯DOSç¯å¢ä¸è¿è¡ä¸ä¸ï¼ä½
ä¼å¾å°ä¸è¡ä¿¡æ¯ï¼âThis program cannot be run in DOS modeâã
åä¸ä¸ªçæ£çWindowsççâHelloWorldâç¨åºå¹¶ä¸æ¯æ§å¶å°ççæ¬é¾å¤å°ãé¦å
å建ä¸ä¸ªæ°å·¥ç¨ï¼éæ©âWindows executableâ代æ¿âConsole applicationâï¼ç¹OK
åï¼Lcc-Winä¼é®ä½ éè¦Wizardï¼çæå导ï¼å建ç¨åºæ¡æ¶åï¼åçNoã
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MessageBox (NULL, Hello world from Lcc-Win!, Hello, MB_OK);
return 0;
}
ç¼è¯å¹¶è¿è¡è¿ä¸ªç¨åºï¼ä½ ä¼çå°ä¸ä¸ªæ¾ç¤ºhelloä¿¡æ¯ççªå£ï¼ç¹okå ³ééåºã
ä¸å¹¸çæ¯ï¼é¤äºè¿æ ·çå°ä¹åå°çWindowsç¨åºï¼ä¸è¬æ åµä¸Windowsç¨åºæ¯å¾å¤æ
çï¼ç°å¨ä½ å·²ç»ç¥éäºå¦ä½å建工ç¨åç¼è¯ç¨åºï¼å¦æä½ æ¯ä¸ä¸ªWindowsç¼ç¨æ°æï¼å»
æ¾ä¸äºæå ³ç书æ¥ççï¼åå¾å¿ è¦çåºç¡ï¼ä¸äºWindowsç¼ç¨ç¥è¯å¨ä¸é¢çé¨åæ¯å¿ é¡»
çã
å¦æä½ æ¯ä¸ä¸ªCè¯è¨çæ°æï¼é£ä¹å 好好çå¦ä¸æ®µæ¶é´åæ¥çè¿ä¸ªæåå§ï¼
ç¨åºçæå导
Windowsç¨åºä¸ææ¬ç¶æä¸çç¨åºæ¯èµ·æ¥è¦å¥½çå¤ï¼ä½æ¯å¤©ä¸ä¸ä¼æé¦ é¥¼çï¼ä½ æ³
è¦å¾å°çWindowsåè½æ¯æï¼æ¯å¦ï¼åªè£æ¿ãå¤ä»»å¡ççè¦ä»åºçæ¯å¤§éçå¤æç代ç ã
ä½æ¯æ»è¿æ¯æäºåæ³å¯ä»¥ä½¿äºæ åå¾ç®åä¸äºçãé¿æ¶é´ä»¥æ¥ï¼ç¨åºå们åç°å®é
ä¸æ»æ¯æäºå¨æ¯ä¸ªç¨åºä¸é½ç¸åç代ç 段ï¼æ以Windowsç¨åºåé常使ç¨æ¨¡æ¿æ¥çæè¿
é¨å代ç ãå°±æ¯è¯´æºæ件ä¸è¬åªè¦çæä¸æ¬¡ï¼å°±å¯ä»¥å¨ä»»ä½ä¸ä¸ªæ°ç¨åºä¸ä½¿ç¨äºãåªæ
ååçé¨åææ¯æ¯ä¸ªç¨åºä¸åçé¨åï¼æ¾ç¶è¿äºåºè¯¥æ¯å¯ä»¥èªå¨çè¿è¡çã
è¿å°±æ¯çæå导è¦å®æçå·¥ä½ãä½ å¯ä»¥å¨å®ç帮å©ä¸å¿«éççæåºç¨ç¨åºçæ¡æ¶ã
è¿ä¸ªæ¡æ¶äºå®ä¸å°±æ¯ä¸ä¸ªä»ä¹åè½ä¹æ²¡æçä¸ä¸ªå®æ´çç¨åºï¼ä¹è®¸å¯è½åªæ¯ç¨æ¥æ¾ç¤ºä¸
个空çªä½ï¼å 为使ç¨åºå®æå ·ä½çåè½æ¯ä½ çå·¥ä½ã
让æ们çä¸ä¸ä½¿ç¨å导建ç«æç®åçåºç¨ç¨åºçå¤çã
é常ï¼ç¬¬ä¸æ¥æ¯å建ç¨åºä»£ç ï¼ç¶å建ç«ä¸ä¸ªå·¥ç¨ãå¨ä½¿ç¨å导ç模å¼ä¸ï¼ä½ 并ä¸
éè¦åä¸è¡ä»£ç ï¼å导å°ä¸ºä½ 建ç«å®ï¼æ们ç´æ¥æ¥ç建ç«å·¥ç¨å个æ¥éª¤ã
å¨âProjectâèåä¸éæ©âcreateâ项ï¼ç»åºé¡¹ç®å称åè·¯å¾ï¼éæ©å·¥ç¨ç±»å为
âWindows executableâï¼å½Wedit询é®ä½ æ¯å¦è¦ä½¿ç¨å导ï¼wizardï¼ï¼åçâyesâï¼
è¿æ ·å°±è¿å ¥äºå导模å¼ã
å导å°æ¾ç¤ºä¸ä¸ªå¯¹è¯æ¡å«åï¼âApplication characteristicsâï¼è¿æ¯å导å°å¨
åºç¨ç¨åºä¸å å«çåºæ¬ç¹ç¹ï¼ä½ å¯ä»¥éæ©ä»¥ä¸æ åµçä¸ç§ï¼åçªå£ãå¤çªå£åDLLï¼å¨
æé¾æ¥åºï¼ï¼ç°å¨æ们è¦å建ä¸ä¸ªååç®åçåçªå£å°åºç¨ç¨åºï¼éæ©åçªå£ç±»å并确
ä¿ææçç¹æ§å¤éæ纽é½æªè¢«éä¸ï¼ç¹å»âOKâè¿è¡å¤çã
ç°å¨å导å°è¦æç¤ºä½ è¾å ¥ä¿¡æ¯è®¾ç½®ä¸»çªå£çâç±»âï¼è¿éæ说çâç±»âåC++ä¸ç
ç±»æ¯ä¸åçï¼å®æ¯Windowså¨å åä¸åå¨çä¸ä¸ªç»æï¼ç¨æ¥åå¨æ£ç¡®æ¾ç¤ºçªå£æéè¦ç
ä¿¡æ¯ãæéè¦çæ¯âåå«å½æ°âï¼ä¸é¢å°å ·ä½ä»ç»ï¼çå称ï¼ç°å¨åªè¦ç®åæ¥åé»è®¤ç
å±æ§å¼ï¼ç¹å»âNEXTâè¿è¡å¤çã
è¿ä¸ªâGenerate code for the main window creationâ对è¯æ¡ç¨æ¥è®¾å®ç¸åºçªå£
çä¿¡æ¯ãå½ä¸»çªä½è¢«å建çæ¶åè¿äºä¿¡æ¯ä¼è¢«ä¼ éå°ç¸åºççªå£ãå¨è¿éä½ å¯ä»¥æ¹åçª
å£çæ é¢æ çæ¾ç¤ºå 容ï¼ç¶åç¹å»âFinishâã
å导çå·¥ä½å°±è¦å®æäºï¼æ¥ä¸æ¥çå·¥ç¨å建工ä½æ¯é常çä¸äºå¯¹ç¼è¯å¨ãé¾æ¥å¨ã
è°è¯å¨çä¸äºè®¾ç½®ï¼è¿éåªè¦ç®åçæ¥å缺ççé项就å¯ä»¥äºã
ç»è¿ä¸é¢çæ¥éª¤ï¼å°±å®æäºå导çææçå·¥ä½ï¼ä½ å¯ä»¥å¨IDEä¸çå°ä¸¤ä¸ªçªå£ï¼ä¸
个æ¯æºç¨åºç¼è¾çªï¼å¦å¤çä¸ä¸ªæ¯ç¨æ¥å®ä¹åºç¨ç¨åºç主èåçèæ¬ã
æ£è±¡ååæ说çé£æ ·ï¼è¿ä¸ªç¨åºæ¡æ¶æ¯å ¨åè½çï¼å¯ä»¥éè¿ç¼è¯å¹¶è¿è¡ï¼ä½ å¯ä»¥ç
å°ä¸ä¸ªæèåççªå£ãå¯ä¸å¯ä»¥è¿è¡çæä½æ¯âFileâèåçâExitâ项ï¼ä½ å¯ä»¥ä½¿ç¨
è¿ä¸ªèåé¡¹å ³éè¿ä¸ªç®åççªå£ï¼ä¹å¯ä»¥ä½¿ç¨[Ctrl]+[Q]å®æåæ ·çæä½ã
ç°å¨ä½ å¯ä»¥çä¸ä¸è¿ä¸ªç¨åºçæºä»£ç ï¼ä½ ä¼æ³¨æå°è¿ä¸ªç¨åºæ¯é£ä¸ªâHello World!â
ç¨åºå¤æäºè®¸å¤ï¼æå¯ä»¥åè¯ä½ ä¸ä¸ªå°çªé¨ââä»æºä»£ç çç»å°¾å¼å§è¯»èµ·ï¼å 为é常é£
éææ¯ä¸äºåè½å½æ°çæå¨ã
使ç¨WeditReså建èµæº
å¨Windowsç¨åºçå¼åä¸ï¼èµæºæ¯ååéè¦çé¨åï¼èåã对è¯æ¡åå ¶å®çä¸äºç¨
æ·æ¥å£é¨åé½æ¯å¯ä»¥è±¡åç¨åºä¸æ ·çç¼åçï¼å¯ä»¥ç®åçä½ä¸ºèµæºå å«è¿ç¨åºä¸ã
å¦æLcc-Win没ææä¾ä¸ä¸ªèµæºç¼è¾å¨é£ä¹Lcc-Winå°ä¸æ¯ä¸ä¸ªå®æ´çWinç¼
è¯ç¨åºï¼Lcc-Winæä¾çèµæºç¼è¾å¨å«åWeditResï¼æ¯å¨âlcc\bin\âè·¯å¾ä¸ã
çç¡®ï¼WeditResè¿æ¯å¨ä¸æçå®åçè¿ç¨ä¸ï¼ä¹å°±æ¯è¯´è¿æ²¡æå¼åå®æãä¸è¿å®å·²
ç»å¯ä»¥ç¼è¾ä¸äºæå·¥ç¼è¾é¾ä»¥å®æçèµæºäºï¼æ¯å¦ï¼èåå对è¯æ¡ççãå¨IDEä¸è°ç¨
WeditResï¼å¨âCompilerâèåä¸éæ©âResourcesâ项ã
å¦æä½ æ£å¨å¼åçç¨åºæ¯ç¨å导çæçï¼é£ä¹å导ä¼äº§çä¸ä¸ªèµæºæ件ï¼å¨è¿ä¸ªæ
件éè³å°å æ¬èåèµæºï¼WeditResä¼æå¼è¿ä¸ªèµæºæ件ï¼ä½æ¯å®ä¸ä¼æ¾å°ç¸åºç头æ件ï¼
ä½ åºè¯¥ä¸ºå®ææ头æ件çè·¯å¾ãé常æ¯å¨WeditReså½åå·¥ä½è·¯å¾çä¸ä¸çº§ç®å½ã
WeditResè¦æ¾çæ件é常å«åprjnamewiz.hï¼è¿éçprjnameæ¯ä½ æå®
çå·¥ç¨çå称ãç»è¿è¿ä¸æ¥å°±å¯ä»¥ä¿®æ¹å·¥ç¨æç¨çèµæºäºã
å¦æä½ çç¨åºä¸æ¯ç±å导çæçï¼é£ä¹WeditResä¼æç¤ºä½ è¾å ¥èµæºæ件çæ件åï¼è¾
å ¥ä¸ä¸ªå称åç¹å»âOKâï¼è¿æ¶WeditResä¼è¯´ä¸è½æå¼è¿ä¸ªèµæºæ件ï¼æ²¡æå ³ç³»ï¼è¿æ¯
å 为è¿ä¸ªç®å½ä¸çç¡®æ¯æ²¡æèµæºæ件çï¼è¿æ¯å¨è¿ä¸ªå¯¹è¯æ¡ä¸ç¹å»âOKâï¼ç¶åå¨
âFileâèåä¸éæ©âNewâ项ï¼è¿æ ·å°±ä¼ä¸ºä½ çå·¥ç¨å建ä¸ä¸ªæ°çèµæºå·¥ç¨ï¼é®å ¥ä¸
个工ç¨åï¼ä¸è¬æ åµæ¯ååºç¨ç¨åºçå·¥ç¨åç¸åï¼ç¶åç¹å»âValidateâï¼ç°å¨ä½ éè¦
æå·¥å¨åºç¨ç¨åºå·¥ç¨å表éæ·»å è¿ä¸ªèµæºæ件ï¼ä¸è¬ä»¥âRESâ为æ©å±åï¼ã
å¨è¿éè¯ä¸¾ä¸ä¾ââæ们æ¥ä¸ºæ们ä¸é¢å建çç¨åºå建ä¸ä¸ªâå ³äºâ对è¯æ¡èµæºã
è¿è¡WeditResï¼è¾å ¥å¤´æ件çè·¯å¾åéæ©âObjectsâèåçâNew dialogâ项ï¼
è¿æ¶WeditResä¼æ¾ç¤ºä¸ä¸ªå¯¹è¯æ¡ï¼æ é¢æ 为âDialog box parametersâï¼æ¹å对è¯æ¡
çæ é¢ä¸ºâAbout this applicationâæè éä¾¿å ¶å®çä»ä¹ä¸è¥¿ï¼ç¶åå¨âIdentityâ
ï¼æ è¯ç¬¦ï¼é¡¹é®å ¥ä¸ä¸ªä½ å欢çä¸è¥¿ï¼æ¯å¦ï¼âDLG_ABOUTâï¼å¨âstandard buttonsâ
éåä¸éæ©âValidateâé项并ç¹å»âOKâå ³é对è¯æ¡ã
ä½ å¨è¿ä¸ªæ¶ååºè¯¥å¯ä»¥çå°ä¸ä¸ªæ°ç对è¯æ¡åä¸ä¸ªæµ®å¨çå·¥å ·æ¡ï¼å¨å¯¹è¯æ¡ä¸ä¹åº
该æä¸ä¸ªæ纽ï¼ä½ å¯ä»¥ç¨é¼ æ æå¨å®æ¥éæ°æå®å®çä½ç½®ï¼å¦æä½ è¿æ³æ¹åæ纽ä¸æ¾ç¤º
çæåââåå»å®æå¼å±æ§å¯¹è¯æ¡ï¼æè å éå®å®ï¼ç¶åå¨æµ®å¨å·¥å ·æ¡ä¸æ¹åæ¾ç¤ºæåã
ä¸é¢æ们添å ä¸ä¸ªéæææ¬æ ç¾ï¼å¨å·¥å ·æ¡ä¸éæ©ææ¬å·¥å ·ï¼å æ å½¢ç¶åæç±ä¸ä¸ª
ç©å½¢å å´çæéï¼å¨å¯¹è¯æ¡ççªä½ä¸ç¹å»ä¸ä¸ï¼ä¸ä¸ªå å«ææ¬âââTextâââçç©å½¢
ä¼åºç°å¨ä½ ç¹å»çå°æ¹ï¼å¯ä»¥éè¿é¼ æ æå¨æ¥æ¹åè¿ä¸ªææ¬æ¡ç大å°ï¼åæ ·ä¹å¯ä»¥æ¹å
æ¾ç¤ºçææ¬åææ¬æ¡çä½ç½®ã
æ们è¿å¯ä»¥å¨è¿ä¸ªå¯¹è¯æ¡ä¸æ·»å å ¶å®çè£ ç½®ã空å¿æ¹æ¡ãå®å¿æ¹æ¡åç»ä»¶ççå¯ä»¥
对è¿ä¸ªå¯¹è¯æ¡è¿è¡ä¸äºç®åçè£ é¥°ãå¦æä½ æ³è¦å é¤ä¸ä¸ªè£ ç½®ï¼éå®å®ç¶åæ
[Ctrl] + [X]ï¼æè éæ©âEditâèåçâCutâ项ãè¿å¯ä»¥éæ©âOptionsâèåç
âTestâ项æµè¯è¿ä¸ªå¯¹è¯æ¡çå¤è§ãå¨å·¥å ·æ éæä¸ä¸ªæ纽çåè½æ¯ç¸åçï¼å°±æ¯çèµ·
æ¥è±¡ä¸ä¸ªå¼å ³çé£ä¸ªï¼å¦ææ³è¦ç»§ç»ç¼è¾è¿ä¸ªå¯¹è¯æ¡ï¼åªè¦å次éæ©ä¸è¿°é项ä¸æ¬¡å³å¯ã
ç¼è¾å®æåå¨âFileâèåä¸éæ©åçï¼ç¶åå ³éWeditResï¼ä¸ºäºæ¾ç¤ºè¿ä¸ªå¯¹è¯æ¡
ä¸é¢æä»¬å¿ é¡»å¨ç¨åºä¸å å«ç¸åºç代ç ã
寻æ¾âOnCommandâè¯å¥ï¼å¨é£éè¯å®æä¸ä¸ªswitchè¯å¥çæ¡ä»¶ä¹ä¸æ¯èåå½ä»¤
âExitâçï¼IDM_EXITï¼,ç°å¨æ们为æ们çæ°å¯¹è¯æ¡æ·»å ä¸ä¸ªæ°çcaseæ¡ä»¶ï¼è¾å ¥å¦
ä¸ä»£ç ï¼
case IDM_ABOUT:
DialogBox (hInst, MAKEINTRESOURCE(DGL_ABOUT), hwnd, AboutDlgProc);
break;
æ们è¿éè¦ç¼å对è¯æ¡å½æ°ã
BOOL CALLBACK AboutDlgProc (HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{
switch (msg)
{
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
EndDialog(hwnd,0);
return TRUE;
}
break;
}
return FALSE;
}
ä½ åºè¯¥å·²ç»æç½äºï¼ç±å导æ¥çæ代ç è¦ç®åå¾å¤ï¼ç°å¨ç¼è¯ãé¾æ¥è¿ä¸ªç¨åºï¼ç¶
åè¿è¡å®ï¼éæ©âCompilerâä¸çâExecute prj.exeâ项ï¼æ们å建ç对è¯æ¡å°æ¾ç¤º
å¨å±å¹ä¸äºã
æ·»å å ¶å®ç±»åçèµæº
ä½ è¿éè¦ç¥éå¦ä½æ·»å å ¶å®èµæºï¼å¦å¾æ çã
äºå®ä¸WeditResè¿ä¸è½ç¼è¾å¾æ æ件ï¼ä½è 说æ£å¨åè¿æ¹é¢çå·¥ä½ãæä»¥ä½ å¯è½è¦
使ç¨å ¶å®çå·¥å ·æ¥å®æå¾æ ç¼è¾çå·¥ä½ã
å¨èµæºå建å®åï¼ä½ è¦æå®æ·»å å°å·¥ç¨çèµæºæè¿°æ件éé¢å»ãå¦æä½ æ¯ä½¿ç¨å导
å建çå·¥ç¨ãä½ åªé¡»è¦æå¼ä¸å·¥ç¨åç¸åç*.RCæ件就å¯ä»¥äºã
å¦æä½ æ²¡æ使ç¨å导ï¼é£ä¹ä½ åªè½æ°å建ä¸ä¸ªRCæ件ãå¦æä½ æ¯ä½¿ç¨WeditReså建
çèµæºï¼å¨å»ºç«èµæºæè¿°æ件æ¶æäºäºæ æ¯ä½ å¿ é¡»ç¥éçââå¿ é¡»å å«WeditResèµæºï¼
çè³äºä½ 并没æ使ç¨ä»»ä½ç±WeditReså建çèµæºï¼ä½ å®å ¨æå¯è½å¨åç»çå·¥ä½ä¸ç¨å°ï¼
æ建议æ 论ä»ä¹æ åµé½åºè¯¥è±¡ä¸é¢è¿æ ·åã
WeditResä¸è¬è¦å»ºç«ä¸ä¸ªæ件ï¼ä¸ä¸ª*.DLGæ件ãä¸ä¸ª*.H头æ件åä¸ä¸ª*.RESäºè¿
å¶èµæºæ件ãDLGæ件æè¿°äºç±WeditReså建çèµæºçå®ä¹ï¼å¦ï¼èµæºä¸²ãèåå对è¯
æ¡çï¼ï¼Hæ件æ¯ææèµæºç符å·åçå®ä¹ï¼RESæ件æ¯ç¼è¯åçäºè¿å¶èµæºæ件ï¼è¿ä¸ª
æ件å°è¢«é¾æ¥å°å·¥ç¨æåçæçå¯æ§è¡ç¨åºä¸ã
èµæºæè¿°æ件ï¼*.RCï¼çæ件åä¸å®è¦åRESæ件çæ件åç¸åï¼å½Lcc-Winçèµ
æºç¼è¯å¨ï¼lrc.exeï¼ç¼è¯èµæºæ¶å°è¦çåæ¥çRESæ件ãä½ å¯ä»¥å¨Weditä¸å建èµæºæ
è¿°æ件ï¼å¦ä¸ï¼
#include <windows.h>
#include resources.h
#include resources.dlg
æ¯ã
第äºè¡å å«ç±WeditRes产ççèµæºç符å·åç头æ件ï¼æå¨è¿éåå®ä½ çèµæºå·¥ç¨
å为âresurcesâï¼å¯ä»¥æ¹ä¸ºä½ æå®ä¹çå称ã第ä¸è¡æ¯WeditRes产ççèµæºæè¿°æ件ï¼
è¿æ ·ä¸ä¼ä¸¢å¤±ä½ å·²ç»å建äºçèµæºã
ä¸é¢ä½ å¯ä»¥åèµæºæè¿°æ件ä¸å¢å èµæºï¼ä¸é¢æ¯ä¸ä¸ªä¾åï¼
IDI_MYICON ICON myiconfile.ico
è¿ä¸è¡å®ä¹äºå¾æ èµæºï¼å¨ä½¿ç¨åï¼ä¸å®è¦å®ä¹å¾æ ç符å·åãæ¯å¦å¨âprjwiz.hâ
æ件ï¼æè âresource.hâï¼å¦æä½ æ²¡æ使ç¨å导ï¼ä¸ï¼å¦æä½ æ²¡æå®ä¹è¿ä¸ªç¬¦å·åï¼
é£ä¹ç¼è¯å¨å°è®¤ä¸ºå®æ¯ä¸ä¸ªå符串åã
æ·»å å æ æè ä½å¾èµæºçæ¥éª¤æ¯ç¸åçï¼åªè¦æå ³é®åæ¹ä¸ºâBITMAPâæè
âCURSORâã
ä¸é¢è¦åçæ¯æèµæºæè¿°æ件å å«å¨å·¥ç¨æ件å表ä¸ï¼å½ä¸ä¸æ¬¡ä½ ç¼è¯å·¥ç¨ï¼èµæº
ç¼è¯å¨ä¹å°ç¼è¯è¿ä¸ªèµæºæè¿°æ件ï¼å¹¶æ产ççäºè¿å¶èµæºé¾æ¥å°æ§è¡æ件å ã
è¿æ ·ä½ å¯ä»¥æ·»å å¾æ ãå æ åä½å¾èµæºï¼å¯¹äºå ¶å®ç±»åçèµæºå¯ä»¥ä½¿ç¨RCDATAèµæº
æ¹å¼æ·»å å°èµæºæ件å ï¼å°±æ¯ä¸ç³»åçç±éå·åéçæ°å¼ä¿¡æ¯ï¼è¿ç§æ¹å¼å¯ä»¥ä½¿Lcc-Win
çèµæºç¼è¯å¨ä¸æ¯æçèµæºå¾ä»¥æ·»å å°èµæºæ件ä¸å»ï¼æ¯å¦WAVæ件çã
使ç¨éè§æ ¼èµæº
Lcc-winçèµæºç¼è¯å¨å¯ä»¥ä½¿ç¨åç§ç±»åçèµæºï¼å¦å¯¹è¯æ¡ãèåãå¾æ çï¼ä½
æ¯å®ä¸è½ä½¿ç¨å ¶å®éè§æ ¼çèµæºå¦å¤åªä½æ件ï¼WAVï¼MIDççï¼ã
ä½ å¯è½è®¤ä¸ºä½¿ç¨å ¶å®çèµæºç¼è¯å¨å¦å¾®è½¯å¨Win SDKä¸æä¾çèµæºç¼è¯å¨ï¼æè
å ¶å®çä»ä¹ä¸è¥¿ã
ä½æ¯è¿éç麻ç¦äºæ¯LCCLINKï¼å 为å®å¹¶ä¸è®¤è¯è¿äºèµæºï¼å æ¤ä¹ä¸å¯è½æè¿äºèµ
æºé¾æ¥å°ä½ çæ§è¡æ件ä¸å»ï¼è¿åçæ¯ä¸ªå¤§é®é¢ï¼ä½ å¯è½ä¸å¾ä¸ä½¿ç¨å ¶å®çé¾æ¥å¨ï¼è¿
æå³çå¯è½éè¦å ¶å®ç±»æ§çå ¥å£åºã
æ认为è¿æ ·åä¸æ¯ä¸ä¸ªå¥½ç解å³æ¹æ¡ï¼ä¸»è¦çåå æ¯Weditä¸æ¯è®¾è®¡æå¯ä»¥ä½¿ç¨å ¶
å®çé¾æ¥å¨çï¼ä½ å°ä¸å¾ä¸å¨å½ä»¤è¡ä¸ç¼è¯ä½ çç¨åºï¼æ¾å¼äºLcc-Win IDEæä¾çå ¨
é¨ä¼ç¹ã
ä½æ¯è¿éè¿æ¯æä¸ä¸ªå¯ä¾éæ©çæ¹æ¡ï¼ââ幸è¿çæ¯LRCæ¯æRCDATAèµæºç±»åï¼è¿
ç§èµæºç±»åç¨æ¥å å«äºè¿å¶æ°æ®ç±»åçèµæºï¼ä½¿ç¨ä¸ç³»åçæ°åå表表示ã
ä¸é¢æ¯å ·ä½çå®ç°æ¹æ³ï¼
é¦å ä½ éè¦è½¬æ¢ä½ è¦ä½¿ç¨çäºè¿å¶æ件å°æä¸ç³»åçæéå·åå²æ°å¼è¡¨ç¤ºçææ¬æ
件ï¼LRC缺çç认为è¿äºæ°æ®æ¯ä½é¿çï¼å®åæ¶ä¹æ¯æä½é¿åº¦çæ´æ°ï¼åªè¦å¨æ°å¼
åæ·»å âLâå符就å¯ä»¥äºã
ä½ å¯ä»¥ä»è¿éä¸æ ½åè¿äºå·¥ä½ç转æ¢å¨ï¼
* Bin2Txt: å¼åè ï¼Josef Planeta. ååççµæ´»æ¹ä¾¿ï¼
* TextIt: æ¬æä½è å¼åï¼å¯ä»¥ä¸æ¬¡è½¬æ¢å¤ä¸ªæ件ã
è¿ä¸¤ä¸ªå·¥å ·é½å¸¦ææºç ï¼ä½¿ç¨Lcc-Winå¼åã
ç¶åä¸å®è¦å¨èµæºæ°æ®ä¸å å«è¿äºæ´æ°å表ï¼å¦æä½ çèµæºæ件没æ使ç¨èµæºæè¿°
æ件ï¼å¦æä½ æ²¡æ使ç¨å导çæå·¥ç¨ï¼è¿æ¯æå¾å¤§å¯è½çãä½ ä¸å®è¦å»ºç«ä¸ä¸ªèµæºæè¿°
æ件ï¼ä¸è¬æ¯è¿ä¸ªæ ·åçï¼
#include <windows.h> //basic Windows header file
#include resources.h //resource identifiers (generated by WeditRes)
#include resources.dlg //resource scripts (generated by WeditRes)
MySound RCDATA
BEGIN
#include mysound.txt
END
å¨è¿ä¸ªä¾åä¸ï¼æ们å å«äºä¸ä¸ªå«åâmysound.txtâçæ件ï¼è¿ä¸ªæ件æ¯ç±ä¸ä¸ª
WAVæ件转æ¢æçæ°æ®æ件ã
è¦æ³¨æå½åçæ¬çLRCï¼Vï¼å¨RCDATAèµæºç大å°ä¸æ¯æéå¶çï¼å¦æä»»ä½ä¸
个æ°æ®æ件大äºKbï¼ä½ æå¯è½å¾å°ä¸ä¸ªæº¢åºä¿¡æ¯ï¼Overflow in resource dataï¼ï¼
å¨æªæ¥ççæ¬ä¸å¯è½ä¼æææ¹è¿ï¼ä½æ¯å¨ç®åå¦æåºç°äºè¿ç§æ åµå¯è½åªæ使ç¨å ¶å®ç
èµæºç¼è¯å¨äºã
使ç¨RCDATAç±»åå®ä¹èµæºæå³çä½ ä¸è½ç´æ¥çæå®PlaySoundæ¥ææ¾è¿äºèµæºï¼å
为类åæ¯ä¸åçã
解å³åæ³æ¯æå·¥æè¿äºæ°æ®è¯»å ¥å åï¼ä¸é¢ç代ç 说æäºå¨PlaySoundæ¶è¦åçäºæ ï¼
BOOL PlayRcSound (HINSTANCE hInst, LPCTSTR lpszSndName)
{
HRSRC hr;
HGLOBAL hg;
LPVOID lpSndData;
hr = FindResource (hInst, lpszSndName, RT_RCDATA);
if (hr != NULL)
{
hg = LoadResource (hInst, hr);
if (hg != NULL)
{
lpSndData = LockResource (hg);
if (lpSndData != NULL)
{
return PlaySound((LPCTSTR)lpSndData, NULL, SND_MEMORY);
/* We do not need to unlock or unload the resource, */
/* Windows will take care of this */
}
}
}
return FALSE;
}
å¦æä½ çèµæºå¨å¤´æ件ä¸å®ä¹ææ è¯ç¬¦ï¼å«åï¼ID_MYSOUNDï¼é£ä¹è°ç¨å½æ°çæ¹å¼
åºè¯¥æ¯ï¼
PlayRcSound (hInst, MAKEINTRESOURCE(ID_MYSOUND));
å¦å¤ï¼å¦æä½ ç»åºäºä¸ä¸ªå符串åï¼æ¯å¦ï¼MySoundï¼å½æ°è°ç¨å¦ä¸æ示ï¼
PlayRcSound (hInst, MySound);
éæåºåå¨æåº
ä¹è®¸ç¨åºåå°±æ¯å欢æ¯å»ä»¥ç±»çä¿®è¾çï¼åºçæ¦å¿µå°±æ¯ä¸ä¸ªä¾åï¼å®æ¯ç¨æ¥åå¨å¯
è½å¨è®¸å¤çç¨åºä¸ä½¿ç¨ç代ç ï¼æè ä¸é¨åååä¸ä¸ç代ç ï¼åªè¦åä¸æ¬¡å°±å¯ä»¥äºï¼ç
è³æ¯ç±å ¶ä»çäººä¸ºä½ åç代ç ï¼è¿æ ·ä½¿ç¨è¿äºä»£ç èå®å ¨ä¸ç¨å ³å¿å ·ä½çå®ç°ç»èã
åå ¶å®çWindowsç¼è¯å¨ä¸æ ·ï¼LCC-Winä¹æ¯æ两ç§åºââå¨æåºåéæåºã
éæåºå å«ç代ç å¨ç¼è¯é¾æ¥æ¶å°è¢«æ·»å å¨å¯æ§è¡æ件ä¸ï¼å®è¢«ç§°ä¸ºâéæâåºæ¯
å 为ä¸æ¦å®é¾æ¥å°å¯æ§è¡æ件ä¸ï¼å°±å°ä¸å¯æ¹åï¼é¤ééæ°ç¼è¯æ´ä¸ªç¨åºï¼ã
èå¨æé¾æ¥åºä¸ä¼ç±ç¼è¯å¨é¾æ¥å°å¯æ§è¡æ件ä¸ï¼èæ¯å¨è¿è¡æ¶ç±æä½ç³»ç»é¾æ¥çï¼
è¿æ ·å³ä½¿ä½ æ¹åäºè¿ä¸ªåºï¼ä¹ä¸ä¼ä½¿æ´ä¸ªå¯æ§è¡ç¨åºéæ°ç¼è¯ã
éæåºçç¼åè¦ç®åäºï¼åªè¦å建ä¸ä¸ªç±»å为âStatic library (lib)âçæ°å·¥ç¨ï¼
æ·»å ä½ è¦å¨è¿ä¸ªéæåºä¸ä½¿ç¨çåå§èµæââå½æ°ãæ°æ®ççï¼ç¼è¯åå°±ä¼å¾å°ä¸ä¸ª
LIBæ件ï¼è¿ä¸ªæ件éé¢å æ¬äºææä½ æå®çå½æ°åæ°æ®ãå¦æä½ è¦ä½¿ç¨è¿äºå½æ°æè
æ°æ®ï¼å¨âConfigurationâ对è¯æ¡ä¸çâLinkerâ表éçâAdditional librariesâ
项ä¸æå®éæåºå称ï¼éç¥ç¼è¯å¨æè¿ä¸ªéæåºé¾æ¥å°å·¥ç¨éå»ï¼ä½æ¯åä¸ä¸è¦å¿äºæ
ä½ çéæåºæ¾å°é¾æ¥å¨è½å¤æ¾å°çå°æ¹ï¼æ¯å¦ï¼â\lcc\libâè·¯å¾ä¸ã
å¨æé¾æ¥åºå°±æäºéº»ç¦äºï¼ä½ è¦ä½¿ç¨ä¸¤ä¸ªæ件èä¸æ¯ä¸ä¸ªæ件ï¼å¨æåºæ¬èº«ââDLL
æ件åå ³èå ¥å£åºââLIBæ件ãå ¥å£åºæ¯ç»é¾æ¥å¨ä½¿ç¨çï¼ç®åç说å®ä½¿ç¨æ¥åéª
é¾æ¥å¨çï¼åæ¶å®ä¹å å«äºä½¿Windowsæ£ç¡®çè°ç¨ç¸åºå¨æåºä¸çå½æ°çä¿¡æ¯ã
èä¸ï¼å¨æåºçåè½å¯ä»¥æ´å ç强大ï¼å®æä¸ä¸ªLibMain()å½æ°ï¼å¨ç¨åºæ¯ä¸æ¬¡
è°ç¨å®æ¶é½è¦éè¿å®æ¥è¿è¡åå§åçå·¥ä½ã
è¦å建ä¸ä¸ªå¨æé¾æ¥åºï¼ä½ è¦å建ä¸ä¸ªDLLå·¥ç¨ï¼ç¶åä½ å¯ä»¥ä½¿ç¨å导çæLibMain()
å½æ°ãæ·»å ä½ è¦ä½¿ç¨çå½æ°åæ°æ®ï¼å¨ç¼è¯è¿ä¸ªå·¥ç¨åï¼ä½ å°±å¯ä»¥å¾å°DLLåºåæ¥å£åº
æ件ã
å¦æè¦ä½¿ç¨å¨æé¾æ¥åºï¼è±¡ä½¿ç¨éæåºä¸æ ·ï¼è¦å°æ¥å£åºæ¾å¨â\lcc\libâè·¯å¾ä¸ï¼
å¨âOptionsâ对è¯æ¡ä¸æ·»å è¿ä¸ªæ¥å£åºãåæ¶ä¹è¦æDLLæ件æ¾ç½®å¨Windowsè½å¤æç´¢
å°çè·¯å¾ä¸ï¼Windowsæç´¢å¨æé¾æ¥åºç缺çç®å½æ¯â\windows\system\âååºç¨ç¨åº
çèµ·å§ç®å½ï¼å°å¨æé¾æ¥åºæ¾ç½®å¨è¿ä¸¤ä¸ªç®å½ä¸é½æ¯å¯ä»¥ç
通信达公式问题,超强组合指标公式,cassso源码解析谁可以解释一下。我看不明白,源代码如下
{ 波段线}
VAR2:=(HIGH+LOW+CLOSE*2)/4;
VAR3:=EMA(VAR2,);
VAR4:=STD(VAR2,);
VAR5:=((VAR2-VAR3)/VAR4*+)/4;
VAR6:=(EMA(VAR5,5)-)*1.;
{ AK: EMA(VAR6,2)*1.;
AD1: EMA(AK,2);
AJ: 3*AK-2*AD1;
DRAWTEXT(CROSS(AK,AD1),AK,'*'),COLORRED;
DRAWTEXT(CROSS(AD1,AK),AK,'*'),COLORWHITE;}
{ 金手指}
RA:=LLV(LOW,);
RB:=HHV(HIGH,);
RC:=EMA((CLOSE-RA)/(RB-RA)*4,4)*;
近日均价:=MA(CLOSE,5),COLORYELLOW,LINETHICK2;
DRAWICON(RC<6 AND *(HHV(HIGH,)-CLOSE)/(HHV(HIGH,)-LLV(LOW,))>,,);
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*;
ZL:=EMA( (CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*,2)*5;
SH:=EMA( (CLOSE-MA(CLOSE,))/MA(CLOSE,)*,7)*5;
BT1:=CROSS(RSI1,);
BT2:=CROSS(ZL,SH) AND ZL<-;
BT:=FILTER(COUNT(BT1 OR BT2,3)>=2,3);
BIAS:=(CLOSE-MA(CLOSE,))/MA(CLOSE,)*;
VARC:=LOW;
VARD:=REF(LOW,1);
VARE:=SMA(ABS(VARC-VARD),3,1)/SMA(MAX(VARC-VARD,0),3,1)*;
VARF:=MA(VARE/,3);
VAR:=LLV(LOW,);
VAR:=HHV(VARF,);
MA(IF(LOW<=VAR,(VARF+VAR*2)/5,0),3);
VAR1B:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2B:=SMA(ABS(LOW-VAR1B),,1)/SMA(MAX(LOW-VAR1B,0),,1);
VAR3B:=EMA(VAR2B,);
VAR4B:=LLV(LOW,);
VAR5B:=EMA(IF(LOW<=VAR4B,VAR3B,0),3);
{ 主力进场:IF(VAR5B>REF(VAR5B,1),VAR5B,0),COLORRED;}
STICKLINE(VAR5B>REF(VAR5B,1),0,VAR5B*2,2,0 ),COLORYELLOW;
洗盘:IF(VAR5B<REF(VAR5B,1),VAR5B,0),COLORLIGREEN;
VARR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VARR2:=SMA(ABS(LOW-VARR1),,1)/SMA(MAX(LOW-VARR1,0),,1);
VARR3:=EMA(VARR2,);
VARR4:=LLV(LOW,);
VARR5:=EMA(IF(LOW<=VARR4,VARR3,0),3);
STICKLINE(VARR5>REF(VARR5,1),0,VARR5,2,0 ),COLORGREEN;
STICKLINE(VARR5<REF(VARR5,1),0,VARR5*2,2,0),COLORRED;
找主力吸筹提款:VARR5>REF(VARR5,4) { AND C>REF(C,1)},COLORMAGENTA;
VAR2C:=(HIGH+LOW+CLOSE*2)/4;
VAR3C:=EMA(VAR2C,7);
VAR4C:=STD(VAR2C,7);
VAR5C:=(VAR2C-VAR3C)*/VAR4;
VAR6C:=EMA(VAR5C,3);
{ WW:(EMA(VAR6C,5)+)/2-3,COLORFFFF;
MM:HHV(WW,3),COLORFF;}
AAA:=AMOUNT/VOL/;
主力进场:IF(VAR5B>REF(VAR5B,1),VAR5B*1.5,0),COLORRED,LINETHICK2;
{ 吸筹}
VAR2Q:=REF(LOW,1);
VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*;
VAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*,VAR3Q/),3);
VAR5Q:=LLV(LOW,);
VAR6Q:=HHV(VAR4Q,);
VAR7Q:=IF(MA(CLOSE,),1,0);
VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/*VAR7Q;
VAR9Q:=IF(VAR8Q>,,VAR8Q);
吸筹:STICKLINE(VAR9Q>-,0,VAR9Q,6,1),COLORRED;
VARY2:=REF(LOW,1);
VARY3:=SMA(ABS(LOW-VARY2),3,1)/SMA(MAX(LOW-VARY2,0),3,1)*;
VARY4:=EMA(IF(CLOSE*1.3,VARY3*,VARY3/),3);
VARY5:=LLV(LOW,);
VARY6:=HHV(VARY4,);
VARY7:=IF(MA(CLOSE,),1,0);
VARY8:=EMA(IF(LOW<=VARY5,(VARY4+VARY6*2)/2,0),3)/*VARY7;
VARY9:=IF(VARY8>,,VARY8);
吸筹2:STICKLINE(VARY9>-,0,VARY9/3,2,1),COLORMAGENTA;
LCC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LCC,0),4.1,1)/SMA(ABS(CLOSE-LCC),4.1,1)*,COLORYELLOW,LINETHICK1;
黄买:FILTER((REF(CLOSE,2)<CLOSE AND RSI<),7),COLORYELLOW;
STICKLINE(黄买,0,-,,1),COLORYELLOW;
黄卖:=FILTER((REF(CLOSE,2)>CLOSE AND RSI>),7);
STICKLINE(黄卖,,,,0),COLORBLUE;
红买:FILTER(CROSS(RSI,),7),COLORRED;
STICKLINE(红买,0,-,6,0),COLORRED;
红卖:=FILTER(CROSS(,RSI),7);
STICKLINE(红卖,,,8,0),COLORCYAN;
绿买:FILTER(CROSS(RSI,),7),COLORFF;
STICKLINE(绿买,0,-,6,0),COLORMAGENTA;
绿卖:=FILTER(CROSS(,RSI),7);
STICKLINE(绿卖,,,6,0),COLORFF;
★遵守纪律★:,COLORRED;
★交易之魂★:,COLORRED;
ZLC:= EMA((WINNER(CLOSE) * ),3);
SHC:= EMA(((WINNER((CLOSE * 1.1)) - WINNER((CLOSE * 0.9))) * ),3);
主力控盘: ((ZLC / (ZLC+ SHC)) * ),COLORFFFF,LINETHICK2;
上限: HHV(主力控盘,),COLORGREEN,LINETHICK2;
下限: LLV(主力控盘,),COLORRED,LINETHICK2;
中线:(上限 + 下限)/2,COLORYELLOW,POINTDOT,LINETHICK2;
{ ,LINETHICK4,POINTDOT,COLORYELLOW;}
{ ,LINETHICK4,POINTDOT,COLORFFFF;}
VAR:=(CLOSE-LLV(LOW,))/(HHV(HIGH,)-LLV(LOW,))*;
VAR:=SMA(SMA(VAR,3,1),3,1)/.;
VAR:=EMA(VAR,5);
操盘:=3*VAR-2*VAR;
A1:=CROSS(操盘,VAR) AND VAR<2.1 AND C>O;
STICKLINE(A1,,0,4,0),COLOR;
STICKLINE(A1,,0,3,0),COLOR;
STICKLINE(A1,,0,2,0),COLORBBBB;
STICKLINE(A1,,0,1,0),COLORWHITE;
STICKLINE(A1,,0,0.3,0),COLORFFFF;
DRAWTEXT(A1,,'满仓'),COLORRED;
DRAWTEXT(A1,,'满仓'),COLORRED;
AK: EMA(VAR6,2)*1.;
AD1: EMA(AK,2);
AJ: 3*AK-2*AD1;
DRAWTEXT(CROSS(AK,AD1),AK,'*'),COLORRED;
DRAWTEXT(CROSS(AD1,AK),AK,'*'),COLORWHITE;
WW:(EMA(VAR6C,5)+)/2-3,COLORFFFF;
MM:HHV(WW,3),COLORFF;
DRAWTEXT(BT1,0,'□'),COLORYELLOW;
DRAWTEXT(BT,0,'■'),COLORYELLOW;
DRAWICON(CROSS(,RSI1),,);{ 饭跑跑}
DRAWICON(CROSS(RSI1,),,);{ 金钻}
DRAWICON(CROSS(ZL,SH) AND ZL<-,,);{ 蓝钻}
DRAWICON(CROSS(BIAS,-),-,);{ BIAS买点};
2024-12-23 01:44
2024-12-23 01:15
2024-12-23 00:38
2024-12-23 00:29
2024-12-23 00:25
2024-12-23 00:08
2024-12-22 23:27
2024-12-22 23:13