ReactOS 0.4.16-dev-92-g0c2cdca
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
 
class  CNotifySettingsPage
 

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 345 of file trayprop.cpp.

346{
347 PROPSHEETHEADER psh;
349 CTaskBarSettingsPage tbSettingsPage(hwndTaskbar);
350 CStartMenuSettingsPage smSettingsPage;
351 CNotifySettingsPage naSettingsPage(hwndTaskbar);
352 CStringW caption;
353
354 caption.LoadStringW(IDS_TASKBAR_STARTMENU_PROP_CAPTION);
355
356 hpsp.Add(tbSettingsPage.Create());
357 hpsp.Add(smSettingsPage.Create());
358 hpsp.Add(naSettingsPage.Create());
359
360 ZeroMemory(&psh, sizeof(psh));
361 psh.dwSize = sizeof(psh);
363 psh.hwndParent = hwndOwner;
364 psh.hInstance = hExplorerInstance;
365 psh.pszIcon = MAKEINTRESOURCEW(IDI_STARTMENU);
366 psh.pszCaption = caption.GetString();
367 psh.nPages = hpsp.GetSize();
368 psh.nStartPage = 0;
369 psh.phpage = hpsp.GetData();
370 psh.pfnCallback = PropSheetProc;
371
372 PropertySheet(&psh);
373}
HINSTANCE hExplorerInstance
Definition: explorer.cpp:24
#define IDI_STARTMENU
Definition: resource.h:14
#define IDS_TASKBAR_STARTMENU_PROP_CAPTION
Definition: resource.h:104
HPROPSHEETPAGE Create()
Definition: rosdlgs.h:57
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
#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
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: trayprop.cpp:328
#define ZeroMemory
Definition: winbase.h:1712
#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 328 of file trayprop.cpp.

329{
330 // NOTE: This callback is needed to set large icon correctly.
331 HICON hIcon;
332 switch (uMsg)
333 {
334 case PSCB_INITIALIZED:
335 {
337 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
338 break;
339 }
340 }
341 return 0;
342}
static HICON
Definition: imagelist.c:80
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:2119
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:1245
#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:1247
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:2247
#define STM_SETIMAGE
Definition: winuser.h:2096
#define SendMessage
Definition: winuser.h:5855
#define LR_DEFAULTCOLOR
Definition: winuser.h:1090
#define SWP_NOZORDER
Definition: winuser.h:1250

Referenced by CTaskBarSettingsPage::_UpdateDialog(), CStartMenuSettingsPage::_UpdateDialog(), and CNotifySettingsPage::_UpdateDialog().