From 21bd7a08615b388bc536d3ffb1e3efce7e5f7673 Mon Sep 17 00:00:00 2001
From: chai <chaifix@163.com>
Date: Fri, 10 Jul 2020 23:11:10 +0800
Subject: *icon

---
 src/extern/wog.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

(limited to 'src/extern/wog.c')

diff --git a/src/extern/wog.c b/src/extern/wog.c
index ad8f334..99a110a 100644
--- a/src/extern/wog.c
+++ b/src/extern/wog.c
@@ -283,7 +283,8 @@ static int registerWindowClass()
     windowClass.lpfnWndProc   = (WNDPROC)(WindowProc);              // WindowProc Handles Messages
     windowClass.hInstance     = GetModuleHandle(0);                 // Set The Instance
     windowClass.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE);       // Class Background Brush Color
-    windowClass.hCursor       = LoadCursor(NULL, IDC_ARROW);        // Load The Arrow Pointer
+		//windowClass.hCursor = LoadCursor(NULL, IDC_ARROW);        // Load The Arrow Pointer
+		//windowClass.hCursor       = LoadImageA(NULL, "PanView.ico", IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR | LR_CREATEDIBSECTION | LR_LOADFROMFILE);
     windowClass.lpszClassName = WINDOW_CLASS;                       // Sets The Applications Classname
 
     if (RegisterClassEx(&windowClass) == 0)                         // Did Registering The Class Fail?
@@ -676,4 +677,15 @@ void wog_sleep(int ms)
 int wog_tick()
 {
     return GetTickCount();
-}
\ No newline at end of file
+}
+
+
+void wog_setcursor(wog_Window* wnd, unsigned int cursor)
+{
+	SetCursor(LoadCursor(NULL, cursor));
+}
+
+void wog_setcursorImage(wog_Window* wnd, const char* path)
+{
+	SetCursor(LoadImageA(NULL, path, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR | LR_CREATEDIBSECTION | LR_LOADFROMFILE));
+}
-- 
cgit v1.1-26-g67d0