输出测试,RenderableString基本完成

This commit is contained in:
EmsiaetKadosh
2025-01-17 16:36:39 +08:00
parent 2b7f05d928
commit 1007ac469a
10 changed files with 433 additions and 16 deletions
+15
View File
@@ -1,5 +1,6 @@
#include "includes.h"
#include "Text.h"
LRESULT __stdcall WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {
@@ -158,6 +159,20 @@ int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCm
ShowWindow(MainWindowHandle, nCmdShow);
InteractManager::initialize();
Renderer::initialize();
SetConsoleOutputCP(65001);
const String string = String(L"\\#12345678Hello\\/\\f\1Well\\.87654321你好\\r\\r\\u\\-");
std::cout << "你好" << std::endl;
std::wcout.imbue(std::locale("zh_CN"));
std::wcout
<< sizeof(L"你好") << " " << sizeof("Hu") << std::endl
<< L"GetConsoleOutputCP => " << GetConsoleOutputCP() << std::endl
#if defined(UNICODE)
<< L"UNICODE" << std::endl
#else
<< L"Non-UNICODE" << std::endl
#endif
<< string << std::endl
<< RenderableString(string).toString() << std::endl;
HACCEL hAccelTable = LoadAcceleratorsW(hInstance, MAKEINTRESOURCE(109));
MSG msg = { nullptr };
while (GetMessageW(&msg, nullptr, 0, 0)) {