diff options
author | chai <chaifix@163.com> | 2020-07-10 23:11:10 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-07-10 23:11:10 +0800 |
commit | 21bd7a08615b388bc536d3ffb1e3efce7e5f7673 (patch) | |
tree | f99133d42d83ce49966fb3c05ba8d0bcc0fd1d47 /src/extern/wog.c | |
parent | e5e5295ed38cb24feb5ee6f827b2765a4153bfc8 (diff) |
*icon
Diffstat (limited to 'src/extern/wog.c')
-rw-r--r-- | src/extern/wog.c | 16 |
1 files changed, 14 insertions, 2 deletions
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)); +} |