ReactOS 0.4.15-dev-6057-gd708c79
desk.c File Reference
#include "desk.h"
#include <shellapi.h>
#include <cplext.h>
#include <debug.h>
Include dependency graph for desk.c:

Go to the source code of this file.

Macros

#define NUM_APPLETS   (1)
 

Functions

static LONG APIENTRY DisplayApplet (HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK ThemesPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK BackgroundPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK ScreenSaverPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK AppearancePageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK SettingsPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
UINT CALLBACK SettingsPageCallbackProc (HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
 
HMENU LoadPopupMenu (IN HINSTANCE hInstance, IN LPCTSTR lpMenuName)
 
static BOOL CALLBACK DisplayAppletPropSheetAddPage (HPROPSHEETPAGE hpage, LPARAM lParam)
 
static BOOL InitPropSheetPage (PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC DlgProc, LPFNPSPCALLBACK pfnCallback)
 
static int CALLBACK PropSheetProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
 
LONG CALLBACK CPlApplet (HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
void WINAPI InstallScreenSaverW (IN HWND hWindow, IN HANDLE hInstance, IN LPCWSTR pszFile, IN UINT nCmdShow)
 
void WINAPI InstallScreenSaverA (IN HWND hWindow, IN HANDLE hInstance, IN LPCSTR pszFile, IN UINT nCmdShow)
 
BOOL WINAPI DllMain (HINSTANCE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
 

Variables

HINSTANCE hApplet = 0
 
HWND hCPLWindow
 
APPLET Applets [NUM_APPLETS]
 
struct {
   WORD   idDlg
 
   DLGPROC   DlgProc
 
   LPFNPSPCALLBACK   Callback
 
   LPWSTR   Name
 
PropPages []
 

Macro Definition Documentation

◆ NUM_APPLETS

#define NUM_APPLETS   (1)

Definition at line 15 of file desk.c.

Function Documentation

◆ AppearancePageProc()

INT_PTR CALLBACK AppearancePageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 216 of file appearance.c.

217{
218 GLOBALS *g;
219 LPNMHDR lpnm;
220
221 g = (GLOBALS*)GetWindowLongPtr(hwndDlg, DWLP_USER);
222
223 switch (uMsg)
224 {
225 case WM_INITDIALOG:
226 return AppearancePage_OnInit(hwndDlg);
227
228 case WM_DESTROY:
229 AppearancePage_OnDestroy(hwndDlg, g);
230 break;
231
232 case WM_COMMAND:
233 if (g == NULL || g->bInitializing)
234 return FALSE;
235
236 switch (LOWORD(wParam))
237 {
240 hwndDlg, EffAppearanceDlgProc, (LPARAM)g) == IDOK)
241 {
242 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
243 g->Scheme = g->SchemeAdv;
244 g->bSchemeChanged = TRUE;
245 }
246 break;
247
250 hwndDlg, AdvAppearanceDlgProc, (LPARAM)g) == IDOK)
251 {
252 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
253 g->bSchemeChanged = TRUE;
254 g->Scheme = g->SchemeAdv;
255 g_GlobalData.desktop_color = g->Scheme.crColor[COLOR_DESKTOP];
256
258 }
259 break;
260
263 {
264 g->ActiveTheme.Color = (PTHEME_STYLE)GetSelectedData(hwndDlg, IDC_APPEARANCE_COLORSCHEME);
265 if (g->ActiveTheme.Color->ChildStyle != NULL)
266 g->ActiveTheme.Size = g->ActiveTheme.Color->ChildStyle;
267
268 g->bSchemeChanged = TRUE;
269 if (g->ActiveTheme.ThemeActive)
270 g->bThemeChanged = TRUE;
271
272 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
273
275 AppearancePage_ShowSizes(hwndDlg, g);
277 }
278 break;
279
282 {
284
285 if (g->ClassicTheme.Theme == pTheme)
286 g->ActiveTheme = g->ClassicTheme;
287 else
288 {
289 g->ActiveTheme.Theme = pTheme;
290 g->ActiveTheme.Size = pTheme->SizesList;
291 g->ActiveTheme.Color = pTheme->ColoursList;
292 g->ActiveTheme.ThemeActive = TRUE;
293 }
294
295 g->bThemeChanged = TRUE;
296 g->bSchemeChanged = TRUE;
297
298 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
299
301 AppearancePage_ShowSizes(hwndDlg, g);
304 }
305 break;
306
309 {
310 g->ActiveTheme.Size = (PTHEME_STYLE)GetSelectedData(hwndDlg, IDC_APPEARANCE_SIZE);
311 g->bSchemeChanged = TRUE;
312 if (g->ActiveTheme.ThemeActive)
313 g->bThemeChanged = TRUE;
314
315 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
316
319 }
320 }
321 break;
322
323 case WM_NOTIFY:
324 lpnm = (LPNMHDR)lParam;
325 switch (lpnm->code)
326 {
327 case PSN_APPLY:
328
329 if (g->bThemeChanged)
330 {
331 ActivateTheme(&g->ActiveTheme);
332 }
333
334 if (g->bSchemeChanged)
335 {
336 ApplyScheme(&g->Scheme, &g->ActiveTheme);
337 if (g->ActiveTheme.ThemeActive == FALSE)
338 g->ClassicTheme = g->ActiveTheme;
339 }
340
342 g->bThemeChanged = FALSE;
343 g->bSchemeChanged = FALSE;
345 return TRUE;
346
347 case PSN_KILLACTIVE:
349 return TRUE;
350
351 case PSN_SETACTIVE:
352 if (g->Scheme.crColor[COLOR_DESKTOP] != g_GlobalData.desktop_color)
353 {
354 g->Scheme.crColor[COLOR_DESKTOP] = g_GlobalData.desktop_color;
356 }
357 break;
358 }
359 break;
360 }
361
362 return FALSE;
363}
INT_PTR CALLBACK AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advappdlg.c:504
static void AppearancePage_UpdateThemePreview(HWND hwndDlg, GLOBALS *g)
Definition: appearance.c:16
static INT_PTR AppearancePage_OnInit(HWND hwndDlg)
Definition: appearance.c:97
static VOID AppearancePage_OnDestroy(HWND hwndDlg, GLOBALS *g)
Definition: appearance.c:197
static void AppearancePage_ShowSizes(HWND hwndDlg, GLOBALS *g)
Definition: appearance.c:81
static PVOID GetSelectedData(HWND hwndDlg, int nIDDlgItem)
Definition: appearance.c:203
static void AppearancePage_LoadSelectedScheme(HWND hwndDlg, GLOBALS *g)
Definition: appearance.c:35
static void AppearancePage_ShowColorSchemes(HWND hwndDlg, GLOBALS *g)
Definition: appearance.c:72
struct _THEME_STYLE * PTHEME_STYLE
VOID ApplyScheme(PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme)
struct _THEME * PTHEME
BOOL ActivateTheme(PTHEME_SELECTION pSelectedTheme)
INT_PTR CALLBACK EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: effappdlg.c:130
GLOBAL_DATA g_GlobalData
Definition: background.c:70
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
#define IDC_APPEARANCE_VISUAL_STYLE
Definition: resource.h:102
#define IDC_APPEARANCE_ADVANCED
Definition: resource.h:101
#define IDC_APPEARANCE_EFFECTS
Definition: resource.h:100
#define IDC_APPEARANCE_COLORSCHEME
Definition: resource.h:98
#define IDD_ADVAPPEARANCE
Definition: resource.h:14
#define IDD_EFFAPPEARANCE
Definition: resource.h:15
#define IDC_APPEARANCE_SIZE
Definition: resource.h:103
GLboolean GLboolean g
Definition: glext.h:6204
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define LOWORD(l)
Definition: pedump.c:82
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PSN_KILLACTIVE
Definition: prsht.h:116
#define PSN_APPLY
Definition: prsht.h:117
#define PSNRET_NOERROR
Definition: prsht.h:129
#define PSN_SETACTIVE
Definition: prsht.h:115
#define WM_NOTIFY
Definition: richedit.h:61
COLORREF desktop_color
Definition: desk.h:159
THEME_STYLE * SizesList
Definition: appearance.h:93
THEME_STYLE * ColoursList
Definition: appearance.h:92
UINT code
Definition: winuser.h:3149
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define HIWORD(l)
Definition: typedefs.h:247
LONG_PTR LPARAM
Definition: windef.h:208
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1730
#define DialogBoxParam
Definition: winuser.h:5754
#define WM_INITDIALOG
Definition: winuser.h:1729
#define IDOK
Definition: winuser.h:824
#define CBN_SELCHANGE
Definition: winuser.h:1969
#define COLOR_DESKTOP
Definition: winuser.h:908
struct tagNMHDR * LPNMHDR
HWND WINAPI GetParent(_In_ HWND)
#define DWLP_MSGRESULT
Definition: winuser.h:864
#define WM_DESTROY
Definition: winuser.h:1599
#define MAKEINTRESOURCE
Definition: winuser.h:591

◆ BackgroundPageProc()

INT_PTR CALLBACK BackgroundPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1179 of file background.c.

1183{
1185 struct GdiplusStartupInput gdipStartup;
1186
1188
1189 switch (uMsg)
1190 {
1191 case WM_INITDIALOG:
1194 gdipStartup.GdiplusVersion = 1;
1195 gdipStartup.DebugEventCallback = NULL;
1196 gdipStartup.SuppressBackgroundThread = FALSE;
1197 gdipStartup.SuppressExternalCodecs = FALSE;
1198 GdiplusStartup(&pData->gdipToken, &gdipStartup, NULL);
1199 InitBackgroundDialog(hwndDlg, pData);
1200 InitDesktopSettings(&pData->desktopData);
1201 break;
1202
1203 case WM_COMMAND:
1204 {
1205 DWORD controlId = LOWORD(wParam);
1207
1208 switch (controlId)
1209 {
1210 case IDC_COLOR_BUTTON:
1211 if (command == BN_CLICKED)
1212 OnColorButton(hwndDlg, pData);
1213 break;
1214
1215 case IDC_BROWSE_BUTTON:
1216 if (command == BN_CLICKED)
1217 OnBrowseButton(hwndDlg, pData);
1218 break;
1219
1221 if (command == CBN_SELCHANGE)
1222 {
1223 pData->placementSelection = (int)SendDlgItemMessage(hwndDlg, IDC_PLACEMENT_COMBO, CB_GETCURSEL, 0, 0);
1224
1226
1227 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
1228 }
1229 break;
1230
1231 case IDC_DESKTOP_CUSTOM:
1232 if (command == BN_CLICKED)
1233 OnCustomButton(hwndDlg, pData);
1234 break;
1235 }
1236 } break;
1237
1238 case WM_DRAWITEM:
1239 {
1240 LPDRAWITEMSTRUCT drawItem;
1241 drawItem = (LPDRAWITEMSTRUCT)lParam;
1242
1243 if (drawItem->CtlID == IDC_BACKGROUND_PREVIEW)
1244 {
1245 DrawBackgroundPreview(drawItem, pData);
1246 }
1247
1248 }
1249 break;
1250
1251 case WM_NOTIFY:
1252 {
1253 LPNMHDR lpnm = (LPNMHDR)lParam;
1254
1255 switch(lpnm->code)
1256 {
1257 case PSN_APPLY:
1258 if (pData->bWallpaperChanged)
1260 if (pData->bClrBackgroundChanged)
1261 SetDesktopBackColor(hwndDlg, pData);
1262 if (pData->desktopData.bSettingsChanged)
1263 SetDesktopSettings(&pData->desktopData);
1265 return TRUE;
1266
1267 case LVN_ITEMCHANGED:
1268 {
1270
1271 if ((nm->uNewState & LVIS_SELECTED) == 0)
1272 return FALSE;
1273
1274 ListViewItemChanged(hwndDlg, pData, nm->iItem);
1275 }
1276 break;
1277 }
1278 }
1279 break;
1280
1281 case WM_DESTROY:
1282 if (pData->pWallpaperBitmap != NULL)
1283 DibFreeImage(pData->pWallpaperBitmap);
1284
1285 GdiplusShutdown(pData->gdipToken);
1287 break;
1288 }
1289
1290 return FALSE;
1291}
static VOID OnBrowseButton(HWND hwndDlg, PBACKGROUND_DATA pData)
Definition: background.c:609
static VOID InitBackgroundDialog(HWND hwndDlg, PBACKGROUND_DATA pData)
Definition: background.c:451
struct _BACKGROUND_DATA * PBACKGROUND_DATA
static VOID SetWallpaper(PBACKGROUND_DATA pData)
Definition: background.c:989
struct _BACKGROUND_DATA BACKGROUND_DATA
static VOID DrawBackgroundPreview(LPDRAWITEMSTRUCT draw, PBACKGROUND_DATA pData)
Definition: background.c:778
static VOID OnColorButton(HWND hwndDlg, PBACKGROUND_DATA pData)
Definition: background.c:525
static VOID ListViewItemChanged(HWND hwndDlg, PBACKGROUND_DATA pData, int itemIndex)
Definition: background.c:744
static VOID SetDesktopBackColor(HWND hwndDlg, PBACKGROUND_DATA pData)
Definition: background.c:1113
static VOID OnCustomButton(HWND hwndDlg, PBACKGROUND_DATA pData)
Definition: background.c:1146
VOID InitDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:63
VOID SetDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:181
VOID DibFreeImage(PDIBITMAP lpBitmap)
Definition: dibitmap.c:90
#define IDC_COLOR_BUTTON
Definition: resource.h:32
#define IDC_BACKGROUND_PREVIEW
Definition: resource.h:30
#define IDC_DESKTOP_CUSTOM
Definition: resource.h:36
#define IDC_PLACEMENT_COMBO
Definition: resource.h:33
#define IDC_BROWSE_BUTTON
Definition: resource.h:31
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned long DWORD
Definition: ntddk_ex.h:95
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
Definition: gdiplus.c:81
void WINAPI GdiplusShutdown(ULONG_PTR)
#define LVIS_SELECTED
Definition: commctrl.h:2319
struct tagNMLISTVIEW * LPNMLISTVIEW
#define LVN_ITEMCHANGED
Definition: commctrl.h:3131
UINT uNewState
Definition: commctrl.h:3036
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
#define _T(x)
Definition: vfdio.h:22
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
#define HWND_BROADCAST
Definition: winuser.h:1194
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_DRAWITEM
Definition: winuser.h:1635
#define WM_SETTINGCHANGE
Definition: winuser.h:1619
#define SendMessage
Definition: winuser.h:5833
#define BN_CLICKED
Definition: winuser.h:1915
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define CB_GETCURSEL
Definition: winuser.h:1933
#define SendDlgItemMessage
Definition: winuser.h:5832

◆ CPlApplet()

LONG CALLBACK CPlApplet ( HWND  hwndCPl,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 266 of file desk.c.

267{
268 UINT i = (UINT)lParam1;
269
270 switch (uMsg)
271 {
272 case CPL_INIT:
273 return TRUE;
274
275 case CPL_GETCOUNT:
276 return NUM_APPLETS;
277
278 case CPL_INQUIRE:
279 if (i < NUM_APPLETS)
280 {
281 CPLINFO *CPlInfo = (CPLINFO*)lParam2;
282 CPlInfo->lData = 0;
283 CPlInfo->idIcon = Applets[i].idIcon;
284 CPlInfo->idName = Applets[i].idName;
285 CPlInfo->idInfo = Applets[i].idDescription;
286 }
287 else
288 {
289 return TRUE;
290 }
291 break;
292
293 case CPL_DBLCLK:
294 if (i < NUM_APPLETS)
295 Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
296 else
297 return TRUE;
298 break;
299
300 case CPL_STARTWPARMSW:
301 if (i < NUM_APPLETS)
302 return Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
303 break;
304 }
305
306 return FALSE;
307}
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_STARTWPARMSW
Definition: cpl.h:21
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
#define NUM_APPLETS
Definition: desk.c:15
APPLET Applets[NUM_APPLETS]
Definition: desk.c:30
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
int idDescription
Definition: hotplug.h:37
int idName
Definition: hotplug.h:36
int idIcon
Definition: hotplug.h:35
APPLET_PROC AppletProc
Definition: hotplug.h:38
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25

◆ DisplayApplet()

static LONG APIENTRY DisplayApplet ( HWND  hwnd,
UINT  uMsg,
LPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 142 of file desk.c.

143{
145 PROPSHEETHEADER psh;
146 HPSXA hpsxa = NULL;
147 UINT i;
148 LPWSTR *argv = NULL;
149 LPCWSTR pwszSelectedTab = NULL;
150 LPCWSTR pwszFile = NULL;
151 LPCWSTR pwszAction = NULL;
152 INT nPage = 0;
154
156
158
159 if (uMsg == CPL_STARTWPARMSW && lParam)
160 {
161 int argc;
162 int i;
163
164 nPage = _wtoi((PWSTR)lParam);
165
166#if 0
168#else
170#endif
171
172 if (argv && argc)
173 {
174 for (i = 0; i<argc; i++)
175 {
176#if 0
177 if (argv[i][0] == L'@')
178 pwszSelectedTab = &argv[i][1];
179#else
180 if (wcsncmp(argv[i], L"desk,@", 6) == 0)
181 pwszSelectedTab = &argv[i][6];
182#endif
183 else if (wcsncmp(argv[i], L"/Action:", 8) == 0)
184 pwszAction = &argv[i][8];
185 else if (wcsncmp(argv[i], L"/file:", 6) == 0)
186 pwszFile = &argv[i][6];
187 }
188 }
189 }
190
191 if(pwszAction && wcsncmp(pwszAction, L"ActivateMSTheme", 15) == 0)
192 {
193 ActivateThemeFile(pwszFile);
194 goto cleanup;
195 }
196
197 g_GlobalData.pwszFile = pwszFile;
198 g_GlobalData.pwszAction = pwszAction;
200
201 /* Initialize the monitor preview bitmap, used on multiple pages */
204 {
206
209 }
210
211 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
212 psh.dwSize = sizeof(PROPSHEETHEADER);
214 psh.hwndParent = hCPLWindow;
215 psh.hInstance = hApplet;
216 psh.pszIcon = MAKEINTRESOURCEW(IDC_DESK_ICON);
217 psh.pszCaption = MAKEINTRESOURCEW(IDS_CPLNAME);
218 psh.nPages = 0;
219 psh.nStartPage = 0;
220 psh.phpage = hpsp;
221 psh.pfnCallback = PropSheetProc;
222
223 /* Allow shell extensions to replace the background page */
225
226 for (i = 0; i != sizeof(PropPages) / sizeof(PropPages[0]); i++)
227 {
228 if (pwszSelectedTab && wcsicmp(pwszSelectedTab, PropPages[i].Name) == 0)
229 psh.nStartPage = i;
230
231 /* Override the background page if requested by a shell extension */
232 if (PropPages[i].idDlg == IDD_BACKGROUND && hpsxa != NULL &&
234 {
235 /* The shell extension added one or more pages to replace the background page.
236 Don't create the built-in page anymore! */
237 continue;
238 }
239
241 }
242
243 /* NOTE: Don't call SHAddFromPropSheetExtArray here because this applet only allows
244 replacing the background page but not extending the applet by more pages */
245
246 if (nPage != 0 && psh.nStartPage == 0)
247 psh.nStartPage = nPage;
248
249 PropertySheet(&psh);
250
251cleanup:
253
254 if (hpsxa != NULL)
256
257 if (argv)
259
260 return TRUE;
261}
static int argc
Definition: ServiceArgs.c:12
BOOL ActivateThemeFile(LPCWSTR pwszFile)
Definition: theme.c:1014
#define CPLPAGE_DISPLAY_BACKGROUND
Definition: cplext.h:8
WORD idDlg
Definition: desk.c:110
static BOOL InitPropSheetPage(PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC DlgProc, LPFNPSPCALLBACK pfnCallback)
Definition: desk.c:81
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: desk.c:124
static const struct @207 PropPages[]
DLGPROC DlgProc
Definition: desk.c:111
static BOOL CALLBACK DisplayAppletPropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: desk.c:68
HWND hCPLWindow
Definition: desk.c:27
HINSTANCE hApplet
Definition: desk.c:26
#define MAX_DESK_PAGES
Definition: desk.h:81
#define IDS_CPLNAME
Definition: resource.h:8
#define IDC_MONITOR
Definition: resource.h:29
#define IDC_DESK_ICON
Definition: resource.h:4
#define IDD_BACKGROUND
Definition: resource.h:10
#define wcsicmp
Definition: compat.h:15
static void cleanup(void)
Definition: main.c:1335
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2013
pKey DeleteObject()
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
#define TEXT(s)
Definition: k32.h:26
if(dx< 0)
Definition: linetemp.h:194
#define argv
Definition: mplay32.c:18
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define L(x)
Definition: ntvdm.h:50
#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 REGSTR_PATH_CONTROLSFOLDER
Definition: regstr.h:76
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
Definition: shell32_main.c:80
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:2150
UINT WINAPI SHReplaceFromPropSheetExtArray(HPSXA hpsxa, UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam)
Definition: shellord.c:2119
HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface)
Definition: shellord.c:2003
Definition: bl.h:1331
LONG bmMonHeight
Definition: desk.h:164
LONG bmMonWidth
Definition: desk.h:163
LPCWSTR pwszFile
Definition: desk.h:160
LPCWSTR pwszAction
Definition: desk.h:161
HBITMAP hMonitorBitmap
Definition: desk.h:162
Definition: uimain.c:89
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
#define ZeroMemory
Definition: winbase.h:1670
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
DWORD WINAPI GetSysColor(_In_ int)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2132
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ DisplayAppletPropSheetAddPage()

static BOOL CALLBACK DisplayAppletPropSheetAddPage ( HPROPSHEETPAGE  hpage,
LPARAM  lParam 
)
static

Definition at line 68 of file desk.c.

69{
71 if (ppsh != NULL && ppsh->nPages < MAX_DESK_PAGES)
72 {
73 ppsh->phpage[ppsh->nPages++] = hpage;
74 return TRUE;
75 }
76
77 return FALSE;
78}

Referenced by DisplayApplet(), and InitPropSheetPage().

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hInstDLL,
DWORD  dwReason,
LPVOID  lpvReserved 
)

Definition at line 387 of file desk.c.

388{
390
391 switch (dwReason)
392 {
395 RegisterPreviewControl(hInstDLL);
396// case DLL_THREAD_ATTACH:
397 hApplet = hInstDLL;
398 break;
399
401 UnregisterPreviewControl(hInstDLL);
403 break;
404 }
405
406 return TRUE;
407}
DWORD dwReason
Definition: misc.cpp:154
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static IN DWORD IN LPVOID lpvReserved
@ COINIT_APARTMENTTHREADED
Definition: objbase.h:278
BOOL RegisterPreviewControl(IN HINSTANCE hInstance)
Definition: preview.c:539
VOID UnregisterPreviewControl(IN HINSTANCE hInstance)
Definition: preview.c:555

◆ InitPropSheetPage()

static BOOL InitPropSheetPage ( PROPSHEETHEADER ppsh,
WORD  idDlg,
DLGPROC  DlgProc,
LPFNPSPCALLBACK  pfnCallback 
)
static

Definition at line 81 of file desk.c.

82{
83 HPROPSHEETPAGE hPage;
84 PROPSHEETPAGE psp;
85
86 if (ppsh->nPages < MAX_DESK_PAGES)
87 {
88 ZeroMemory(&psp, sizeof(psp));
89 psp.dwSize = sizeof(psp);
90 psp.dwFlags = PSP_DEFAULT;
91 if (pfnCallback != NULL)
92 psp.dwFlags |= PSP_USECALLBACK;
93 psp.hInstance = hApplet;
94 psp.pszTemplate = MAKEINTRESOURCE(idDlg);
95 psp.pfnDlgProc = DlgProc;
96 psp.pfnCallback = pfnCallback;
97
98 hPage = CreatePropertySheetPage(&psp);
99 if (hPage != NULL)
100 {
101 return DisplayAppletPropSheetAddPage(hPage, (LPARAM)ppsh);
102 }
103 }
104
105 return FALSE;
106}
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_DEFAULT
Definition: prsht.h:22
#define PSP_USECALLBACK
Definition: prsht.h:30
#define PROPSHEETPAGE
Definition: prsht.h:389

Referenced by DisplayApplet().

◆ InstallScreenSaverA()

void WINAPI InstallScreenSaverA ( IN HWND  hWindow,
IN HANDLE  hInstance,
IN LPCSTR  pszFile,
IN UINT  nCmdShow 
)

Definition at line 360 of file desk.c.

365{
366 LPWSTR lpwString;
367
368 if (!pszFile)
369 {
370 DPRINT("InstallScreenSaver() null file\n");
372 return;
373 }
374 DPRINT("InstallScreenSaver() Install from file %s\n", pszFile);
375 lpwString = pSetupMultiByteToUnicode(pszFile, 0);
376 if (!lpwString)
377 {
378 DPRINT("InstallScreenSaver() not enough memory to convert string to unicode\n");
380 return;
381 }
382 InstallScreenSaverW(hWindow, hInstance, lpwString, nCmdShow);
383 MyFree(lpwString);
384}
HINSTANCE hInstance
Definition: charmap.c:19
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
void WINAPI InstallScreenSaverW(IN HWND hWindow, IN HANDLE hInstance, IN LPCWSTR pszFile, IN UINT nCmdShow)
Definition: desk.c:311
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
LPWSTR WINAPI pSetupMultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage)
Definition: misc.c:281
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128
#define DPRINT
Definition: sndvol32.h:71

◆ InstallScreenSaverW()

void WINAPI InstallScreenSaverW ( IN HWND  hWindow,
IN HANDLE  hInstance,
IN LPCWSTR  pszFile,
IN UINT  nCmdShow 
)

Definition at line 311 of file desk.c.

316{
317 WCHAR pszSystemDir[MAX_PATH];
318 WCHAR pszDrive[3];
319 WCHAR pszPath[MAX_PATH];
320 WCHAR pszFilename[MAX_PATH];
321 WCHAR pszExt[MAX_PATH];
322 LPWSTR pszOutName;
323 UINT uCompressionType=FILE_COMPRESSION_NONE;
324 DWORD dwSourceSize;
325 DWORD dwTargetSize;
326 DWORD rc;
327
328 if (!pszFile)
329 {
330 DPRINT("InstallScreenSaver() null file\n");
332 return;
333 }
334 DPRINT("InstallScreenSaver() Installing screensaver %ls\n", pszFile);
335
336 rc = SetupGetFileCompressionInfoW(pszFile, &pszOutName, &dwSourceSize, &dwTargetSize, &uCompressionType);
337 if (ERROR_SUCCESS != rc)
338 {
339 DPRINT("InstallScreenSaver() SetupGetFileCompressionInfo failed with error 0x%lx\n", rc);
340 SetLastError(rc);
341 return;
342 }
343 if (!GetSystemDirectoryW((LPWSTR)pszSystemDir, sizeof(pszSystemDir)/sizeof(WCHAR)))
344 {
345 MyFree(pszOutName);
346 DPRINT("InstallScreenSaver() GetSystemDirectory failed with error 0x%lx\n", GetLastError());
347 return;
348 }
349 _wsplitpath(pszOutName, pszDrive, pszPath, pszFilename, pszExt);
350 MyFree(pszOutName);
351 StringCbCatW(pszSystemDir, sizeof(pszSystemDir), L"\\");
352 StringCbCatW(pszSystemDir, sizeof(pszSystemDir), pszFilename);
353 StringCbCatW(pszSystemDir, sizeof(pszSystemDir), pszExt);
354 rc = SetupDecompressOrCopyFileW(pszFile, pszSystemDir, &uCompressionType);
355 DPRINT("InstallScreenSaver() Copying to %ls, compression type %d return 0x%lx\n", pszFile, uCompressionType, rc);
356}
#define ERROR_SUCCESS
Definition: deptool.c:10
#define MAX_PATH
Definition: compat.h:34
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
DWORD WINAPI SetupDecompressOrCopyFileW(PCWSTR source, PCWSTR target, PUINT type)
Definition: misc.c:1690
DWORD WINAPI SetupGetFileCompressionInfoW(PCWSTR source, PWSTR *name, PDWORD source_size, PDWORD target_size, PUINT type)
Definition: misc.c:1555
_CRTIMP void __cdecl _wsplitpath(_In_z_ const wchar_t *_FullPath, _Pre_maybenull_ _Post_z_ wchar_t *_Drive, _Pre_maybenull_ _Post_z_ wchar_t *_Dir, _Pre_maybenull_ _Post_z_ wchar_t *_Filename, _Pre_maybenull_ _Post_z_ wchar_t *_Ext)
#define FILE_COMPRESSION_NONE
Definition: setupapi.h:356
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:342
DWORD WINAPI GetLastError(void)
Definition: except.c:1040
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by InstallScreenSaverA().

◆ LoadPopupMenu()

HMENU LoadPopupMenu ( IN HINSTANCE  hInstance,
IN LPCTSTR  lpMenuName 
)

Definition at line 41 of file desk.c.

43{
44 HMENU hMenu, hSubMenu = NULL;
45
46 hMenu = LoadMenu(hInstance,
47 lpMenuName);
48
49 if (hMenu != NULL)
50 {
51 hSubMenu = GetSubMenu(hMenu,
52 0);
53 if (hSubMenu != NULL &&
54 !RemoveMenu(hMenu,
55 0,
57 {
58 hSubMenu = NULL;
59 }
60
61 DestroyMenu(hMenu);
62 }
63
64 return hSubMenu;
65}
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define MF_BYPOSITION
Definition: winuser.h:203
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define LoadMenu
Definition: winuser.h:5807
BOOL WINAPI DestroyMenu(_In_ HMENU)

◆ PropSheetProc()

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

Definition at line 124 of file desk.c.

125{
126 // NOTE: This callback is needed to set large icon correctly.
127 HICON hIcon;
128 switch (uMsg)
129 {
130 case PSCB_INITIALIZED:
131 {
133 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
134 break;
135 }
136 }
137 return 0;
138}
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
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 DisplayApplet().

◆ ScreenSaverPageProc()

INT_PTR CALLBACK ScreenSaverPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 798 of file screensaver.c.

802{
803 PDATA pData;
804
806
807 switch (uMsg)
808 {
809 case WM_INITDIALOG:
810 {
811 OnInitDialog(hwndDlg, pData);
812 break;
813 }
814
815 case WM_DESTROY:
816 {
817 if (pData->ScreenSaverPreviewParent)
818 {
821 (LONG_PTR)pData->OldPreviewProc);
822 DestroyWindow(pData->ScreenSaverPreviewParent);
823 pData->ScreenSaverPreviewParent = NULL;
824 }
826 if (pData->PrevWindowPi.hProcess)
827 {
828 TerminateProcess(pData->PrevWindowPi.hProcess, 0);
829 CloseHandle(pData->PrevWindowPi.hProcess);
830 CloseHandle(pData->PrevWindowPi.hThread);
831 }
833 0,
834 pData);
835 break;
836 }
837
838 case WM_ENDSESSION:
839 {
841 pData);
842 break;
843 }
844
845 case WM_DRAWITEM:
846 {
847 LPDRAWITEMSTRUCT lpDrawItem;
848 lpDrawItem = (LPDRAWITEMSTRUCT)lParam;
849
850 if (lpDrawItem->CtlID == IDC_SCREENS_PREVIEW)
851 ShowScreenSaverPreview(lpDrawItem, pData);
852 break;
853 }
854
855 case WM_COMMAND:
856 {
857 DWORD controlId = LOWORD(wParam);
859
860 switch (controlId)
861 {
862 case IDC_SCREENS_LIST:
863 {
865 {
866 SelectionChanged(hwndDlg, pData);
868 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
869 }
870 break;
871 }
872
874 {
875 if (command == EN_CHANGE)
876 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
877 break;
878 }
879
880 case IDC_SCREENS_POWER_BUTTON: // Start Powercfg.Cpl
881 {
882 if (command == BN_CLICKED)
883 WinExec("rundll32 shell32.dll,Control_RunDLL powercfg.cpl",SW_SHOWNORMAL);
884 break;
885 }
886
887 case IDC_SCREENS_TESTSC: // Screensaver Preview
888 {
889 if (command == BN_CLICKED)
890 {
891 ScreensaverPreview(hwndDlg, pData);
893 }
894 break;
895 }
896
897 case IDC_SCREENS_SETTINGS: // Screensaver Settings
898 {
899 if (command == BN_CLICKED)
900 ScreensaverConfig(hwndDlg, pData);
901 break;
902 }
903
904 case IDC_SCREENS_USEPASSCHK: // Screensaver Is Secure
905 {
906 if (command == BN_CLICKED)
907 {
908 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
909 }
910 break;
911 }
912 }
913 break;
914 }
915
916 case WM_NOTIFY:
917 {
918 LPNMHDR lpnm = (LPNMHDR)lParam;
919
920 switch(lpnm->code)
921 {
922 case PSN_APPLY:
923 {
924 SetScreenSaver(hwndDlg, pData);
925 return TRUE;
926 }
927
928 case PSN_SETACTIVE:
929 {
930 /* Enable screensaver preview support */
932 break;
933 }
934
935 case PSN_KILLACTIVE:
936 {
937 /* Kill running preview screensaver */
938 if (pData->PrevWindowPi.hProcess)
939 {
940 TerminateProcess(pData->PrevWindowPi.hProcess, 0);
941 CloseHandle(pData->PrevWindowPi.hProcess);
942 CloseHandle(pData->PrevWindowPi.hThread);
943 pData->PrevWindowPi.hThread = pData->PrevWindowPi.hProcess = NULL;
944 }
945 break;
946 }
947 }
948 }
949 break;
950 }
951
952 return FALSE;
953}
#define IDC_SCREENS_PREVIEW
Definition: resource.h:39
#define IDC_SCREENS_USEPASSCHK
Definition: resource.h:44
#define IDC_SCREENS_TIMEDELAY
Definition: resource.h:45
#define IDC_SCREENS_POWER_BUTTON
Definition: resource.h:41
#define IDC_SCREENS_LIST
Definition: resource.h:40
#define IDC_SCREENS_TESTSC
Definition: resource.h:43
#define IDC_SCREENS_SETTINGS
Definition: resource.h:42
static VOID ScreensaverPreview(HWND hwndDlg, PDATA pData)
Definition: screensaver.c:315
static VOID ShowScreenSaverPreview(IN LPDRAWITEMSTRUCT draw, IN PDATA pData)
Definition: screensaver.c:139
static VOID SelectionChanged(HWND hwndDlg, PDATA pData)
Definition: screensaver.c:86
static VOID SetScreenSaver(HWND hwndDlg, PDATA pData)
Definition: screensaver.c:581
static VOID SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData)
Definition: screensaver.c:177
struct _DATA * PDATA
static BOOL OnInitDialog(HWND hwndDlg, PDATA pData)
Definition: screensaver.c:653
static const TCHAR szPreviewWndClass[]
Definition: screensaver.c:15
static VOID ScreensaverConfig(HWND hwndDlg, PDATA pData)
Definition: screensaver.c:264
#define CloseHandle
Definition: compat.h:739
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532
UINT WINAPI DECLSPEC_HOTPATCH WinExec(LPCSTR lpCmdLine, UINT uCmdShow)
Definition: proc.c:4773
#define GWLP_WNDPROC
Definition: treelist.c:66
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define UnregisterClass
Definition: winuser.h:5851
#define WM_ENDSESSION
Definition: winuser.h:1617
BOOL WINAPI DestroyWindow(_In_ HWND)
#define EN_CHANGE
Definition: winuser.h:2012

