ReactOS  0.4.14-dev-98-gb0d4763
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 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
VOID OnRemoveStartmenuItems(HWND hDlg)
#define IDOK
Definition: winuser.h:824
#define IDC_CLASSICSTART_CLEAR
Definition: resource.h:145
#define IDC_CLASSICSTART_REMOVE
Definition: resource.h:142
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
VOID OnAdvancedStartMenuItems()
CHAR Message[80]
Definition: alive.c:5
#define WM_COMMAND
Definition: winuser.h:1722
VOID OnClearRecentItems()
#define IDC_CLASSICSTART_ADVANCED
Definition: resource.h:143
VOID OnAddStartMenuItems(HWND hDlg)
#define IDC_CLASSICSTART_ADD
Definition: resource.h:141
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1721
#define LOWORD(l)
Definition: pedump.c:82

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 _countof(array)
Definition: fontsub.cpp:30
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
#define SW_SHOWNORMAL
Definition: winuser.h:764
LPCWSTR szPath
Definition: env.c:35
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2085
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2208
#define CSIDL_PROGRAMS
Definition: shlobj.h:2005
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by CustomizeClassicProc().

◆ OnAdvancedStartMenuItems()

VOID OnAdvancedStartMenuItems ( )

Definition at line 42 of file startmnucust.cpp.

43 {
45 
47  {
49  }
50 }
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
#define SW_SHOWNORMAL
Definition: winuser.h:764
LPCWSTR szPath
Definition: env.c:35
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2085
#define CSIDL_STARTMENU
Definition: shlobj.h:2014
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2208
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
#define _countof(array)
Definition: fontsub.cpp:30
struct _test_info info[]
Definition: SetCursorPos.c:19
#define CSIDL_RECENT
Definition: shlobj.h:2011
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
LPCWSTR szPath
Definition: env.c:35
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2085
#define SUCCEEDED(hr)
Definition: intsafe.h:57
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

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 }
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR L[]
Definition: oid.c:1250
#define SW_SHOWNORMAL
Definition: winuser.h:764
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2208

Referenced by CustomizeClassicProc().

◆ ShowCustomizeClassic()

VOID ShowCustomizeClassic ( HINSTANCE  hInst,
HWND  hExplorer 
)

Definition at line 109 of file startmnucust.cpp.

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

Referenced by CStartMenuSettingsPage::OnStartMenuCustomize().