summaryrefslogtreecommitdiff
path: root/redo/area_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'redo/area_windows.c')
-rw-r--r--redo/area_windows.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/redo/area_windows.c b/redo/area_windows.c
index 4ee2335..b4d3d23 100644
--- a/redo/area_windows.c
+++ b/redo/area_windows.c
@@ -5,7 +5,7 @@
#include "winapi_windows.h"
#include "_cgo_epxort.h"
-LPWSTR areaWindowClass = L"gouiarea";
+#define areaWindowClass L"gouiarea"
static void getScrollPos(HWND hwnd, int *xpos, int *ypos)
{
@@ -441,3 +441,19 @@ DWORD makeAreaWindowClass(char **errmsg)
}
return 0;
}
+
+HWND newArea(void *data)
+{
+ HWND hwnd;
+
+ hwnd = CreateWindowExW(
+ 0,
+ areaWindowClass, L"",
+ WS_HSCROLL | WS_VSCROLL | WS_CHILD | WS_VISIBLE,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ 100, 100,
+ msgwin, NULL, hInstance, data);
+ if (hwnd == NULL)
+ xpanic("container creation failed", GetLastError());
+ return hwnd;
+}