59 WCHAR szValue[64] = { 0 };
60 DWORD cbValue =
sizeof(szValue);
150 return Entry->hIconLarge &&
Entry->hIconSmall;
205#define LISTBOX_MARGIN 2
232 CStringW
str(
L"%SystemRoot%");
367 rc1.
top += pNewExt->
dy;
370 rc2.top += pNewExt->
dy;
371 rc2.bottom += pNewExt->
dy;
383 rc1.
top -= pNewExt->
dy;
386 rc2.top -= pNewExt->
dy;
387 rc2.bottom -= pNewExt->
dy;
459 if (pNewExt->
szExt[0] == 0)
469 if (pNewExt->
szExt[0] ==
L'.')
484 WCHAR szFileType[64];
488 item.pszText = szFileType;
508 CStringW strExt(
L".");
597 Entry->ClassKey[0] = 0;
600 Entry->ClassName[0] = 0;
601 if (
Entry->ClassKey[0])
622 Entry->FileDescription[0] = 0;
629 Entry->EditFlags = 0;
659 Entry->ProgramPath[0] =
Entry->AppName[0] = 0;
663 INT iLargeImage = -1, iSmallImage = -1;
668 ASSERT(iLargeImage == iSmallImage);
672 if (
Entry->EditFlags & 0x00000001)
680 if (!
Entry->FileDescription[0])
686 szFile, &
Entry->FileExtension[1]);
693 lvItem.
iItem = iItem;
695 lvItem.
iImage = iSmallImage;
701 lvItem.
iItem = iItem;
727 }
while (dwValue != 0);
775 item.pszText = &szExt[1];
778 item.pszText = szFile;
843 CStringW
str = szFile;
878 if (pNewAct->
szApp[0] == 0 ||
951 if (pEditAct->
szApp[0] == 0)
1043 ASSERT(iLargeImage == iSmallImage);
1049 Item.iImage = iSmallImage;
1061 if (ClassKey[0] == 0)
1075 HKEY hDefaultIconKey;
1101 WCHAR szVerbName[64];
1122 for (
INT i = 0;
i < nCount; ++
i)
1173 WCHAR DefaultVerb[64];
1186 WCHAR szVerbName[64];
1202 dwSize =
sizeof(szValue);
1313 CStringW strCommandLine =
action.szApp;
1314 strCommandLine +=
L" \"%1\"";
1498 columnSize = (clientRect.
right - clientRect.
left) / 4;
1501 col.
fmt = LVCFMT_FIXED_WIDTH;
1511 ERR(
"Failed to load localized string!\n");
1557 szFile[(
_countof(szFile)) - 1] = 0;
1633 pEntry->FileDescription);
1640 s_hbmProgram =
NULL;
1657 if (
pEntry->EditFlags & 0x00000010)
#define shell32_hInstance
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
TVal & GetValueAt(int nIndex)
TKey & GetKeyAt(int nIndex)
BOOL SetAt(const TKey &key, const TVal &val)
int FindKey(const TKey &key) const
BOOL Remove(const TKey &key)
BOOL LoadString(_In_ UINT nID)
void __cdecl Format(UINT nFormatID,...)
#define OPENFILENAME_SIZE_VERSION_400W
#define OFN_FILEMUSTEXIST
#define OFN_PATHMUSTEXIST
LONG RegLoadMUIStringW(IN HKEY hKey, IN LPCWSTR pszValue OPTIONAL, OUT LPWSTR pszOutBuf, IN DWORD cbOutBuf, OUT LPDWORD pcbData OPTIONAL, IN DWORD Flags, IN LPCWSTR pszDirectory OPTIONAL)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
short WINAPI GetFileTitleW(LPCWSTR lpFile, LPWSTR lpTitle, WORD cbBuf)
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
#define HeapFree(x, y, z)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
static const WCHAR IconIndex[]
static const WCHAR IconPath[]
BOOL WINAPI PickIconDlg(HWND hWndOwner, LPWSTR lpstrFile, UINT nMaxFile, INT *lpdwIconIndex)
HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc, LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut)
int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
BOOL WINAPI StrTrimW(LPWSTR lpszStr, LPCWSTR lpszTrim)
static BOOL DeleteExt(HWND hwndDlg, LPCWSTR pszExt)
static BOOL QueryFileDescription(LPCWSTR ProgramPath, LPWSTR pszName, INT cchName)
static VOID FileTypesDlg_InitListView(HWND hwndDlg, HWND hListView)
static BOOL FileTypesDlg_RemoveExt(HWND hwndDlg)
static void FileTypesDlg_OnItemChanging(HWND hwndDlg, PFILE_TYPE_ENTRY pEntry)
static void SetFileTypeEntryDefaultIcon(PFILE_TYPE_ENTRY Entry)
struct EDITTYPE_DIALOG * PEDITTYPE_DIALOG
static INT CALLBACK FileTypesDlg_CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
static BOOL NewExtDlg_OnInitDialog(HWND hwndDlg, PNEWEXT_DIALOG pNewExt)
static INT_PTR CALLBACK NewActionDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID NewExtDlg_OnAdvanced(HWND hwndDlg, PNEWEXT_DIALOG pNewExt)
static BOOL EditTypeDlg_OnDrawItem(HWND hwndDlg, LPDRAWITEMSTRUCT pDraw, PEDITTYPE_DIALOG pEditType)
static BOOL EditTypeDlg_OnRemove(HWND hwndDlg, PEDITTYPE_DIALOG pEditType)
static void FileTypesDlg_OnDelete(HWND hwndDlg)
static BOOL EditTypeDlg_UpdateEntryIcon(HWND hwndDlg, PEDITTYPE_DIALOG pEditType, LPCWSTR IconPath, INT IconIndex)
static BOOL FileTypesDlg_InsertToLV(HWND hListView, LPCWSTR szName, INT iItem, LPCWSTR szFile)
static INT_PTR CALLBACK NewExtDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static BOOL EditTypeDlg_OnMeasureItem(HWND hwndDlg, LPMEASUREITEMSTRUCT pMeasure, PEDITTYPE_DIALOG pEditType)
static HICON DoExtractIcon(PFILE_TYPE_ENTRY Entry, LPCWSTR IconPath, INT iIndex=0, BOOL bSmall=FALSE)
static void EditActionDlg_OnOK(HWND hwndDlg, PACTION_DIALOG pEditAct)
static void EditTypeDlg_OnChangeIcon(HWND hwndDlg, PEDITTYPE_DIALOG pEditType)
static BOOL GetFileTypeIconsByKey(HKEY hKey, PFILE_TYPE_ENTRY Entry)
static BOOL NewExtDlg_OnOK(HWND hwndDlg, PNEWEXT_DIALOG pNewExt)
static INT_PTR CALLBACK EditTypeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static PFILE_TYPE_ENTRY FileTypesDlg_GetEntry(HWND hListView, INT iItem=-1)
static BOOL EditTypeDlg_ReadClass(HWND hwndDlg, PEDITTYPE_DIALOG pEditType, LPCWSTR ClassKey)
struct ACTION_DIALOG * PACTION_DIALOG
static BOOL GetFileTypeIconsEx(PFILE_TYPE_ENTRY Entry, LPCWSTR IconLocation)
static BOOL EditTypeDlg_WriteClass(HWND hwndDlg, PEDITTYPE_DIALOG pEditType, LPCWSTR ClassKey, LPCWSTR ClassName, INT cchName)
static INT_PTR CALLBACK EditActionDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void DoFileTypeIconLocation(PFILE_TYPE_ENTRY Entry, LPCWSTR IconLocation)
struct NEWEXT_DIALOG * PNEWEXT_DIALOG
INT_PTR CALLBACK FolderOptionsFileTypesDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void NewActionDlg_OnOK(HWND hwndDlg, PACTION_DIALOG pNewAct)
static BOOL EditTypeDlg_OnInitDialog(HWND hwndDlg, PEDITTYPE_DIALOG pEditType)
static void EditTypeDlg_OnOK(HWND hwndDlg, PEDITTYPE_DIALOG pEditType)
static PFILE_TYPE_ENTRY FileTypesDlg_DoList(HWND hwndDlg)
struct FILE_TYPE_ENTRY * PFILE_TYPE_ENTRY
static void ActionDlg_OnBrowse(HWND hwndDlg, PACTION_DIALOG pNewAct, BOOL bEdit=FALSE)
static BOOL FileTypesDlg_AddExt(HWND hwndDlg, LPCWSTR pszExt, LPCWSTR pszFileType)
static void EditTypeDlg_OnCommand(HWND hwndDlg, UINT id, UINT code, PEDITTYPE_DIALOG pEditType)
GLint GLint GLint GLint GLint x
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
UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
static HBITMAP BitmapFromIcon(HICON hIcon)
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static DWORD DWORD void LPSTR DWORD cch
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
static const WCHAR szName[]
_Out_opt_ int _Out_opt_ int * cy
#define ListView_SetImageList(hwnd, himl, iImageList)
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
#define LVN_DELETEALLITEMS
#define ListView_GetImageList(hwnd, iImageList)
#define ListView_GetNextItem(hwnd, i, flags)
#define LVS_EX_FULLROWSELECT
#define ListView_GetItemCount(hwnd)
#define ListView_SortItems(hwndLV, _pfnCompare, _lPrm)
struct tagNMLISTVIEW * LPNMLISTVIEW
#define LVM_INSERTCOLUMNW
#define LVM_GETEXTENDEDLISTVIEWSTYLE
#define ListView_SetItem(hwnd, pitem)
#define ImageList_AddIcon(himl, hicon)
#define ListView_DeleteItem(hwnd, i)
#define ListView_GetItem(hwnd, pitem)
#define ListView_FindItem(hwnd, iStart, plvfi)
#define ListView_EnsureVisible(hwndLV, i, fPartialOK)
#define LVM_SETEXTENDEDLISTVIEWSTYLE
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl _wcsupr(_Inout_z_ wchar_t *_String)
_CRTIMP wchar_t *__cdecl _wcslwr(_Inout_z_ wchar_t *_String)
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
#define SHGFI_DISPLAYNAME
@ OAIF_ALLOW_REGISTRATION
#define SHCNE_ASSOCCHANGED
#define SHCNF_FLUSHNOWAIT
@ ASSOCF_INIT_IGNOREUNKNOWN
#define IDS_COLUMN_EXTENSION
#define IDC_FILETYPES_DESCRIPTION
#define IDC_ACTION_BROWSE
#define IDC_EDITTYPE_SET_DEFAULT
#define IDS_NEWEXT_SPECIFY_EXT
#define IDC_EDITTYPE_ICON
#define IDC_EDITTYPE_EDIT_BUTTON
#define IDC_NEWEXT_ADVANCED
#define IDC_NEWEXT_COMBOBOX
#define IDC_FILETYPES_LISTVIEW
#define IDC_EDITTYPE_TEXT
#define IDC_ACTION_USE_DDE
#define IDS_FILE_EXT_TYPE
#define IDC_FILETYPES_DETAILS_GROUPBOX
#define IDS_SPECIFY_ACTION
#define IDS_NEWEXT_EXT_IN_USE
#define IDS_NEWEXT_ADVANCED_RIGHT
#define IDS_NEWEXT_ALREADY_ASSOC
#define IDC_FILETYPES_ICON
#define IDS_INVALID_PROGRAM
#define IDS_NEWEXT_ADVANCED_LEFT
#define IDC_EDITTYPE_LISTBOX
#define IDC_FILETYPES_APPNAME
#define IDS_REMOVE_ACTION
#define IDC_FILETYPES_ADVANCED
#define IDS_ACTION_EXISTS
#define IDI_SHELL_FOLDER_OPTIONS
#define IDC_FILETYPES_DELETE
#define IDC_EDITTYPE_SAME_WINDOW
#define IDC_FILETYPES_CHANGE
#define IDS_FILE_DETAILSADV
#define IDC_FILETYPES_NEW
#define IDC_EDITTYPE_CHANGE_ICON
#define IDS_EDITING_ACTION
#define IDC_ACTION_ACTION
#define IDC_EDITTYPE_REMOVE
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
CSimpleMap< CStringW, CStringW > CommandLineMap
WCHAR szIconPath[MAX_PATH]
base of all file and directory entries
WCHAR FileDescription[100]
WCHAR ProgramPath[MAX_PATH]
#define INVALID_FILE_ATTRIBUTES
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
#define LOAD_LIBRARY_AS_DATAFILE
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
#define HKEY_CLASSES_ROOT
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
struct tagMEASUREITEMSTRUCT * LPMEASUREITEMSTRUCT
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define SW_SHOWNOACTIVATE
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define COLOR_HIGHLIGHTTEXT
HDC WINAPI GetDC(_In_opt_ HWND)
#define MB_ICONINFORMATION
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)