Created
August 27, 2018 16:04
-
-
Save peterooch/bb224298366069ba182fbfe3f2c01f18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modules/rostests/win32/user32/biditext/biditext.c | 19 +++++++++++++++++-- | |
1 file changed, 17 insertions(+), 2 deletions(-) | |
diff --git a/modules/rostests/win32/user32/biditext/biditext.c b/modules/rostests/win32/user32/biditext/biditext.c | |
index cc714c40f7..e8c02a8475 100644 | |
--- a/modules/rostests/win32/user32/biditext/biditext.c | |
+++ b/modules/rostests/win32/user32/biditext/biditext.c | |
@@ -170,11 +170,26 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) | |
case WM_PAINT: | |
{ | |
+ enum | |
+ { | |
+ ALEF = 0x5D0, | |
+ BET, | |
+ GIMEL, | |
+ DALET, | |
+ HEY, | |
+ VAV, | |
+ ZAYIN, | |
+ HET, | |
+ TET, | |
+ YUD | |
+ }; | |
+ | |
PAINTSTRUCT ps; | |
HDC hdc = BeginPaint(hWnd, &ps); | |
- LPWSTR szString = L"אבגדהABCDוזחטי"; | |
+ const WCHAR szString[] = {ALEF, BET, GIMEL, DALET, HEY, 'A', 'B','C','D', VAV, ZAYIN, HET, TET, YUD, 0}; | |
+ const WCHAR szReversedString[] = {HEY, DALET, GIMEL, BET, ALEF, 'A', 'B', 'C', 'D', YUD, TET, HET, ZAYIN, VAV, 0}; | |
int Len = (int)wcslen(szString); | |
WCHAR Glyphs[100] = { 0 }; | |
@@ -188,7 +203,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) | |
TextOutW(hdc, 10, 10, L"Proper (string being used):", 27); | |
TextOutW(hdc, 200, 10, szString, 14); | |
TextOutW(hdc, 10, 30, L"Reversed (example):", 19); | |
- TextOutW(hdc, 200, 30, L"הדגבאABCDיטחזו", 14); | |
+ TextOutW(hdc, 200, 30, szReversedString, 14); | |
TextOutW(hdc, 10, 50, L"String with NULL LpkETO call (not reversed):", 44); | |
LpkExtTextOut(hdc, 10, 70, 0, NULL, szString, Len, NULL, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment