void CReadDictionaryDlg::OnRead()
{
// TODO: Add your control notification handler code here
char chRead[1] = {0};
CFile flRead;]
//BOOL bOpen = flRead.Open("CK-N4.PMS",CFile::modeRead|CFile::typeBinary);
BOOL bOpen = flRead.Open("CK-TL.PMS",CFile::modeRead|CFile::typeBinary);
//There are three colum for a English word:Word alphabet, Phenonen, Chinese Notation
BOOL bFirstWord = FALSE, bSecondWord = FALSE, bThirdWord = FALSE;
//Encount a space first time
BOOL bFirstEncounterSpace = FALSE;
std::string strWord[3];
int iWordEncounter = 0;
int nGroup25 = 0;
if(bOpen)
{
flRead.Seek(0xbc1,CFile::begin);
const int nLength = flRead.GetLength() - 0xbc2 -0x67B;
int nPos = 0;
flRead.Read((void*)chRead,1);
bFirstWord = !bFirstWord;
while( nPos != nLength)
{
flRead.Read((void*)chRead,1);
if(chRead[0] == 0x20)
{
if(!bFirstEncounterSpace)
{
bFirstEncounterSpace = TRUE;
iWordEncounter ++;
nGroup25 ++;
if(iWordEncounter%3 != 2)
{
char chTemp[80];
strcpy(chTemp,strWord[iWordEncounter-1].c_str());
m_strDisplayWord += strWord[iWordEncounter-1].c_str();
m_strDisplayWord += "/r/n";
}
}
}
else
{
if(bFirstEncounterSpace)
{
if(!(nGroup25%75))
{
static int nTemp = 1;
nTemp ++;
bFirstEncounterSpace = FALSE;
flRead.Seek(79, CFile::current);
nPos += 80;
strWord[iWordEncounter] = "";
}
else
{
bFirstEncounterSpace = FALSE;
iWordEncounter = (iWordEncounter)%3;
strWord[iWordEncounter] = "";
strWord[iWordEncounter] += chRead[0];
}
}
else
{
strWord[iWordEncounter] += chRead[0];
}
}
nPos ++;
}
flRead.Close();
}
UpdateData(FALSE);
}
分享到:
相关推荐
This HOWTO for programmers discusses how to create and use program libraries on Linux. This includes static libraries, shared libraries, and dynamically loaded libraries.
A notepad like program that shows how to read from a txt file and how to create one in a most simple way... only 10Kb.
国外大牛写的经典的linux库编程教程 ,做成了pdf,带书签,方便阅读 http://tldp.org/HOWTO/Program-Library-HOWTO/index.html 静态库,动态加载的概念和用法等等
C++ PROGRAMMING: FROM PROBLEM ANALYSIS TO PROGRAM DESIGN, Seventh Edition remains the definitive text for a first programming language course. D.S. Malik's time-tested, student-centered methodology ...
C# Programming From Problem Analysis to Program Design(4th) 英文无水印pdf 。。
PDF Extract TIFF software is a simple and affordable extraction tool that facilitates the reuse of PDF files by enabling you to extract images from PDF files and save them as TIFF images. You can ...
A small program that can be used to rename files AND extensions... I got tired of using DOS to rename the files.
C++ Programming From Problem Analysis to Program Design 8th 最新版2018 涵盖最新C++ 14标准 高清PDF 1400多页
While most famously used to introduce kids to programming, Scratch can make computer science approachable for people of any age. Rather than type countless lines of code in a cryptic programming ...
In this article, I'll show you how to use Windows Mixer from C#. <br>For some time, I was trying to get information about how to program the mixer from C#. I didn't have too much luck, and the few ...
This can be used to create a redirect to a larger library file that contains that function and others related to it. The script compiler (ahk2exe) also supports library functions. However, it ...
C# Programming: From Problem Analysis to Program Design 1184 pages Publisher: Cengage Learning; 4 edition (April 30, 2013) Language: English ISBN-10: 1285096266 ISBN-13: 978-1285096261 Only...
W ELCOME TO THE F IFTH EDITION OF C++ Programming: From Problem Analysis to Program Design. Designed for a first Computer Science (CS1) C++ course, this text provides a breath of fresh air to you and ...
C++ Programming: From Problem Analysis to Program Design By 作者: D. S. Malik ISBN-10 书号: 1337102083 ISBN-13 书号: 9781337102087 Edition 版本: 8 出版日期: 2017-02-13 pages 页数: 1491 Contents ...
C++ Programming From Problem Analysis to Program Design
RoboCon (as in Robot Control) is software used to control a robot using a laptop, or any other computer with a serial port. It includes the files necessary for developers to create a program of their ...
The library has been used to create a program which moves a knight randomly around a board, given an initial starting position and a total number of moves to make. Problem: ======== Extend this ...
Get a solid understanding of Java fundamentals through series of practical steps to the actual real programming Key Features Take your first steps into the world of programming Understand what a ...
This conveniently placed program allows you to log off from your system tray.