94 TEXT(
"ROS Explorer - reading user settings"),
141 FmtString
msg(
TEXT(
"%s\n"), txt);
152 static const LPCTSTR s_executable_extensions[] = {
171 for(
p=s_executable_extensions; *
p;
p++)
185 return found->second;
198 valuelen =
sizeof(display_name);
220 if (!
type._displayname.empty())
224 if (
type._neverShowExt && !dont_hide_ext) {
227 if (
entry->_display_name !=
entry->_data.cFileName)
339 BitmapSelection sel(canvas,
hbmp);
356 BitmapSelection sel(canvas,
hbmp);
423 return _icons[found->second];
427 if (
flags != mapkey_hicon.second) {
431 return _icons[found->second];
440 return _icons[found->second];
500 return _icons[found->second];
520 HICON hIconLarge = 0;
551 return _icons[found->second];
555 if (
flags != mapkey_hicon.second) {
559 return _icons[found->second];
568 return _icons[found->second];
586 const Icon& icon =
add(sfi.iIcon);
654 if (found !=
_icons.end()) {
655 Icon& icon = found->second;
723 cmd._cmdShow = cmdShow;
727 cmd.ParseCmdLine(lpCmdLine);
753 else if (*
p==
',' && !
quote)
836 if (!
_path.empty()) {
853 lpCmdLine =
TEXT(
"explorer.exe");
873 OwnerDrawParent<Dialog>
887 _hfont =
CreateFont(20, 0, 0, 0,
FW_BOLD,
TRUE, 0, 0, 0, 0, 0, 0, 0,
TEXT(
"Sans Serif"));
923 PaintCanvas canvas(_hwnd);
966 CommonControlInit usingCmnCtrl;
1012 BOOL startup_desktop;
1017 while(*lpCmdLine ==
'-') {
1018 while(*lpCmdLine && !
_istspace((
unsigned)*lpCmdLine))
1019 ext_options += *lpCmdLine++;
1069 startup_desktop =
TRUE;
1075 startup_desktop = !any_desktop_running;
1079 bool autostart = !any_desktop_running;
1085 #ifdef _DEBUG //MF: disabled for debugging 1091 startup_desktop =
TRUE;
1094 startup_desktop =
FALSE;
1097 if (startup_desktop && !
_tcsstr(ext_options,
TEXT(
"-explorer")))
1117 LOG(
TEXT(
"starting explorer debug log\n"));
1122 if (startup_desktop) {
1134 if (!any_desktop_running) {
1137 (*g_SHDOCVW_ShellDDEInit)(
TRUE);
1141 bool use_gdb_stub =
false;
1144 use_gdb_stub =
true;
1147 LOG(
TEXT(
"debugger breakpoint"));
1154 LOG(
TEXT(
"waiting for debugger connection...\n"));
1166 CommonControlInit usingCmnCtrl;
1170 if (startup_desktop) {
1183 "/e open cabinet window in explorer mode\r\n" 1184 "/root open cabinet window in rooted mode\r\n" 1185 "/mdi open cabinet window in MDI mode\r\n" 1186 "/sdi open cabinet window in SDI mode\r\n" 1188 "-? display command line options\r\n" 1190 "-desktop start in desktop mode regardless of an already running shell\r\n" 1191 "-nodesktop disable desktop mode\r\n" 1192 "-explorer display cabinet window regardless of enabled desktop mode\r\n" 1194 "-install replace previous shell application with ROS Explorer\r\n" 1196 "-noautostart disable autostarts\r\n" 1197 "-autostart enable autostarts regardless of debug build\r\n" 1199 "-console open debug console\r\n" 1201 "-debug activate GDB remote debugging stub\r\n" 1202 "-break activate debugger breakpoint\r\n",
1203 "ROS Explorer - command line options",
MB_OK);
1214 if (startup_desktop) {
1217 pSSOThread->Start();
1222 const char*
argv[] = {
"",
"s"};
1243 if (!any_desktop_running) {
1246 (*g_SHDOCVW_ShellDDEInit)(
FALSE);
#define WINDOW_CREATOR(WND_CLASS)
void _wsplitpath(const WCHAR *path, WCHAR *drv, WCHAR *dir, WCHAR *name, WCHAR *ext)
bool read(LPCTSTR path)
read XBEL bookmark file
BOOL IsAnyDesktopRunning()
#define ICON_SIZE_FROM_ICF(flags)
#define ATTRIBUTE_EXECUTABLE
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
HWND WINAPI GetShellWindow(VOID)
bool ParseCmdLine(LPCTSTR lpCmdLine)
#define SHGFI_SYSICONINDEX
convenient loading of standard (32x32) icon resources
BOOL WINAPI AllocConsole(VOID)
Explorer command line parser.
file system path of special folder
GLubyte GLubyte GLubyte GLubyte w
BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters)
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
int ImageList_AddAlphaIcon(HIMAGELIST himl, HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd)
add icon with alpha channel to imagelist using the specified background color
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
_Check_return_ _CRTIMP int __cdecl _dup2(_In_ int _FileHandleSrc, _In_ int _FileHandleDst)
#define PROCESS_ALL_ACCESS
INT WINAPI ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
bool EvaluateOption(LPCTSTR option)
bool create_relative(const XPath &xpath)
create child nodes using XPath notation and move to the deepest child
#define CLASSNAME_WINEFILETREE
_Check_return_ _CRTIMP FILE *__cdecl _fdopen(_In_ int _FileHandle, _In_z_ const char *_Mode)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI DestroyIcon(_In_ HICON)
#define HKEY_CURRENT_USER
ResIconEx(UINT nid, int w, int h)
bool read_file(LPCTSTR path)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
#define SetWindowFont(hwnd, hfont, fRedraw)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
_In_ BOOL _In_ HANDLE hProcess
int startup(int argc, const char *argv[])
GLint GLint GLint GLint GLint x
pair< _T1, _T2 > _STLP_CALL make_pair(_T1 __x, _T2 __y)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
String get_windows_version_str()
int initialize_gdb_stub()
#define OutputDebugString
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI IsIconic(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
void __cdecl __debugbreak(void)
static HWND Create(const ExplorerCmd &cmd)
GLfloat GLfloat GLfloat GLfloat h
void explorer_about(HWND hwndParent)
INT WINAPI _tWinMain(IN HINSTANCE hInstance, IN HINSTANCE hPrevInstance, IN LPTSTR lpCmdLine, IN INT nCmdShow)
static bool is_exe_file(LPCTSTR ext)
Exception with context information.
HIMAGELIST _himlSys_small
BOOL WINAPI SetProcessShutdownParameters(IN DWORD dwLevel, IN DWORD dwFlags)
int WINAPI MessageBoxA(_In_opt_ HWND, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_ UINT)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
const Icon & extract(LPCTSTR path, ICONCACHE_FLAGS flags=ICF_NORMAL)
void write(LPCTSTR path) const
write XBEL bookmark file
void free_icon(int icon_id)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
int explorer_main(HINSTANCE hInstance, LPTSTR lpCmdLine, int cmdShow)
void smart_create(const XS_String &child_name)
create node if not already existing and move to it
static UINT WPARAM LPARAM lparam
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
_Out_opt_ int _Out_opt_ int * cy
#define CLASSNAME_CHILDWND
convenient loading of icon resources with specified sizes
HWND WINAPI GetDesktopWindow(void)
#define SHGFI_ADDOVERLAYS
#define Window_SetIcon(hwnd, type, hicon)
const FileTypeInfo & operator[](String ext)
OLE initialisation for drag drop support.
#define FILE_ATTRIBUTE_DIRECTORY
convenient loading of small (16x16) icon resources
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
GLboolean GLboolean GLboolean b
#define IDS_EXPLORER_VERSION_STR
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static const WCHAR quote[]
int add_to_imagelist(HIMAGELIST himl, HDC hdc_wnd, COLORREF bk_color=GetSysColor(COLOR_WINDOW), HBRUSH bk_brush=GetSysColorBrush(COLOR_WINDOW)) const
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
#define PathRemoveBackslash
LPCTSTR set_type(struct Entry *entry, bool dont_hide_ext=false)
int WINAPI GetSystemMetrics(_In_ int)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
#define GetModuleFileName
#define IDD_ABOUT_EXPLORER
#define INVALID_FILE_ATTRIBUTES
DynamicLoadLibFct< void(__stdcall *)(BOOL)> g_SHDOCVW_ShellDDEInit(TEXT("SHDOCVW"), 118)
static bool SetShellReadyEvent(LPCTSTR evtName)
struct _IMAGELIST * HIMAGELIST
void init(HINSTANCE hInstance)
SHORT WINAPI GetAsyncKeyState(_In_ int)
ExplorerGlobals g_Globals
const Icon & get_icon(int icon_id)
GLsizei const GLfloat * value
#define STD_OUTPUT_HANDLE
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
bool import_IE_favorites(HWND hwnd)
import Internet Explorer bookmarks from Favorites folder
WDF_CHILD_LIST_ITERATOR iterator
#define GetFileAttributes
#define RegisterClipboardFormat
CtlColorParent< OwnerDrawParent< Dialog > > super
BOOL WINAPI DestroyMenu(_In_ HMENU)
static VOID CenterWindow(HWND hWnd)
window class with specified icon from resources
const Icon & add(HICON hIcon, ICON_TYPE type=IT_DYNAMIC)
structure containing global variables of Explorer
BOOL RecursiveCreateDirectory(LPCTSTR path_in)
void SetWindowIcon(HWND hwnd, UINT nid)
set big and small icons out of the resources for a window
HBITMAP create_bitmap(COLORREF bk_color, HBRUSH hbrBkgnd, HDC hdc_wnd) const
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
BOOL WINAPI DeleteDC(_In_ HDC)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
#define STARTMENUROOT_ICON_SIZE
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define SelectBitmap(hdc, hbm)
GLint GLint GLint GLint GLint GLint y
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static void InitInstance(HINSTANCE hInstance)
_TCHAR * _tcsrchr(const _TCHAR *s, _XINT c)
BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, INT *cx, INT *cy)
static int DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent=0)
#define EVENT_MODIFY_STATE
BOOL WINAPI SetForegroundWindow(_In_ HWND)
HBITMAP create_small_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd)
ExplorerAboutDlg(HWND hwnd)
#define GetProcAddress(x, y)
_Check_return_opt_ _CRTIMP int __cdecl setvbuf(_Inout_ FILE *_File, _Inout_updates_opt_z_(_Size) char *_Buf, _In_ int _Mode, _In_ size_t _Size)
#define HKEY_CLASSES_ROOT
GLuint GLuint GLsizei GLenum type
_CRTIMP int __cdecl _open_osfhandle(_In_ intptr_t _OSFileHandle, _In_ int _Flags)
HBITMAP create_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd)
create a bitmap from an icon
convenient loading of string resources
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
bool write_file(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART) const
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define RegCloseKey(hKey)
base of all file and directory entries
void draw(HDC hdc, int x, int y, int cx, int cy, COLORREF bk_color, HBRUSH bk_brush) const
_Rep_type::iterator iterator
XS_String str() const
return merged error strings
static UINT WPARAM wparam
BOOL WINAPI ImageList_DrawEx(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, INT dx, INT dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle)
DWORD(STDAPICALLTYPE *_SHRestricted)(RESTRICTIONS)
#define HKEY_LOCAL_MACHINE
HIMAGELIST get_sys_imagelist() const