windows unicode and scroll wheel
This commit is contained in:
parent
37ef30916c
commit
12ce9a3cf5
@ -10,7 +10,7 @@ CC=$(MING)gcc
|
|||||||
AS=$(MING)as
|
AS=$(MING)as
|
||||||
RANLIB=$(MING)ranlib
|
RANLIB=$(MING)ranlib
|
||||||
WINDRES=$(MING)windres
|
WINDRES=$(MING)windres
|
||||||
CFLAGS=-Wall -Wno-missing-braces -I$(ROOT)/include -I$(ROOT) -I$(ROOT)/kern -c -D_X86_ -DIS_32 -DWINDOWS -O2
|
CFLAGS=-Wall -Wno-missing-braces -I$(ROOT)/include -I$(ROOT) -I$(ROOT)/kern -c -D_X86_ -DIS_32 -DWINDOWS -DUNICODE -O2
|
||||||
O=o
|
O=o
|
||||||
FS=fs-win32
|
FS=fs-win32
|
||||||
IP=win32
|
IP=win32
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#define _WIN32_WINNT 0x0500
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#undef Rectangle
|
#undef Rectangle
|
||||||
@ -188,13 +189,13 @@ winproc(void *a)
|
|||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
|
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
|
||||||
wc.lpszMenuName = 0;
|
wc.lpszMenuName = 0;
|
||||||
wc.lpszClassName = "9pmgraphics";
|
wc.lpszClassName = L"9pmgraphics";
|
||||||
RegisterClass(&wc);
|
RegisterClass(&wc);
|
||||||
|
|
||||||
window = CreateWindowEx(
|
window = CreateWindowEx(
|
||||||
0, /* extended style */
|
0, /* extended style */
|
||||||
"9pmgraphics", /* class */
|
L"9pmgraphics", /* class */
|
||||||
"drawterm screen", /* caption */
|
L"drawterm screen", /* caption */
|
||||||
WS_OVERLAPPEDWINDOW, /* style */
|
WS_OVERLAPPEDWINDOW, /* style */
|
||||||
CW_USEDEFAULT, /* init. x pos */
|
CW_USEDEFAULT, /* init. x pos */
|
||||||
CW_USEDEFAULT, /* init. y pos */
|
CW_USEDEFAULT, /* init. y pos */
|
||||||
@ -338,6 +339,11 @@ WindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return DefWindowProc(hwnd, msg, wparam, lparam);
|
return DefWindowProc(hwnd, msg, wparam, lparam);
|
||||||
|
case WM_MOUSEWHEEL:
|
||||||
|
if ((int)(wparam & 0xFFFF0000)>0)
|
||||||
|
b|=8;
|
||||||
|
else
|
||||||
|
b|=16;
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
case WM_MBUTTONUP:
|
case WM_MBUTTONUP:
|
||||||
|
Loading…
Reference in New Issue
Block a user