History

windows unicode and scroll wheel

Russ Cox committed 20 years ago

Commit 12ce9a31 parent 37ef3092 files · +10 −4Browse files

Unified · Split

2 files
  1. Make.win32 +1 −1
  2. gui-win32/screen.c +9 −3
Make.win32+1−1
@@ -10,7 +10,7 @@ CC=$(MING)gcc · 9 unmodified lines
1010 AS=$(MING)as
1111 RANLIB=$(MING)ranlib
1212 WINDRES=$(MING)windres
13−CFLAGS=-Wall -Wno-missing-braces -I$(ROOT)/include -I$(ROOT) -I$(ROOT)/kern -c -D_X86_ -DIS_32 -DWINDOWS -O2
13+CFLAGS=-Wall -Wno-missing-braces -I$(ROOT)/include -I$(ROOT) -I$(ROOT)/kern -c -D_X86_ -DIS_32 -DWINDOWS -DUNICODE -O2
1414 O=o
1515 FS=fs-win32
1616 IP=win32
gui-win32/screen.c+9−3
@@ -1,3 +1,4 @@
1+#define _WIN32_WINNT 0x0500
12 #include <windows.h>
23
34 #undef Rectangle
@@ -188,13 +189,13 @@ winproc(void *a) · 184 unmodified lines
188189 wc.hCursor = LoadCursor(NULL, IDC_ARROW);
189190 wc.hbrBackground = GetStockObject(WHITE_BRUSH);
190191 wc.lpszMenuName = 0;
191− wc.lpszClassName = "9pmgraphics";
192+ wc.lpszClassName = L"9pmgraphics";
192193 RegisterClass(&wc);
193194
194195 window = CreateWindowEx(
195196 0, /* extended style */
196− "9pmgraphics", /* class */
197− "drawterm screen", /* caption */
197+ L"9pmgraphics", /* class */
198+ L"drawterm screen", /* caption */
198199 WS_OVERLAPPEDWINDOW, /* style */
199200 CW_USEDEFAULT, /* init. x pos */
200201 CW_USEDEFAULT, /* init. y pos */
@@ -338,6 +339,11 @@ WindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) · 137 unmodified lines
338339 return 1;
339340 }
340341 return DefWindowProc(hwnd, msg, wparam, lparam);
342+ case WM_MOUSEWHEEL:
343+ if ((int)(wparam & 0xFFFF0000)>0)
344+ b|=8;
345+ else
346+ b|=16;
341347 case WM_MOUSEMOVE:
342348 case WM_LBUTTONUP:
343349 case WM_MBUTTONUP:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t