⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 findword.h

📁 屏幕取词源码.zip
💻 H
字号:
#ifndef __YAN_H__
#define __YAN_H__

#define HAS_CURMOUSEWORD  1
#define NO_CURMOUSEWORD   0

#define CHAR_TYPE_ASCII 0           // the current character is a...z or A...Z
#define CHAR_TYPE_HZ    1           // the currnet character is chinese.
#define CHAR_TYPE_OTHER 2           // other character.
#define CHAR_LINK       '-'

#define SEPERATOR       2

#define MAX_CHAR_HEIGHT 40

int  GetCharType(char ch);
int  FindAWord(LPCSTR lpString, int nFromPlace, int nLength);
int  FindDWord(LPCSTR lpString, int nFromPlace, int nLength);
int  FindTWWord(LPCSTR lpString, int nFromPlace, int nLength);
BOOL IsASCIIWord(LPCSTR lpString, int nFromPlace, int nLength, int nCurCharNum);
int  FindHZWord(LPCSTR lpString, int nFromPlace, int nLength);
int  FindNextWordBegin(LPCSTR lpString, int nFromPlace, int nLength);
int  GetCurWordEnd(LPCSTR lpString, int nFromPlace, int nLength, int nCharType);
void CopyWord(LPSTR lpWord, LPCSTR lpString, int nBegin, int nEnd);

void GetStringTopBottom(HDC hDC, int y, RECT* lpStringRect);
void GetStringLeftRight(HDC hDC, LPSTR szBuff, int cbLen, int x, RECT* lpStringRect, int FAR* lpDx);
void GetStringRect(HDC hDC, LPSTR szBuff, int cbLen, int x, int y, RECT* lpStringRect, int FAR* lpDx);

DWORD GetCurMousePosWord(HDC   hDC, 
						 LPSTR szBuff, 
						 int   cbLen, 
						 int   x, 
						 int   y, 
						 int   FAR* lpDx);

DWORD CheckMouseInCurWord(HDC   hDC, 
						 LPSTR szBuff, 
						 int   cbLen, 
						 int   x, 
						 int   y, 
						 int   FAR* lpDx,
						 int*  lpLeft,
						 int   nBegin,    // = nPrevWord + 1
						 int   nEnd,
						 int   nCharType);
DWORD CalculateCaretPlace(HDC   hDC, 
						   LPSTR szBuff, 
						   int   cbLen, 
						   int   x, 
						   int   y, 
						   int   FAR* lpDx,
						   int   nBegin,    // = nPrevWord + 1
						   int   nEnd,
						   int   nCharType);
DWORD GetEngLishCaretPlace(HDC   hDC, 
						   LPSTR szBuff,
							int   x,
							int   y,
							int   FAR* lpDx,
							int   nBegin,    // = nPrevWord + 1
							int   nEnd,
							int   TempPlace,
							int   turnto);
int GetHZBeginPlace(LPSTR lpszHzBuff, int nBegin, int nEnd, LPRECT StringRect);
void AddToTotalWord(LPSTR szBuff, 
					int   cbLen, 
					int   nBegin,
					int   nEnd,
					int   nCharType,
					RECT  StringRect,
					BOOL  bInCurWord);

BOOL CalcCaretInThisPlace(int CaretX, int nPlace);

// deal with memdc string.
#define MEMDC_TOTALWORD -1

void AddToTextOutBuffer(HDC hMemDC, LPSTR szBuff, int cbLen, int x, int y, int FAR* lpDx);
void GetMemWordStringRect(int nWordCode, int nOffset, LPRECT lpStringRect);
void CheckMemDCWordBuffer(HDC hdcSrc);
DWORD CheckMouseInMemDCWord(int nWordCode);
DWORD CalculateCaretPlaceInMemDCWord(int nWordCode);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -