From 03a6889e5cf047b24e427f03451b48ff4bd169f7 Mon Sep 17 00:00:00 2001 From: Thuy Nguyen Date: Sun, 15 Aug 1999 14:21:57 +0000 Subject: [PATCH] Implemented the WM_SETICON and WM_GETICON messages. --- include/winuser.h | 4 ++++ windows/defwnd.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/include/winuser.h b/include/winuser.h index 9bc8d99d60e..d1b3d60bdba 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -938,6 +938,10 @@ typedef struct tagWINDOWPOS #define WA_ACTIVE 1 #define WA_CLICKACTIVE 2 +/* WM_GETICON/WM_SETICON params values */ +#define ICON_SMALL 0 +#define ICON_BIG 1 + /* WM_NCCALCSIZE parameter structure */ typedef struct { diff --git a/windows/defwnd.c b/windows/defwnd.c index 662856cce08..16c62385ed6 100644 --- a/windows/defwnd.c +++ b/windows/defwnd.c @@ -467,7 +467,25 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam, case WM_QUERYOPEN: case WM_QUERYENDSESSION: return 1; + + case WM_SETICON: + case WM_GETICON: + { + LRESULT result = 0; + int index = GCL_HICON; + + if (wParam == ICON_SMALL) + index = GCL_HICONSM; + + result = GetClassLongA(wndPtr->hwndSelf, index); + + if (msg == WM_SETICON) + SetClassLongA(wndPtr->hwndSelf, index, lParam); + + return result; + } } + return 0; } -- 2.11.4.GIT