ReactOS 0.4.16-dev-1078-g21d3e29
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 363 of file trayprop.cpp.

364{
365 PROPSHEETHEADER psh;
367 CTaskBarSettingsPage tbSettingsPage(hwndTaskbar);
368 CStartMenuSettingsPage smSettingsPage;
369 CNotifySettingsPage naSettingsPage(hwndTaskbar);
370 CStringW caption;
371
372 caption.LoadStringW(IDS_TASKBAR_STARTMENU_PROP_CAPTION);
373
374 hpsp.Add(tbSettingsPage.Create());
375 hpsp.Add(smSettingsPage.Create());
376 hpsp.Add(naSettingsPage.Create());
377
378 ZeroMemory(&psh, sizeof(psh));
379 psh.dwSize = sizeof(psh);
381 psh.hwndParent = hwndOwner;
382 psh.hInstance = hExplorerInstance;
383 psh.pszIcon = MAKEINTRESOURCEW(IDI_STARTMENU);
384 psh.pszCaption = caption.GetString();
385 psh.nPages = hpsp.GetSize();
386 psh.nStartPage = 0;
387 psh.phpage = hpsp.GetData();
388 psh.pfnCallback = PropSheetProc;
389
390 PropertySheet(&psh);
391}
HINSTANCE hExplorerInstance
Definition: explorer.cpp:24
#define IDI_STARTMENU
Definition: resource.h:14
#define IDS_TASKBAR_STARTMENU_PROP_CAPTION
Definition: resource.h:110
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:346
#define ZeroMemory
Definition: winbase.h:1743
#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 346 of file trayprop.cpp.

347{
348 // NOTE: This callback is needed to set large icon correctly.
349 HICON hIcon;
350 switch (uMsg)
351 {
352 case PSCB_INITIALIZED:
353 {
355 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
356 break;
357 }
358 }
359 return 0;
360}
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:2412
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:1253
#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:1255
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:2540
#define STM_SETIMAGE
Definition: winuser.h:2104
#define SendMessage
Definition: winuser.h:5863
#define LR_DEFAULTCOLOR
Definition: winuser.h:1098
#define SWP_NOZORDER
Definition: winuser.h:1258

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