summaryrefslogtreecommitdiff
path: root/redo/area_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-05 12:17:44 -0400
committerPietro Gagliardi <[email protected]>2014-08-05 12:17:44 -0400
commitfada6849c440f8ba5b0d2604c854d85d73f9b1f3 (patch)
treeecc617e6ce806899f390c850199397122d42e2a6 /redo/area_windows.c
parentbccfde2c34c64dd2b13b426875113bd91e6c3940 (diff)
Mostly completed writing Area on Windows. Now to fix compiler errors.
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;
+}