ReactOS 0.4.15-dev-6068-g8061a6f
trayprop.cpp File Reference
#include "precomp.h"
Include dependency graph for trayprop.cpp:

Go to the source code of this file.

Classes

class  CTaskBarSettingsPage
 
class  CStartMenuSettingsPage
 

Functions

static void SetBitmap (HWND hwnd, HBITMAP *hbmp, UINT uImageId)
 
static int CALLBACK PropSheetProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
 
VOID DisplayTrayProperties (IN HWND hwndOwner, IN HWND hwndTaskbar)
 

Function Documentation

◆ DisplayTrayProperties()

VOID DisplayTrayProperties ( IN HWND  hwndOwner,
IN HWND  hwndTaskbar 
)

Definition at line 291 of file trayprop.cpp.

292{
293 PROPSHEETHEADER psh;
294 HPROPSHEETPAGE hpsp[2];
295 CTaskBarSettingsPage tbSettingsPage(hwndTaskbar);
296 CStartMenuSettingsPage smSettingsPage;
297 CStringW caption;
298
299 caption.LoadStringW(IDS_TASKBAR_STARTMENU_PROP_CAPTION);
300
301 hpsp[0] = tbSettingsPage.Create();
302 hpsp[1] = smSettingsPage.Create();
303
304 ZeroMemory(&psh, sizeof(psh));
305 psh.dwSize = sizeof(psh);
307 psh.hwndParent = hwndOwner;
308 psh.hInstance = hExplorerInstance;
309 psh.pszIcon = MAKEINTRESOURCEW(IDI_STARTMENU);
310 psh.pszCaption = caption.GetString();
311 psh.nPages = _countof(hpsp);
312 psh.nStartPage = 0;
313 psh.phpage = hpsp;
314 psh.pfnCallback = PropSheetProc;
315
316 PropertySheet(&psh);
317}
HINSTANCE hExplorerInstance
Definition: explorer.cpp:24
#define IDI_STARTMENU
Definition: resource.h:14
#define IDS_TASKBAR_STARTMENU_PROP_CAPTION
Definition: resource.h:103
HPROPSHEETPAGE Create()
Definition: rosdlgs.h:57
PCXSTR GetString() const
Definition: atlsimpstr.h:361
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_PROPTITLE
Definition: prsht.h:40
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PropertySheet
Definition: prsht.h:400
#define PSH_USEICONID
Definition: prsht.h:42
#define _countof(array)
Definition: sndvol32.h:68
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: trayprop.cpp:274
#define ZeroMemory
Definition: winbase.h:1670
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by CTrayWindow::TrayPropertiesThread().

◆ PropSheetProc()

static int CALLBACK PropSheetProc ( HWND  hwndDlg,
UINT  uMsg,
LPARAM  lParam 
)
static

Definition at line 274 of file trayprop.cpp.

275{
276 // NOTE: This callback is needed to set large icon correctly.
277 HICON hIcon;
278 switch (uMsg)
279 {
280 case PSCB_INITIALIZED:
281 {
283 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
284 break;
285 }
286 }
287 return 0;
288}
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define ICON_BIG
Definition: tnclass.cpp:51
LONG_PTR LPARAM
Definition: windef.h:208
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2044
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by DisplayTrayProperties().

◆ SetBitmap()

static void SetBitmap ( HWND  hwnd,
HBITMAP hbmp,
UINT  uImageId 
)
static

Definition at line 24 of file trayprop.cpp.

25{
26 if (*hbmp)
28
30 MAKEINTRESOURCEW(uImageId),
32 0,
33 0,
35
36 if (*hbmp && hwnd)
37 {
38 BITMAP bm;
39 GetObject(*hbmp, sizeof(bm), &bm);
40 ::SetWindowPos(hwnd, NULL, 0, 0, bm.bmWidth + 2, bm.bmHeight + 2,
43 }
44
45}
HBITMAP hbmp
#define NULL
Definition: types.h:112
pKey DeleteObject()
static HBITMAP
Definition: button.c:44
Definition: bl.h:1331
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define GetObject
Definition: wingdi.h:4468
#define SWP_NOACTIVATE
Definition: winuser.h:1232
#define IMAGE_BITMAP
Definition: winuser.h:211
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1234
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2172
#define STM_SETIMAGE
Definition: winuser.h:2083
#define SendMessage
Definition: winuser.h:5833
#define LR_DEFAULTCOLOR
Definition: winuser.h:1081
#define SWP_NOZORDER
Definition: winuser.h:1237

Referenced by CTaskBarSettingsPage::UpdateDialog(), and CStartMenuSettingsPage::UpdateDialog().