◆ SettingsPageCallbackProc()

UINT CALLBACK SettingsPageCallbackProc ( HWND  hwnd,
UINT  uMsg,
LPPROPSHEETPAGE  ppsp 
)

Definition at line 689 of file settings.c.

690{
691 UINT Ret = 0;
692
693 switch (uMsg)
694 {
695 case PSPCB_CREATE:
697 break;
698
699 case PSPCB_RELEASE:
701 break;
702 }
703
704 return Ret;
705}
VOID UnregisterMonitorSelectionControl(IN HINSTANCE hInstance)
Definition: monslctl.c:1655
BOOL RegisterMonitorSelectionControl(IN HINSTANCE hInstance)
Definition: monslctl.c:1638
#define PSPCB_CREATE
Definition: prsht.h:38
#define PSPCB_RELEASE
Definition: prsht.h:37

◆ SettingsPageProc()

INT_PTR CALLBACK SettingsPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 647 of file settings_page.c.

648{
649 switch (uMsg)
650 {
651 case WM_INITDIALOG:
652 OnInitSettingsPage(hwndDlg);
653 return TRUE;
654
655 case WM_DESTROY:
656 OnDestroySettingsPage(hwndDlg);
657 break;
658
659 case WM_COMMAND:
661 break;
662
663 case WM_NOTIFY:
664 return OnNotifySettingsPage(hwndDlg, lParam);
665 }
666
667 return FALSE;
668}
static INT_PTR OnNotifySettingsPage(HWND hwndDlg, LPARAM lParam)
static VOID OnInitSettingsPage(HWND hwndDlg)
static VOID OnDestroySettingsPage(HWND hwndDlg)
VOID OnCommandSettingsPage(HWND hwndDlg, WPARAM wParam)

