1.å¦ä½ç¼è¯quake3 arena ( transshipment )
2.lcc币合法吗
3.Lccwin32 C CompilerçLccwin32 C Compiler使ç¨ä»ç»
4.通信达公式问题,码例超强组合指标公式,码例谁可以解释一下。码例我看不明白,码例佛山源码开发源代码如下
å¦ä½ç¼è¯quake3 arena ( transshipment )
ä¸è¿ä¼¼ä¹ç½ä¸æ´æµè¡ççæ¬æ¯ä»è¿éè½å¤å¾å°çä¸ä¸ªå为 quake3-1.b-.source.zip ç 5.M çå缩å ï¼éé¢æ¬äºç¸å¯¹è¾å ¨çå 容ï¼æ Q3A çå ¨é¨æºç ï¼lcc,码例 q3asm, q3map å q3radiant çå·¥å ·çæºä»£ç ãæ主è¦çæ¯å®è¿å å«äº vs.net çå·¥ç¨æ件ï¼ä½¿å¾ç¼è¯åç®åäºè®¸å¤ã æææ©å°±æ¯ç¨è¿ä¸ªçæ¬ç¼è¯éè¿çï¼ä¸è¿åæ¥åç°å¨å®æ¹ç½ç«ä¸æ¾åºççæ¬åè¿ä¸ªä¸å¤ªä¸æ ·ï¼æ¬æ³æ³ç»§ç»å°è¯ç¼è¯åè ï¼å¹¶ä¸æ ¹æ®å ¶ç»ææ¥åè¿ç¯ç½å¿çï¼ä¸è¿éæ¾çæ¯ï¼æç §è¯´æä¸çæ导ï¼ç¼è¯ä¸è½æåãä¼åºç°æ¾ä¸å°æ件çé误ï¼ä¼°è®¡æ¯ Id å®æ¹çç¼è¯å¨æ¬èº«é ç½®æäºé®é¢ï¼æ没çæºç ä¹æ²¡ææ·±å ¥ç 究ï¼å¸ææå ´è¶£çæåè½åè¯æåå å解å³åæ³ã è¨å½æ£ä¼ ï¼å ¶å®è¿ä¸ªçæ¬éé¢çä¿¡æ¯è¿æ¯è¶³å¤ä¸°å¯çï¼å¾å®¹æç¼è¯ï¼åªå¨ä¸ªå«å°æ¹æäºå°é®é¢ãä¸è¿æè¿è¦å å¨ä¸ä¸ï¼æä¸æ¯ä¸ä¸ª Quake ç©å®¶ï¼æä»¥å¯¹å ¶ä¸çå¾å¤æ¯è¯ä¸æ¯å¾æ¸ æ¥ï¼ä¹ä¸äºè§£æ´ä¸ªæ¸¸æçç»æï¼åªæ¯åºäºå¥½å¥å°è¯äºä¸ä¸ï¼æé®é¢çè¯è¿è¯·å¤§å®¶å¤å¤æç ! 代ç ç»æ ä»è¯´ææ件æ¥çï¼è¿ä»½ä»£ç 主è¦å å«äºè¿äºé¨åï¼ code/Quake III Arena source code ( renderer, game code, OS layer etc. ) code/bspcbot routes compiler source code code/gamegoverns the game, runs on the server side. code/cgamegoverns the client side of the game, runs on the client side. code/uihandles the ui on the client side. lcc/the retargetable C compiler ( produces assembly to be turned into qvm bytecode by q3asm ) q3asm/assembly to qvm bytecode compiler q3map/map compiler ( .map -> .bsp ) - this is the version that comes with Q3Radiant f q3radiant/Q3Radiant map editor build f ( common/ and libs/ are support dirs for radiant ) ç¼è¯Quake III Arena ææçæ¯ç¼è¯ Quake III å¯ä¸çé£ä¸ªå¯æ§è¡æ件ã å¨code ç®å½ä¸é¢è½å¤æ¾å° quake3.sln è¿ä¸ª vs.net ç解å³æ¹æ¡æ件ï¼ä½ å°½å¯ä»¥æå¼å®ççå°åºé½æäºä»ä¹ä¸è¥¿ï¼ä¸è¿æå¨è¿éåªè°ç¼è¯ï¼æ以就æ¿å®å½ä¸ªé»çï¼ç´æ¥ç¼è¯äºã ç¼è¯Quake éè¦ DirectX SDK çæ¯æï¼å 为ç游æç®å½ä¸å å«çæ¯ DirectX 7.0 æ以æ估计 7.0 ç SDK å°±å¯ä»¥äºï¼ä¸è¿æä»ç¶ç¨äºææ°ç DirectX 9.0c å¹´å æçé£ä¸ªçæ¬ï¼å¯ä»¥å°å¾®è½¯çç½ç«ä¸å»ä¸è½½ãä¸è¿æä¸ç´ä¸ç解çæ¯ï¼æ®è¯´ Quake æ¯ä¸ä¸ªçº¯ OpenGL ç游æï¼æä¹å®çç¼è¯è¦ç¨å° DirectX å¢?æ 论å¦ä½å®è£ 好 DirectX SDK ä¹åï¼å°±å¯ä»¥ç¼è¯äºï¼ä¸è¿å¨æ¤ä¹åè¦ç¡®ä¿ä½ çæºå¨éå·²ç»å®è£ äº vs.net ï¼å¹¶ä¸ devenv.exe è¿ä¸ªæ件å¨ä½ ç path ç¯å¢åéä¸ã(devenv.exe å°±æ¯ vs.net éæå¼åç¯å¢çå¯æ§è¡æ件ï¼ä¸è¬çå®è£ ç®å½å¨ %ProgramFiles%\Microsoft Visual Studio .NET \Common7\IDE éé¢ã)æå¼å½ä»¤çªå£ï¼è¿å ¥ code ç®å½ï¼è¿è¡å½ä»¤ï¼ devenv quake3.sln /build release ä¸åºæå¤çè¯ï¼ç¼è¯ä¼é¡ºå©å®æï¼å ¶ä¸ä¼æå 个è¦åï¼ä¸è¿ä¸å½±åç»æãä¹åä½ ä¼å¨ release ç®å½ä¸æ¾å°ä¸å¤§å ç¼è¯å¥½çäºè¿å¶æ件ï¼ä¸è¿æç¨çä¼¼ä¹åªæé£ä¸ª quake3.exeã å®è£ Quake III Arena åªæ¯å ä¸ºå¨ code ç®å½ä¸é¢æä¸ä¸ª installrelease.bat æ件ï¼æ以è¿ä¸æ¥å°±å§ä¸å«åå®è£ å§ãå¨è¿è¡è¿ä¸æ¥ä¹åï¼è¿æ¯è¦åå¤ä¸ä¸ç¯å¢åéï¼å° code\win\mod-sdk-setup\bin è¿ä¸ªè·¯å¾å å ¥å° path ä¸ï¼å 为éè¦ç¨å° lcc å q3asm 两个ç¼è¯å·¥å ·ãç¶åæå¼ intallrelease.bat è¿ä¸ªæ件ï¼æ³¨éææåä¸è¡ååæ°ç¬¬ä¸è¡ï¼å¹¶ä¸å°åæ°ç¬¬äºè¡ä¸ç "_ta" å "g:" å»æï¼ä½¿å¾æåä¸è¡å为è¿æ ·ï¼ rem call closefiles copy release\quake3.exe \quake3\quake3.exe rem call installvms 为ä»ä¹è¦è¿æ ·åï¼ä»ç»ççä¹å°±æç½äºãé¦å æ¯æ ¹æ¬å°±æ²¡æ closefiles.bat è¿ä¸ªæ件ï¼ç¶åå° release ç®å½ä¸ç quake3.exe æ·è´å°æ ¹ç®å½ä¸ç quake3 åç®å½ä¸ãæåç installvms.bat åªä¸è¿æ¯åäºä¸ä¸ªç§»å¨æä½ï¼æ²¡æä»ä¹ç¨å¤ï¼å æ¤åªæ ·æ¹è¿ç intallrelease.bat æ件就å¯ä»¥å¾å¥½çå·¥ä½äºãæåè¿è¦ç¡®ä¿å¨æ ¹ç®å½ä¸æ²¡ä¸åå¨ quake3 è¿æ ·çç®å½ã 好äºï¼è¿ä¸ªæ¶åï¼åªè¦ç®åçæ§è¡ä¸ä¸è¿ä¸ªæ件ï¼å¾ ç»æåççæ ¹ç®å½ä¸æ¯å¦å¤äºä¸ä¸ª quake3 çç®å½ï¼éé¢å å«äº baseq3 å missionpack 两个åç®å½ï¼å ·ä½çç®å½ç»æå¦ä¸ï¼ Quake3 --||| |-- cgame.map| |-- cgame.qvm|-- baseq3 -- vm --|-- qagame.map| |-- qagame.qvm| |-- ui.map| |-- ui.qvm|| |-- cgame.map| |-- cgame.qvm
lcc币合法吗
你上网搜下《互联网传销识别指南(版)》里面有很好的解释~~~~
虚拟货币本身是开源程序,在Github社区维护。码例清远系统源码其总量限制的码例参数和方式,均显示在开源代码中。码例而传销货币的码例开源是完全抄袭别人的开源代码,且没有使用开源代码来搭建程序,码例所以其本质跟Q币一样是码例可受网站控制的。
(4)是码例否给出源代码链接。一般的码例长度指标源码去中心化数字货币都会在官网的显要位置给出源代码的链接,这样做是码例为了公开透明地展示货币系统的运作机制。而传销货币重点宣传的码例是充值购买交易流程,并不提及其运作机制,猎狐源码甚至网站都没有源代码的链接地址。
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\âååºç¨ç¨åº
çèµ·å§ç®å½ï¼å°å¨æé¾æ¥åºæ¾ç½®å¨è¿ä¸¤ä¸ªç®å½ä¸é½æ¯å¯ä»¥ç
通信达公式问题,超强组合指标公式,金融源码分享谁可以解释一下。我看不明白,源代码如下
{ 波段线}
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买点};