From 43faed996aeb6e61d3674833ddac10603bded204 Mon Sep 17 00:00:00 2001 From: Thuy Nguyen Date: Wed, 18 Aug 1999 18:25:46 +0000 Subject: [PATCH] Implemented the PSH_USEICONID/PSH_USEHICON and the PSP_USETITLE flags. --- dlls/comctl32/propsheet.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 54200ef6dca..d9ad359dcaf 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -17,6 +17,7 @@ #include "winnls.h" #include "comctl32.h" #include "debugtools.h" +#include "heap.h" /****************************************************************************** @@ -273,6 +274,13 @@ BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEA lppsp, TRACE("Tab %d %s\n",index,debugstr_w((LPCWSTR)p)); p += lstrlenW((LPCWSTR)p) + 1; + if (dwFlags & PSP_USETITLE) + { + psInfo->proppage[index].pszText = HEAP_strdupAtoW(GetProcessHeap(), + 0, + lppsp->pszTitle); + } + /* * Build the image list for icons */ @@ -1290,6 +1298,31 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL); LPCPROPSHEETPAGEA ppshpage; + /* + * Small icon in the title bar. + */ + if ((psInfo->ppshheader->dwFlags & PSH_USEICONID) || + (psInfo->ppshheader->dwFlags & PSH_USEHICON)) + { + HICON hIcon; + int icon_cx = GetSystemMetrics(SM_CXSMICON); + int icon_cy = GetSystemMetrics(SM_CYSMICON); + + if (psInfo->ppshheader->dwFlags & PSH_USEICONID) + hIcon = LoadImageA(psInfo->ppshheader->hInstance, + psInfo->ppshheader->u1.pszIcon, + IMAGE_ICON, + icon_cx, icon_cy, + LR_DEFAULTCOLOR); + else + hIcon = psInfo->ppshheader->u1.hIcon; + + SendMessageA(hwnd, WM_SETICON, 0, hIcon); + } + + if (psInfo->ppshheader->dwFlags & PSH_USEHICON) + SendMessageA(hwnd, WM_SETICON, 0, psInfo->ppshheader->u1.hIcon); + psInfo->strPropertiesFor = strCaption; GetWindowTextA(hwnd, psInfo->strPropertiesFor, MAX_CAPTION_LENGTH);