Referenced by SystemApplet().

◆ ThemesPageProc()

INT_PTR CALLBACK ThemesPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1064 of file theme.c.

1065{
1066 LPNMHDR lpnm;
1067
1068 switch (uMsg)
1069 {
1070 case WM_INITDIALOG:
1071 break;
1072
1073 case WM_COMMAND:
1074 break;
1075
1076 case WM_NOTIFY:
1077 lpnm = (LPNMHDR)lParam;
1078 switch (lpnm->code)
1079 {
1080 case PSN_APPLY:
1082 return TRUE;
1083 }
1084 break;
1085
1086 case WM_DESTROY:
1087 break;
1088 }
1089
1090 return FALSE;
1091}

Variable Documentation

◆ Applets

APPLET Applets[NUM_APPLETS]
Initial value:
=
{
{
}
}
static LONG APIENTRY DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
Definition: desk.c:142
#define IDS_CPLDESCRIPTION
Definition: resource.h:9

Definition at line 30 of file desk.c.

Referenced by CPlApplet().

◆ Callback

Definition at line 112 of file desk.c.

◆ DlgProc

◆ hApplet

HINSTANCE hApplet = 0

Definition at line 26 of file desk.c.

Referenced by DisplayApplet(), DllMain(), InitPropSheetPage(), and PropSheetProc().

◆ hCPLWindow

HWND hCPLWindow

Definition at line 27 of file desk.c.

Referenced by DisplayApplet(), and LoadSchemeFromTheme().

◆ idDlg

◆ Name

Definition at line 113 of file desk.c.

◆ 

const struct { ... } PropPages[]
Initial value:
=
{
{ IDD_SCREENSAVER, ScreenSaverPageProc, NULL, L"Screen Saver" },
}
INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: appearance.c:216
INT_PTR CALLBACK SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
INT_PTR CALLBACK ScreenSaverPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: screensaver.c:798
INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: background.c:1179
UINT CALLBACK SettingsPageCallbackProc(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
Definition: settings.c:689
#define IDD_SETTINGS
Definition: resource.h:13
#define IDD_SCREENSAVER
Definition: resource.h:11
#define IDD_APPEARANCE
Definition: resource.h:12

Referenced by DisplayApplet().