ReactOS 0.4.15-dev-7660-g0086d05
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 344 of file trayprop.cpp.

345{
346 PROPSHEETHEADER psh;
348 CTaskBarSettingsPage tbSettingsPage(hwndTaskbar);
349 CStartMenuSettingsPage smSettingsPage;
350 CNotifySettingsPage naSettingsPage(hwndTaskbar);
351 CStringW caption;
352
353 caption.LoadStringW(IDS_TASKBAR_STARTMENU_PROP_CAPTION);
354
355 hpsp.Add(tbSettingsPage.Create());
356 hpsp.Add(smSettingsPage.Create());
357 hpsp.Add(naSettingsPage.Create());
358
359 ZeroMemory(&psh, sizeof(psh));
360 psh.dwSize = sizeof(psh);
362 psh.hwndParent = hwndOwner;
363 psh.hInstance = hExplorerInstance;
364 psh.pszIcon = MAKEINTRESOURCEW(IDI_STARTMENU);
365 psh.pszCaption = caption.GetString();
366 psh.nPages = hpsp.GetSize();
367 psh.nStartPage = 0;
368 psh.phpage = hpsp.GetData();
369 psh.pfnCallback = PropSheetProc;
370
371 PropertySheet(&psh);
372}
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:327
#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 327 of file trayprop.cpp.

328{
329 // NOTE: This callback is needed to set large icon correctly.
330 HICON hIcon;
331 switch (uMsg)
332 {
333 case PSCB_INITIALIZED:
334 {
336 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
337 break;
338 }
339 }
340 return 0;
341}
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:2058
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:1241
#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:1243
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:2186
#define STM_SETIMAGE
Definition: winuser.h:2092
#define SendMessage
Definition: winuser.h:5842
#define LR_DEFAULTCOLOR
Definition: winuser.h:1086
#define SWP_NOZORDER
Definition: winuser.h:1246

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