From 6c7ea5b3f8bffbc8d254b8e6924791f095354ccb Mon Sep 17 00:00:00 2001 From: mattuy Date: Sat, 1 Dec 2018 23:20:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=A7=E5=A0=86bu?= =?UTF-8?q?g=E4=B8=AD=E7=9A=84=E4=B8=80=E5=B0=8F=E5=A0=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 50 ++++++++-- conctrl/coding.cpp | 13 +-- conctrl/conctrl.cpp | 28 +++--- conctrl/conctrl.def | 5 +- conctrl/conctrl.h | 183 ++++++++++++++++++++----------------- conctrl/conctrl.vcxproj | 2 +- conctrl/console_window.cpp | 16 ++-- conctrl/pannel.cpp | 31 ++++--- conctrl/pannel.h | 5 +- conctrl/spliter.cpp | 4 + conctrl/spliter.h | 1 + test/test.vcxproj | 120 ++++++++++++++++++++++++ test/test.vcxproj.filters | 17 ++++ 13 files changed, 341 insertions(+), 134 deletions(-) create mode 100644 test/test.vcxproj create mode 100644 test/test.vcxproj.filters diff --git a/README.md b/README.md index 86b4d24..53a1d9b 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@   你可以为每一**行**设定字符格式,字符格式由Windows的一些常量定义。 + + ## 开发环境   Windows,Visual Studio 2017 @@ -22,10 +24,13 @@   此库通过调用Windows API实现,因此仅适用于Windows系统。 -## 使用示例 -* ### C/C++ - 将conctrl.dll和conctrl.h放到同一目录; - +## 使用方法 +* ### C++ + 将conctrl.h,conctrl.dll和conctrl.lib放在源代码目录,并在源代码中添加: + > `#include "conctrl.h"` + > `#pragma comment(lib, "conctrl.lib")` + + 查看示例 * ### 其他语言 @@ -39,10 +44,41 @@ * 其他 -## 辅助资料 - +## 使用示例 + +### C++(VC) +```C++ +#include +#include +#include "conctrl.h" +#pragma comment(lib, "conctrl.lib") +int main() { + ConsoleWindow* window = CreateConsoleWindow(80, 40); + Pannel* messagePannel = CreatePannel(window, 0, 0, 78, 25); + Pannel* writePannel= CreatePannel(window, 0, 26, 80, 40); + Spliter* spliter = CreateSpliter(window, 0, 25, 80, false, FOREGROUND_GREEN); + AddPannelLine(messagePannel, "请在下方区域输入任意内容", false); + FocusOnPannel(writePannel, 0, 0); + while (true) { + char str[1024]; + gets_s(str, 1024); + AddPannelLine(messagePannel, str, false, FOREGROUND_RED|FOREGROUND_GREEN); + ClearPannel(writePannel); + FocusOnPannel(writePannel, 0, 0); + } +} +``` +```C + +``` + + +## 辅助资料 + + ### Windows控制台字符样式常量 + 定义于consoleapi2.h,使用引入windows.h或自定义 ```C #define FOREGROUND_BLUE 0x0001 // text color contains blue. @@ -64,4 +100,4 @@ ``` ## 项目地址 -[https://github.com/mattuylee/conctrl.git](https://github.com/mattuylee/conctrl.git) \ No newline at end of file +[https://github.com/mattuylee/conctrl.git](https://github.com/mattuylee/conctrl.git) diff --git a/conctrl/coding.cpp b/conctrl/coding.cpp index 2661fe4..7cd1ad8 100644 --- a/conctrl/coding.cpp +++ b/conctrl/coding.cpp @@ -6,22 +6,23 @@ //utf8ıתΪANSI(GBK) std::string UTF8ToANSI(const char* str) { //ͳַ - int wideCharCount = MultiByteToWideChar(CP_UTF8, 0, str, strlen(str), NULL, 0); + int wideCharCount = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0); if (wideCharCount == 0) { return "?"; } //ΪUnicodeռ - wchar_t* wideCharBufer = (wchar_t*)malloc(sizeof(wchar_t) * wideCharCount); + //ע˴ؽڴʼΪ0ֵΪMultiByteToWideCharΪδ֪ԭƺ'\0' + wchar_t* wideCharBufer = (wchar_t*)calloc(wideCharCount, sizeof(wchar_t)); //תUnicode MultiByteToWideChar(CP_UTF8, 0, str, strlen(str), wideCharBufer, wideCharCount); //תΪANSI - int multiByteCharCount = WideCharToMultiByte(CP_ACP, 0, wideCharBufer, wideCharCount, NULL, 0, NULL, NULL); - char* mutiByteCharBuffer = (char*)malloc(sizeof(char) * multiByteCharCount); - int result = WideCharToMultiByte(CP_ACP, 0, wideCharBufer, wideCharCount, mutiByteCharBuffer, multiByteCharCount, NULL, NULL); + int multiByteCharCount = WideCharToMultiByte(936, 0, wideCharBufer, wideCharCount, NULL, 0, NULL, NULL); + char* mutiByteCharBuffer = (char*)calloc(multiByteCharCount, sizeof(char)); + int result = WideCharToMultiByte(936, 0, wideCharBufer, wideCharCount, mutiByteCharBuffer, multiByteCharCount, NULL, NULL); if (!result) return "???"; std::string text(mutiByteCharBuffer); free(mutiByteCharBuffer); free(wideCharBufer); return text; -} +} \ No newline at end of file diff --git a/conctrl/conctrl.cpp b/conctrl/conctrl.cpp index 961eea3..450a0b0 100644 --- a/conctrl/conctrl.cpp +++ b/conctrl/conctrl.cpp @@ -1,4 +1,4 @@ -#include +#define _CRT_SECURE_NO_WARNINGS #include "console_window.h" #include "pannel.h" #include "spliter.h" @@ -9,11 +9,17 @@ ConsoleWindow* CreateConsoleWindow(int width, int height) { if (width <= 5 || height <= 5 || width > 32767 || height > 32767) return new(std::nothrow) ConsoleWindow(); - else + else { return new(std::nothrow) ConsoleWindow(width, height); + } } + +void DestroyConsoleWindow(ConsoleWindow* window) { + delete window; +} + //ôںͻС -bool ResizeConsoleWindow(ConsoleWindow* window, int width, int height) { +bool ResizeScreenBuffer(ConsoleWindow* window, int width, int height) { if (width <= 5 || height <= 5 || width > 32767 || height > 32767) return false; return window->Resize({ (SHORT)width, (SHORT)height }); @@ -29,10 +35,10 @@ bool SetConsoleWindowTitle(char* _title, bool utf8) { } //һ Pannel* CreatePannel(ConsoleWindow* window, int left, int top, int width, int height) { - if (left < 0 || top < 0 || width <= 5 || height <= 5 + if (left < 0 || top < 0 || left > 32767 || top > 32767 || width > 32767 || height > 32767 ) return NULL; - return window->NewPannel({ (SHORT)left, (SHORT)top, (SHORT)width - 1, (SHORT)height - 1 }); + return window->NewPannel({ (SHORT)left, (SHORT)top, (SHORT)(left + width - 1), (SHORT)(top + height - 1) }); } //ɾ void DestroyPannel(ConsoleWindow* window, Pannel* pannel) { @@ -45,18 +51,18 @@ bool SetMaxLineCache(Pannel* pannel, int lineCount) { return true; } //Pannelı -void AddPannelText(Pannel* pannel, const char* _text, bool utf8, int attribute) { +void AddPannelText(Pannel* pannel, const char* _text, bool focus, bool utf8, int attribute) { std::string text; if (utf8) text = UTF8ToANSI(_text); else text = _text; - pannel->AddText(text, attribute); + pannel->AddText(text, focus, attribute); } //Pannel -void AddPannelLine(Pannel* pannel, const char* _text, bool utf8, int attribute) { +void AddPannelLine(Pannel* pannel, const char* _text, bool focus, bool utf8, int attribute) { std::string text; if (utf8) text = UTF8ToANSI(_text); else text = _text; - pannel->AddLine(text, attribute); + pannel->AddLine(text, focus, attribute); } //Pannel void ClearPannel(Pannel* pannel) { @@ -69,7 +75,7 @@ bool MovePannel(Pannel* pannel, int left, int top, int width, int height) { if (top < 0) top = pannel->area.Top; if (width <= 5) width = pannel->area.Right - pannel->area.Left + 1; if (height <= 5) height = pannel->area.Bottom - pannel->area.Top+ 1; - pannel->Move({ (SHORT)left, (SHORT)top, (SHORT)width - 1, (SHORT)height - 1}); + pannel->Move({ (SHORT)left, (SHORT)top, (SHORT)(left + width - 1), (SHORT)(top + height - 1)}); return true; } //ǰ @@ -86,7 +92,7 @@ bool ScrollPannelTo(Pannel* pannel, int lineTo) { } //õضλ bool FocusOnPannel(Pannel* pannel, int offsetLeft, int offsetTop) { - return pannel->Focus({ (SHORT)offsetLeft, (SHORT)offsetTop}); + return pannel->Focus({ (SHORT)offsetLeft, (SHORT)offsetTop }); } //һָߡ Spliter* CreateSpliter(ConsoleWindow* window, int left, int top, int length, bool verticle, int attribute) { diff --git a/conctrl/conctrl.def b/conctrl/conctrl.def index b64a85c..a9f3766 100644 --- a/conctrl/conctrl.def +++ b/conctrl/conctrl.def @@ -2,7 +2,8 @@ LIBRARY conctrl EXPORTS CreateConsoleWindow -ResizeConsoleWindow +DestroyConsoleWindow +ResizeScreenBuffer SetConsoleWindowTitle CreatePannel DestroyPannel @@ -17,4 +18,4 @@ ScrollPannelTo FocusOnPannel CreateSpliter DestroySpliter -MoveSpliter +MoveSpliter \ No newline at end of file diff --git a/conctrl/conctrl.h b/conctrl/conctrl.h index fc37927..b215540 100644 --- a/conctrl/conctrl.h +++ b/conctrl/conctrl.h @@ -3,93 +3,104 @@ // By Mattuy #ifndef _HEAD_CONSOLE_CONTROLLER_ #define _HEAD_CONSOLE_CONTROLLER_ +#ifdef __cplusplus //cpp class ConsoleWindow; class Pannel; class Spliter; -/** - * ̨ - * @return value, ָǰ̨Ŀָ̨룬ΪIJͨ - * ̨ʧܷ0 - * @param width, ̨ڿȣЧΧ(5, 32767)Ĭ80 - * @param height, ̨ڸ߶ȣЧΧ(5, 32767)Ĭ40 - */ -ConsoleWindow* CreateConsoleWindow(int width = 80, int height = 40); -//ôںͻС -bool ResizeConsoleWindow(ConsoleWindow* window, int width, int height); -/** - * ÿ̨ڱ - * @param window, ҪñĴ - * @param title, Ҫõı - * @param utf8, Ƿutf8롣UTF-8Ϊ0ANSI - */ -bool SetConsoleWindowTitle(char* title, bool utf8 = false); -/** - * һ - * @return value, ָһָ - * @param window, - * @param left, ԴڵˮƽƫƣЧΧ(5, 32767) - * @param top, ԴڵֱƫƣЧΧ(5, 32767) - * @param width, ĿȣЧΧ(5, 32767) - * @param height, ĸ߶ȣЧΧ(5, 32767) - */ -Pannel* CreatePannel(ConsoleWindow* window, int left, int top, int width, int height); -//ɾ -void DestroyPannel(ConsoleWindow* window, Pannel* pannel); -//ôлС -bool SetlMaxLineCache(Pannel* pannel, int lineCount); -/** - * PannelıлһвǻзβáAddPannelLineӵģ - * ıϲһСԭıҲᱻǡ - * @param window, - * @param text, Ҫӵַ - * @param utf8, Ƿutf8롣֧ANSIUTF-8룬UTF-8ҲתΪANSI - * 롣ĬΪfalse - * @param attribute, ıԣWindowsĿ̨ĬϺڵװ - */ -void AddPannelText(Pannel* pannel, const char* text, bool utf8 = false, int attribute = 7); -//AddTextΨһIJͬǣַԻзβԶ뻻з -void AddPannelLine(Pannel* pannel, const char* text, bool utf8 = false, int attribute = 7); -//Pannel⽫ͬʱpannelл -void ClearPannel(Pannel* pannel); -//ƶıPannelСͬCreatePannelЧ÷ı -bool MovePannel(Pannel* pannel, int left, int top, int width, int height); -/** - * ǰ - * @return value, ǰѴfalse򷵻true - * @param pannel, ҪĴ - * @param lineCount, ҪС0һԴ - */ -bool ScrollPannelBackward(Pannel* pannel, int lineCount); -// -bool ScrollPannelForward(Pannel* pannel, int lineCount); -//ضСкС0󣬷кЧfalse -bool ScrollPannelTo(Pannel* pannel, int lineTo); -/** - * õضλá - * @return value, offsetΧʧ - * @param pannel, ҪùڵĴ - * @param offsetLeft, ԴϽǵˮƽƫƣĬΪ0 - * @param offsetTop, ԴϽǵĴֱƫƣĬΪ0 - */ -bool FocusOnPannel(Pannel* pannel, int offsetLeft = 0, int offsetTop = 0); -/** - * һָߡ - * @return value, ָһָߵָ - * @param window, Ĵ - * @param left, ָԴڵˮƽƫƣЧΧ(5, 32767) - * @param top, ָԴڵֱƫƣЧΧ(5, 32767) - * @param length, ָߵijȻȡǰ߻Ǻȡ@param verticle - * @param verticle, ˮƽָ߻ֱָߡ0Ϊˮƽ0Ϊֱ - * @param attribute, ָߵıԣWindowsĿ̨ĬϺڵװ - */ -Spliter* CreateSpliter(ConsoleWindow* window, int left, int top, int length, bool verticle, int attribute = 7); -//ɾָ -void DestroySpliter(Spliter* spliter); -/** - * ƶ趨ָߵij - * @param left, ԴˮƽƫƣС0򲻸ı - * @param top, ԴڵĴֱƫƣС0򲻸ı - * @param len, µij/߶ȡС0򲻸ı - */ -bool MoveSpliter(int left, int top, int len); +#else //C +typedef void ConsoleWindow; +typedef void Pannel; +typedef void Spliter; +#endif +extern "C" { + /** + * ̨ + * @return value, ָǰ̨Ŀָ̨룬ΪIJͨ + * ̨ʧܷ0 + * @param width, ĻȣЧΧ(5, 32767)Ĭ80 + * @param height, Ļ߶ȣЧΧ(5, 32767)Ĭ40 + */ + ConsoleWindow* CreateConsoleWindow(int width = 80, int height = 40); + //ԭ̨ٿ + void DestroyConsoleWindow(ConsoleWindow* window); + //ôںͻС + bool ResizeScreenBuffer(ConsoleWindow* window, int width, int height); + /** + * ÿ̨ڱ + * @param window, ҪñĴ + * @param title, Ҫõı + * @param utf8, Ƿutf8롣UTF-8Ϊ0ANSI + */ + bool SetConsoleWindowTitle(char* title, bool utf8 = false); + /** + * һ + * @return value, ָһָ + * @param window, + * @param left, ԴڵˮƽƫƣЧΧ(5, 32767) + * @param top, ԴڵֱƫƣЧΧ(5, 32767) + * @param width, ĿȣЧΧ(5, 32767) + * @param height, ĸ߶ȣЧΧ(5, 32767) + */ + Pannel* CreatePannel(ConsoleWindow* window, int left, int top, int width, int height); + //ɾ + void DestroyPannel(ConsoleWindow* window, Pannel* pannel); + //ôлС + bool SetMaxLineCache(Pannel* pannel, int lineCount); + /** + * PannelıлһвǻзβáAddPannelLineӵģ + * ıϲһСԭıҲᱻǡ + * @param window, + * @param text, Ҫӵַ + * @param focus, Ƿ񽫹ƶӵı + * @param utf8, Ƿutf8롣֧ANSIUTF-8룬UTF-8ҲתΪANSI + * 롣ĬΪfalse + * @param attribute, ıԣWindowsĿ̨ĬϺڵװ + */ + void AddPannelText(Pannel* pannel, const char* text, bool focus, bool utf8 = false, int attribute = 7); + //AddTextΨһIJͬǣַԻзβԶ뻻з + void AddPannelLine(Pannel* pannel, const char* text, bool focus, bool utf8 = false, int attribute = 7); + //Pannel⽫ͬʱpannelл + void ClearPannel(Pannel* pannel); + //ƶıPannelСͬCreatePannelЧ÷ı + bool MovePannel(Pannel* pannel, int left, int top, int width, int height); + /** + * ǰ + * @return value, ǰѴfalse򷵻true + * @param pannel, ҪĴ + * @param lineCount, ҪС0һԴ + */ + bool ScrollPannelBackward(Pannel* pannel, int lineCount); + // + bool ScrollPannelForward(Pannel* pannel, int lineCount); + //ضСкС0󣬷кЧfalse + bool ScrollPannelTo(Pannel* pannel, int lineTo); + /** + * õضλá + * @return value, offsetΧʧ + * @param pannel, ҪùڵĴ + * @param offsetLeft, ԴϽǵˮƽƫƣĬΪ0 + * @param offsetTop, ԴϽǵĴֱƫƣĬΪ0 + */ + bool FocusOnPannel(Pannel* pannel, int offsetLeft = 0, int offsetTop = 0); + /** + * һָߡ + * @return value, ָһָߵָ + * @param window, Ĵ + * @param left, ָԴڵˮƽƫƣЧΧ(5, 32767) + * @param top, ָԴڵֱƫƣЧΧ(5, 32767) + * @param length, ָߵijȻȡǰ߻Ǻȡ@param verticle + * @param verticle, ˮƽָ߻ֱָߡ0Ϊˮƽ0Ϊֱ + * @param attribute, ָߵıԣWindowsĿ̨ĬϺڵװ + */ + Spliter* CreateSpliter(ConsoleWindow* window, int left, int top, int length, bool verticle, int attribute = 7); + //ɾָ + void DestroySpliter(ConsoleWindow* window, Spliter* spliter); + /** + * ƶ趨ָߵij + * @param left, ԴˮƽƫƣС0򲻸ı + * @param top, ԴڵĴֱƫƣС0򲻸ı + * @param len, µij/߶ȡС0򲻸ı + */ + bool MoveSpliter(Spliter* spliter, int left, int top, int len); +} #endif // !_HEAD_CONSOLE_CONTROLLER_ diff --git a/conctrl/conctrl.vcxproj b/conctrl/conctrl.vcxproj index 7a2d09a..9f35470 100644 --- a/conctrl/conctrl.vcxproj +++ b/conctrl/conctrl.vcxproj @@ -57,7 +57,7 @@ MultiByte - DynamicLibrary + Application true v141 MultiByte diff --git a/conctrl/console_window.cpp b/conctrl/console_window.cpp index 0b795b7..a6fba3c 100644 --- a/conctrl/console_window.cpp +++ b/conctrl/console_window.cpp @@ -21,6 +21,7 @@ bool ConsoleWindow::InitWindow() { //趨ڻС bool ConsoleWindow::Resize(COORD size) { + bool success = false; //¼ԭĴϢ CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo(this->hOutput, &info); @@ -29,14 +30,13 @@ bool ConsoleWindow::Resize(COORD size) { SMALL_RECT rect = { 0, 0, 5, 5 }; if (!SetConsoleWindowInfo(this->hOutput, true, &rect)) return false; - if (!SetConsoleScreenBufferSize(hOutput, { size.X, size.Y })) { - SetConsoleWindowInfo(this->hOutput, true, &info.srWindow); //ԭ - return false; - } - //ôڴС - rect = { 0, 0, size.X - 1, size.Y - 1 }; - SetConsoleWindowInfo(this->hOutput, true, &rect); - return true; + success = SetConsoleScreenBufferSize(hOutput, { size.X, size.Y }); + rect = info.srWindow; + // + if (rect.Right - rect.Left + 1 > size.X || !success) rect.Right = rect.Left + size.X - 1; + if (rect.Bottom - rect.Top + 1 > size.Y || !success) rect.Bottom = rect.Top + size.Y - 1; + SetConsoleWindowInfo(this->hOutput, true, &rect); //ԭ + return success; } // diff --git a/conctrl/pannel.cpp b/conctrl/pannel.cpp index 1cf183a..3b69daf 100644 --- a/conctrl/pannel.cpp +++ b/conctrl/pannel.cpp @@ -7,6 +7,10 @@ Pannel::Pannel(ConsoleWindow* _controller, SMALL_RECT rect) { this->from = -1; //Ĭϴӡ this->maxLineCount = 4096; } +Pannel::~Pannel() { + this->clearScreen(); +} + // void Pannel::SetMaxLine(SHORT lineCount) { if (lineCount < 0) lineCount = 0; @@ -57,13 +61,8 @@ void Pannel::Move(SMALL_RECT rect) { } //·ָı this->Flush(); } -/** - * 򴰸ı - * @return value, ɹtrue, 򷵻false - * @param text, Ҫдı - * @param attribute, ıԣ FORGROUND_*BACKGROUND_* - */ -void Pannel::AddText(std::string text, int attribute) { +//򴰸ı +void Pannel::AddText(std::string text, bool focus, int attribute) { //Ҫӵıһƴӡÿεñֱд if (this->lines.size() > 0 && !this->isTrueLine(lines.back())) { text = this->lines.back().text + text; @@ -81,12 +80,22 @@ void Pannel::AddText(std::string text, int attribute) { line.attribute = attribute; this->lines.push_back(line); } //µı + //ѹõӵı֮ + if (focus && this->lines.size()) { + COORD coord; + coord.X = isTrueLine(lines.back()) ? 0 : this->lines.back().text.size(); + if (this->lines.size() > this->area.Bottom - this->area.Top + 1) coord.Y = this->area.Bottom; + else coord.Y = this->lines.size() - 1; + coord.Y = isTrueLine(lines.back()) ? coord.Y + 1 : coord.Y; + this->Focus(coord); + } + else if (focus) this->Focus({ 0,0 }); this->Flush(); } // -void Pannel::AddLine(std::string text, int attribute) { +void Pannel::AddLine(std::string text, bool focus, int attribute) { if (text.size() && !this->isTrueLine(text)) text += '\n'; - this->AddText(text, attribute); + this->AddText(text, focus, attribute); }; //ˢʾ @@ -159,8 +168,8 @@ bool Pannel::Focus(COORD _coord){ return false; } COORD coord; - coord.X = this->area.Left + _coord.X; - coord.Y = this->area.Top + _coord.Y; + coord.X = this->area.Left +_coord.X; + coord.Y = this->area.Top +_coord.Y; return SetConsoleCursorPosition(this->window->hOutput, coord); } diff --git a/conctrl/pannel.h b/conctrl/pannel.h index 2d85871..09b75b2 100644 --- a/conctrl/pannel.h +++ b/conctrl/pannel.h @@ -14,6 +14,7 @@ public: SHORT maxLineCount; //󱣴ı SMALL_RECT area; //򣨰߿ Pannel(ConsoleWindow* window, SMALL_RECT rect); + ~Pannel(); //󻺴 void SetMaxLine(SHORT lineCount); //մı @@ -21,9 +22,9 @@ public: //ƶôС void Move(SMALL_RECT rect); //򴰸мı - void AddText(std::string text, int attribute = 7); + void AddText(std::string text, bool focus = false, int attribute = 7); //򴰸мı - void AddLine(std::string text, int attribute = 7); + void AddLine(std::string text, bool focus = false, int attribute = 7); //ضпʼӡһthis.fromЧӡһ void Flush(); //ǰǰѵǰҳfalse򷵻true diff --git a/conctrl/spliter.cpp b/conctrl/spliter.cpp index 9835dc5..38e2288 100644 --- a/conctrl/spliter.cpp +++ b/conctrl/spliter.cpp @@ -10,6 +10,10 @@ Spliter::Spliter(ConsoleWindow* window, COORD pos, SHORT len, bool verticle, WOR this->draw(); } +Spliter::~Spliter() { + this->Clear(); +} + void Spliter::Clear() { this->draw(true); } diff --git a/conctrl/spliter.h b/conctrl/spliter.h index d864330..79fee17 100644 --- a/conctrl/spliter.h +++ b/conctrl/spliter.h @@ -11,6 +11,7 @@ public: COORD position; //λ SHORT length; ///߶ Spliter(ConsoleWindow* window, COORD pos, SHORT len, bool verticle, WORD attr = 7); + ~Spliter(); //Ļ void Clear(); //ƶó diff --git a/test/test.vcxproj b/test/test.vcxproj new file mode 100644 index 0000000..f7e7a8e --- /dev/null +++ b/test/test.vcxproj @@ -0,0 +1,120 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {629BA97E-AE88-4F62-8ABB-EDBC575D5284} + test + 10.0.17134.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + Level3 + Disabled + true + true + + + + + Level3 + Disabled + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + + \ No newline at end of file diff --git a/test/test.vcxproj.filters b/test/test.vcxproj.filters new file mode 100644 index 0000000..4863ddb --- /dev/null +++ b/test/test.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + \ No newline at end of file