ReactOS 0.4.15-dev-6680-g8c76870
startmnucust.cpp File Reference
#include "precomp.h"
Include dependency graph for startmnucust.cpp:

Go to the source code of this file.

Functions

VOID OnAddStartMenuItems (HWND hDlg)
 
VOID OnRemoveStartmenuItems (HWND hDlg)
 
VOID OnAdvancedStartMenuItems ()
 
VOID OnClearRecentItems ()
 
INT_PTR CALLBACK CustomizeClassicProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
 
VOID ShowCustomizeClassic (HINSTANCE hInst, HWND hExplorer)
 

Function Documentation

◆ CustomizeClassicProc()

INT_PTR CALLBACK CustomizeClassicProc ( HWND  hwnd,
UINT  Message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 73 of file startmnucust.cpp.

74{
75 switch (Message)
76 {
77 case WM_INITDIALOG:
78 /* FIXME: Properly initialize the dialog (check whether 'clear' button must be disabled, for example) */
79 return TRUE;
80 case WM_COMMAND:
81 switch (LOWORD(wParam))
82 {
85 break;
88 break;
91 break;
94 break;
95 case IDOK:
97 break;
98 case IDCANCEL:
100 break;
101 }
102 break;
103 default:
104 return FALSE;
105 }
106 return TRUE;
107}
#define IDC_CLASSICSTART_ADVANCED
Definition: resource.h:152
#define IDC_CLASSICSTART_REMOVE
Definition: resource.h:151
#define IDC_CLASSICSTART_CLEAR
Definition: resource.h:154
#define IDC_CLASSICSTART_ADD
Definition: resource.h:150
WPARAM wParam
Definition: combotst.c:138
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR Message[]
Definition: register.c:74
#define LOWORD(l)
Definition: pedump.c:82
VOID OnRemoveStartmenuItems(HWND hDlg)
VOID OnAdvancedStartMenuItems()
VOID OnClearRecentItems()
VOID OnAddStartMenuItems(HWND hDlg)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define IDCANCEL
Definition: winuser.h:825
#define WM_COMMAND
Definition: winuser.h:1730
#define WM_INITDIALOG
Definition: winuser.h:1729
#define IDOK
Definition: winuser.h:824
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by ShowCustomizeClassic().

◆ OnAddStartMenuItems()

VOID OnAddStartMenuItems ( HWND  hDlg)

Definition at line 25 of file startmnucust.cpp.

26{
28
30 {
31 WCHAR szCommand[MAX_PATH] = L"appwiz.cpl,NewLinkHere ";
32 if (SUCCEEDED(StringCchCatW(szCommand, _countof(szCommand), szPath)))
33 ShellExecuteW(hDlg, L"open", L"rundll32.exe", szCommand, NULL, SW_SHOWNORMAL);
34 }
35}
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2558
#define SUCCEEDED(hr)
Definition: intsafe.h:50
LPCWSTR szPath
Definition: env.c:37
#define L(x)
Definition: ntvdm.h:50
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2379
#define CSIDL_PROGRAMS
Definition: shlobj.h:2031
#define _countof(array)
Definition: sndvol32.h:68
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
#define SW_SHOWNORMAL
Definition: winuser.h:764
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CustomizeClassicProc().

◆ OnAdvancedStartMenuItems()

VOID OnAdvancedStartMenuItems ( )

Definition at line 42 of file startmnucust.cpp.

43{
45
47 {
49 }
50}
#define CSIDL_STARTMENU
Definition: shlobj.h:2040

Referenced by CustomizeClassicProc().

◆ OnClearRecentItems()

VOID OnClearRecentItems ( )

Definition at line 52 of file startmnucust.cpp.

53{
54 WCHAR szPath[MAX_PATH], szFile[MAX_PATH];
56 HANDLE hPath;
57
59 {
60 StringCchPrintfW(szFile, _countof(szFile), L"%s\\*.*", szPath);
61 hPath = FindFirstFileW(szFile, &info);
62 do
63 {
64 StringCchPrintfW(szFile, _countof(szFile), L"%s\\%s", szPath, info.cFileName);
65 DeleteFileW(szFile);
66 }
67 while (FindNextFileW(hPath, &info));
68 FindClose(hPath);
69 /* FIXME: Disable the button*/
70 }
71}
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
#define CSIDL_RECENT
Definition: shlobj.h:2037
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530

Referenced by CustomizeClassicProc().

◆ OnRemoveStartmenuItems()

VOID OnRemoveStartmenuItems ( HWND  hDlg)

Definition at line 37 of file startmnucust.cpp.

38{
39 ShellExecuteW(hDlg, L"open", L"rundll32.exe", L"appwiz.cpl,ConfigStartMenu", NULL, SW_SHOWNORMAL);
40}

Referenced by CustomizeClassicProc().

◆ ShowCustomizeClassic()

VOID ShowCustomizeClassic ( HINSTANCE  hInst,
HWND  hExplorer 
)

Definition at line 109 of file startmnucust.cpp.

110{
112}
#define IDD_CLASSICSTART_CUSTOMIZE
Definition: resource.h:87
HINSTANCE hInst
Definition: dxdiag.c:13
INT_PTR CALLBACK CustomizeClassicProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4389
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by CStartMenuSettingsPage::OnStartMenuCustomize().