ReactOS 0.4.15-dev-8096-ga0eec98
explorer.cpp File Reference
#include <precomp.h>
#include <shlwapi.h>
#include <locale.h>
#include <io.h>
#include <fcntl.h>
#include "services/shellservices.h"
Include dependency graph for explorer.cpp:

Go to the source code of this file.

Classes

struct  ExplorerAboutDlg
 "About Explorer" Dialog More...
 

Functions

int initialize_gdb_stub ()
 
DynamicLoadLibFct< void(__stdcall *)(BOOL)> g_SHDOCVW_ShellDDEInit (TEXT("SHDOCVW"), 118)
 
void _log_ (LPCTSTR txt)
 
HBITMAP create_bitmap_from_icon (HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd)
 create a bitmap from an icon
 
HBITMAP create_small_bitmap_from_icon (HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd)
 
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
 
void SetWindowIcon (HWND hwnd, UINT nid)
 set big and small icons out of the resources for a window
 
void explorer_show_frame (int cmdShow, LPTSTR lpCmdLine)
 
void explorer_about (HWND hwndParent)
 
static void InitInstance (HINSTANCE hInstance)
 
int explorer_main (HINSTANCE hInstance, LPTSTR lpCmdLine, int cmdShow)
 
static bool SetShellReadyEvent (LPCTSTR evtName)
 
int WINAPI _tWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nShowCmd)
 

Variables

ExplorerGlobals g_Globals
 
boolean SelectOpt =FALSE
 

Function Documentation

◆ _log_()

void _log_ ( LPCTSTR  txt)

Definition at line 139 of file explorer.cpp.

140{
141 FmtString msg(TEXT("%s\n"), txt);
142
143 if (g_Globals._log)
145
147}
#define msg(x)
Definition: auth_time.c:54
#define _fputts
Definition: tchar.h:569
#define TEXT(s)
Definition: k32.h:26
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
FILE * _log
Definition: globals.h:280
#define OutputDebugString
Definition: winbase.h:3890

◆ _tWinMain()

int WINAPI _tWinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPTSTR  lpCmdLine,
int  nShowCmd 
)
Todo:
save previous shell application in config file
Todo:
save previous shell application in config file

TODO launching autostart programs can be moved into a background thread.

Definition at line 1006 of file explorer.cpp.

1007{
1008 CONTEXT("WinMain()");
1009
1010 BOOL any_desktop_running = IsAnyDesktopRunning();
1011
1012 BOOL startup_desktop;
1013
1014 // strip extended options from the front of the command line
1015 String ext_options;
1016
1017 while(*lpCmdLine == '-') {
1018 while(*lpCmdLine && !_istspace((unsigned)*lpCmdLine))
1019 ext_options += *lpCmdLine++;
1020
1021 while(_istspace((unsigned)*lpCmdLine))
1022 ++lpCmdLine;
1023 }
1024
1025 // command line option "-install" to replace previous shell application with ROS Explorer
1026 if (_tcsstr(ext_options,TEXT("-install"))) {
1027 // install ROS Explorer into the registry
1029
1030 int l = GetModuleFileName(0, path, COUNTOF(path));
1031 if (l) {
1032 HKEY hkey;
1033
1034 if (!RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"), &hkey)) {
1035
1037
1038 RegSetValueEx(hkey, TEXT("Shell"), 0, REG_SZ, (LPBYTE)path, l*sizeof(TCHAR));
1039 RegCloseKey(hkey);
1040 }
1041
1042 if (!RegOpenKey(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"), &hkey)) {
1043
1045
1046 RegSetValueEx(hkey, TEXT("Shell"), 0, REG_SZ, (LPBYTE)TEXT(""), l*sizeof(TCHAR));
1047 RegCloseKey(hkey);
1048 }
1049 }
1050
1051 HWND shellWindow = GetShellWindow();
1052
1053 if (shellWindow) {
1054 DWORD pid;
1055
1056 // terminate shell process for NT like systems
1057 GetWindowThreadProcessId(shellWindow, &pid);
1059
1060 // On Win 9x it's sufficient to destroy the shell window.
1061 DestroyWindow(shellWindow);
1062
1063 if (TerminateProcess(hProcess, 0))
1065
1067 }
1068
1069 startup_desktop = TRUE;
1070 } else {
1071 // create desktop window and task bar only, if there is no other shell and we are
1072 // the first explorer instance
1073 // MS Explorer looks additionally into the registry entry HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\shell,
1074 // to decide wether it is currently configured as shell application.
1075 startup_desktop = !any_desktop_running;
1076 }
1077
1078
1079 bool autostart = !any_desktop_running;
1080
1081 // disable autostart if the SHIFT key is pressed
1082 if (GetAsyncKeyState(VK_SHIFT) < 0)
1083 autostart = false;
1084
1085#ifdef _DEBUG //MF: disabled for debugging
1086 autostart = false;
1087#endif
1088
1089 // If there is given the command line option "-desktop", create desktop window anyways
1090 if (_tcsstr(ext_options,TEXT("-desktop")))
1091 startup_desktop = TRUE;
1092#ifndef ROSSHELL
1093 else if (_tcsstr(ext_options,TEXT("-nodesktop")))
1094 startup_desktop = FALSE;
1095
1096 // Don't display cabinet window in desktop mode
1097 if (startup_desktop && !_tcsstr(ext_options,TEXT("-explorer")))
1098 nShowCmd = SW_HIDE;
1099#endif
1100
1101 if (_tcsstr(ext_options,TEXT("-noautostart")))
1102 autostart = false;
1103 else if (_tcsstr(ext_options,TEXT("-autostart")))
1104 autostart = true;
1105
1106#ifndef __WINE__
1107 if (_tcsstr(ext_options,TEXT("-console"))) {
1108 AllocConsole();
1109
1113
1114 g_Globals._log = _fdopen(1, "w");
1115 setvbuf(g_Globals._log, 0, _IONBF, 0);
1116
1117 LOG(TEXT("starting explorer debug log\n"));
1118 }
1119#endif
1120
1121
1122 if (startup_desktop) {
1123 // hide the XP login screen (Credit to Nicolas Escuder)
1124 // another undocumented event: "Global\\msgina: ReturnToWelcome"
1125 if (!SetShellReadyEvent(TEXT("msgina: ShellReadyEvent")))
1126 SetShellReadyEvent(TEXT("Global\\msgina: ShellReadyEvent"));
1127 }
1128#ifdef ROSSHELL
1129 else
1130 return 0; // no shell to launch, so exit immediatelly
1131#endif
1132
1133
1134 if (!any_desktop_running) {
1135 // launch the shell DDE server
1137 (*g_SHDOCVW_ShellDDEInit)(TRUE);
1138 }
1139
1140
1141 bool use_gdb_stub = false; // !IsDebuggerPresent();
1142
1143 if (_tcsstr(ext_options,TEXT("-debug")))
1144 use_gdb_stub = true;
1145
1146 if (_tcsstr(ext_options,TEXT("-break"))) {
1147 LOG(TEXT("debugger breakpoint"));
1148 __debugbreak();
1149 }
1150
1151#ifdef _M_IX86
1152 // activate GDB remote debugging stub if no other debugger is running
1153 if (use_gdb_stub) {
1154 LOG(TEXT("waiting for debugger connection...\n"));
1155
1157 }
1158#endif
1159
1161
1162 // initialize COM and OLE before creating the desktop window
1163 OleInit usingCOM;
1164
1165 // init common controls library
1166 CommonControlInit usingCmnCtrl;
1167
1169
1170 if (startup_desktop) {
1171 WaitCursor wait;
1172
1174
1176#ifdef _USE_HDESK
1177 g_Globals._desktops.get_current_Desktop()->_hwndDesktop = g_Globals._hwndDesktop;
1178#endif
1179 }
1180
1181 if (_tcsstr(ext_options,TEXT("-?"))) {
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"
1187 "\r\n"
1188 "-? display command line options\r\n"
1189 "\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"
1193 "\r\n"
1194 "-install replace previous shell application with ROS Explorer\r\n"
1195 "\r\n"
1196 "-noautostart disable autostarts\r\n"
1197 "-autostart enable autostarts regardless of debug build\r\n"
1198 "\r\n"
1199 "-console open debug console\r\n"
1200 "\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);
1204 }
1205
1206 /*
1207 * Set our shutdown parameters: we want to shutdown the very last,
1208 * but before any TaskMgr instance (which has a shutdown level of 1).
1209 */
1211
1212 Thread* pSSOThread = NULL;
1213
1214 if (startup_desktop) {
1215 // launch SSO thread to allow message processing independent from the explorer main thread
1216 pSSOThread = new SSOThread;
1217 pSSOThread->Start();
1218 }
1219
1221 if (autostart) {
1222 const char* argv[] = {"", "s"}; // call startup routine in SESSION_START mode
1223 startup(2, argv);
1224 }
1225
1226#ifndef ROSSHELL
1228 g_Globals._desktop_mode = true;
1229#endif
1230
1231
1232 int ret = explorer_main(hInstance, lpCmdLine, nShowCmd);
1233
1234
1235 // write configuration file
1237
1238 if (pSSOThread) {
1239 pSSOThread->Stop();
1240 delete pSSOThread;
1241 }
1242
1243 if (!any_desktop_running) {
1244 // shutdown the shell DDE server
1246 (*g_SHDOCVW_ShellDDEInit)(FALSE);
1247 }
1248
1249 return ret;
1250}
static void startup(void)
VOID WaitCursor(BOOL bBegin)
Definition: dialog.c:114
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
BOOL WINAPI AllocConsole(VOID)
Definition: console.c:74
#define RegCloseKey(hKey)
Definition: registry.h:49
r l[0]
Definition: byte_order.h:168
HINSTANCE hInstance
Definition: charmap.c:19
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define _O_RDONLY
Definition: cabinet.h:37
#define CloseHandle
Definition: compat.h:739
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
BOOL WINAPI SetProcessShutdownParameters(IN DWORD dwLevel, IN DWORD dwFlags)
Definition: proc.c:949
#define INFINITE
Definition: serial.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
#define _IONBF
Definition: stdio.h:129
_Check_return_ _CRTIMP FILE *__cdecl _fdopen(_In_ int _FileHandle, _In_z_ const char *_Mode)
_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 _istspace
Definition: tchar.h:1504
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
#define REG_SZ
Definition: layer.c:22
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
BOOL IsAnyDesktopRunning()
Definition: desktop.cpp:248
static bool SetShellReadyEvent(LPCTSTR evtName)
Definition: explorer.cpp:993
DynamicLoadLibFct< void(__stdcall *)(BOOL)> g_SHDOCVW_ShellDDEInit(TEXT("SHDOCVW"), 118)
int explorer_main(HINSTANCE hInstance, LPTSTR lpCmdLine, int cmdShow)
Definition: explorer.cpp:961
int initialize_gdb_stub()
#define LOG(txt)
Definition: utility.h:102
#define COUNTOF(x)
Definition: utility.h:93
#define argv
Definition: mplay32.c:18
struct _CONTEXT CONTEXT
#define PROCESS_ALL_ACCESS
Definition: nt_native.h:1324
_Check_return_ _CRTIMP int __cdecl _dup2(_In_ int _FileHandleSrc, _In_ int _FileHandleDst)
_CRTIMP int __cdecl _open_osfhandle(_In_ intptr_t _OSFileHandle, _In_ int _Flags)
static HWND Create()
Definition: desktop.cpp:326
void init()
Definition: desktop.cpp:77
void init(HINSTANCE hInstance)
Definition: explorer.cpp:76
Desktops _desktops
Definition: globals.h:291
void write_persistent()
Definition: explorer.cpp:109
void read_persistent()
Definition: explorer.cpp:84
bool _desktop_mode
Definition: globals.h:276
HWND _hwndDesktop
Definition: globals.h:289
OLE initialisation for drag drop support.
Definition: shellclasses.h:202
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
unsigned char * LPBYTE
Definition: typedefs.h:53
int ret
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
HWND WINAPI GetShellWindow(VOID)
Definition: desktop.c:651
#define STD_OUTPUT_HANDLE
Definition: winbase.h:268
#define STD_INPUT_HANDLE
Definition: winbase.h:267
#define STD_ERROR_HANDLE
Definition: winbase.h:269
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
#define GetModuleFileName
Definition: winbase.h:3831
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define RegSetValueEx
Definition: winreg.h:533
#define RegOpenKey
Definition: winreg.h:519
#define SW_HIDE
Definition: winuser.h:768
int WINAPI MessageBoxA(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)
#define MB_OK
Definition: winuser.h:790
#define VK_SHIFT
Definition: winuser.h:2202
SHORT WINAPI GetAsyncKeyState(_In_ int)
BOOL WINAPI DestroyWindow(_In_ HWND)
char TCHAR
Definition: xmlstorage.h:189
#define _tcsstr
Definition: xmlstorage.h:199

◆ create_bitmap_from_icon()

HBITMAP create_bitmap_from_icon ( HICON  hIcon,
HBRUSH  hbrush_bkgnd,
HDC  hdc_wnd 
)

create a bitmap from an icon

Definition at line 332 of file explorer.cpp.

333{
334 int cx = ICON_SIZE_SMALL;
335 int cy = ICON_SIZE_SMALL;
337
338 MemCanvas canvas;
339 BitmapSelection sel(canvas, hbmp);
340
341 RECT rect = {0, 0, cx, cy};
342 FillRect(canvas, &rect, hbrush_bkgnd);
343
344 DrawIconEx(canvas, 0, 0, hIcon, cx, cy, 0, hbrush_bkgnd, DI_NORMAL);
345
346 return hbmp;
347}
HBITMAP hbmp
#define ICON_SIZE_SMALL
Definition: globals.h:169
static HBITMAP
Definition: button.c:44
HICON hIcon
Definition: msconfig.c:44
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
& rect
Definition: startmenu.cpp:1413
#define DI_NORMAL
Definition: wingdi.h:72
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
Definition: cursoricon.c:2059

Referenced by Icon::create_bitmap(), TaskBar::EnumWndProc(), and ImageList_AddAlphaIcon().

◆ create_small_bitmap_from_icon()

HBITMAP create_small_bitmap_from_icon ( HICON  hIcon,
HBRUSH  hbrush_bkgnd,
HDC  hdc_wnd 
)

Definition at line 349 of file explorer.cpp.

350{
354
355 MemCanvas canvas;
356 BitmapSelection sel(canvas, hbmp);
357
358 RECT rect = {0, 0, cx, cy};
359 FillRect(canvas, &rect, hbrush_bkgnd);
360
361 DrawIconEx(canvas, 0, 0, hIcon, cx, cy, 0, hbrush_bkgnd, DI_NORMAL);
362
363 return hbmp;
364}
#define SM_CYSMICON
Definition: winuser.h:1013
#define SM_CXSMICON
Definition: winuser.h:1012
int WINAPI GetSystemMetrics(_In_ int)

◆ explorer_about()

void explorer_about ( HWND  hwndParent)

Definition at line 934 of file explorer.cpp.

935{
937}
static HWND hwndParent
Definition: cryptui.c:300
#define IDD_ABOUT_EXPLORER
Definition: resource.h:81
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
static int DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent=0)
Definition: window.cpp:701
"About Explorer" Dialog
Definition: explorer.cpp:875

Referenced by MainFrameBase::Command(), DesktopBar::Command(), and DesktopShellView::DoDesktopContextMenu().

◆ explorer_main()

int explorer_main ( HINSTANCE  hInstance,
LPTSTR  lpCmdLine,
int  cmdShow 
)

Definition at line 961 of file explorer.cpp.

962{
963 CONTEXT("explorer_main");
964
965 // initialize Common Controls library
966 CommonControlInit usingCmnCtrl;
967
968 try {
970 } catch(COMException& e) {
972 return -1;
973 }
974
975#ifndef ROSSHELL
976 if (cmdShow != SW_HIDE) {
977/* // don't maximize if being called from the ROS desktop
978 if (cmdShow == SW_SHOWNORMAL)
980 cmdShow = SW_MAXIMIZE;
981*/
982
983 explorer_show_frame(cmdShow, lpCmdLine);
984 }
985#endif
986
988
989 return 1;
990}
#define e
Definition: ke_i.h:82
void explorer_show_frame(int cmdShow, LPTSTR lpCmdLine)
Definition: explorer.cpp:707
static void InitInstance(HINSTANCE hInstance)
Definition: explorer.cpp:940
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
Exception with context information.
Definition: shellclasses.h:114
static int MessageLoop()
Definition: window.cpp:629
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656

Referenced by _tWinMain().

◆ explorer_show_frame()

void explorer_show_frame ( int  cmdShow,
LPTSTR  lpCmdLine 
)

Definition at line 707 of file explorer.cpp.

708{
710
711 if (g_Globals._hMainWnd) {
714 else
716
717 return;
718 }
719
721
722 cmd._mdi = true;
723 cmd._cmdShow = cmdShow;
724
725 // parse command line options, which may overwrite the MDI flag
726 if (lpCmdLine)
727 cmd.ParseCmdLine(lpCmdLine);
728
729 // create main window
731}
Explorer command line parser.
Definition: explorer.h:90
bool _prescan_nodes
Definition: globals.h:277
HWND _hMainWnd
Definition: globals.h:275
static HWND Create(const ExplorerCmd &cmd)
Definition: mainframe.cpp:40
Definition: ftp_var.h:139
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI IsIconic(_In_ HWND)
#define SW_RESTORE
Definition: winuser.h:779

Referenced by DesktopBar::Command(), StartMenuHandler::Command(), explorer_main(), DesktopBar::ProcessHotKey(), and DesktopWindow::WndProc().

◆ g_SHDOCVW_ShellDDEInit()

DynamicLoadLibFct< void(__stdcall *)(BOOL)> g_SHDOCVW_ShellDDEInit ( TEXT("SHDOCVW")  ,
118   
)

Referenced by _tWinMain().

◆ ImageList_AddAlphaIcon()

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

Definition at line 366 of file explorer.cpp.

367{
368 HBITMAP hbmp = create_bitmap_from_icon(hIcon, hbrush_bkgnd, hdc_wnd);
369
370 int ret = ImageList_Add(himl, hbmp, 0);
371
373
374 return ret;
375}
HIMAGELIST himl
INT WINAPI ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
Definition: imagelist.c:448
pKey DeleteObject()
HBITMAP create_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd)
create a bitmap from an icon
Definition: explorer.cpp:332

Referenced by Icon::add_to_imagelist(), MainFrameBase::FillBookmarks(), TrayNotifyDlg::InsertItem(), and TrayNotifyDlg::TrayNotifyDlg().

◆ initialize_gdb_stub()

int initialize_gdb_stub ( )

Referenced by _tWinMain().

◆ InitInstance()

static void InitInstance ( HINSTANCE  hInstance)
static

Definition at line 940 of file explorer.cpp.

941{
942 CONTEXT("InitInstance");
943
944 setlocale(LC_COLLATE, ""); // set collating rules to local settings for compareName
945
946#ifndef ROSSHELL
947 // register frame window class
949
950 // register child window class
952
953 // register tree window class
955#endif
956
958}
#define CLASSNAME_CHILDWND
Definition: explorer.h:75
#define CLASSNAME_FRAME
Definition: explorer.h:73
#define CLASSNAME_WINEFILETREE
Definition: explorer.h:76
#define LC_COLLATE
Definition: locale.h:18
#define IDI_EXPLORER
Definition: resource.h:56
#define CFSTR_FILENAME
Definition: shlobj.h:548
ATOM _hframeClass
Definition: globals.h:274
UINT _cfStrFName
Definition: globals.h:271
window class with specified icon from resources
Definition: window.h:259
ATOM Register()
Definition: window.h:230
#define setlocale(n, s)
Definition: locale.h:46
#define RegisterClipboardFormat
Definition: winuser.h:5838
#define CS_DBLCLKS
Definition: winuser.h:651
#define CS_CLASSDC
Definition: winuser.h:650

Referenced by explorer_main().

◆ SetShellReadyEvent()

static bool SetShellReadyEvent ( LPCTSTR  evtName)
static

Definition at line 993 of file explorer.cpp.

994{
996 if (!hEvent)
997 return false;
998
1001
1002 return true;
1003}
static HANDLE hEvent
Definition: comm.c:54
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
#define EVENT_MODIFY_STATE
Definition: winbase.h:163
#define OpenEvent
Definition: winbase.h:3885

Referenced by _tWinMain().

◆ SetWindowIcon()

void SetWindowIcon ( HWND  hwnd,
UINT  nid 
)

set big and small icons out of the resources for a window

Definition at line 689 of file explorer.cpp.

690{
693
694 HICON hIconSmall = SmallIcon(nid);
695 (void)Window_SetIcon(hwnd, ICON_SMALL, hIconSmall);
696}
NOTIFYICONDATA nid
Definition: magnifier.c:44
#define Window_SetIcon(hwnd, type, hicon)
Definition: utility.h:155
static HICON
Definition: imagelist.c:84
convenient loading of standard (32x32) icon resources
Definition: globals.h:310
convenient loading of small (16x16) icon resources
Definition: globals.h:321
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by DesktopBar::DesktopBar(), ExplorerAboutDlg::ExplorerAboutDlg(), FindProgramDlg::FindProgramDlg(), and TrayNotifyDlg::TrayNotifyDlg().

Variable Documentation

◆ g_Globals

ExplorerGlobals g_Globals

Definition at line 52 of file explorer.cpp.

Referenced by _log_(), _tWinMain(), StartMenu::AddButton(), SettingsMenu::AddEntries(), BrowseMenu::AddEntries(), SearchMenu::AddEntries(), FavoritesMenu::AddEntries(), QuickLaunchBar::AddShortcuts(), DesktopSettingsDlg::Command(), TaskbarSettingsDlg::Command(), MdiSdiDlg::Command(), MainFrameBase::Command(), DesktopBar::Command(), StartMenuHandler::Command(), MDIMainFrame::Create(), SDIMainFrame::Create(), ChildWindow::create(), MainFrameBase::Create(), FileChildWindow::create(), Window::Create(), Pane::create_header(), DesktopSettingsDlg::DesktopSettingsDlg(), Dialog::DoModal(), Pane::draw_item(), explorer_show_frame(), Entry::extract_icon(), BookmarkList::fill_tree(), ShellDirectory::fill_w32fdata_shell(), MainFrameBase::FillBookmarks(), FindProgramDlg::FindProgramDlg(), ShellBrowser::get_image_idx(), Pane::init(), DesktopWindow::Init(), DesktopBar::Init(), StartMenuRoot::Init(), InitInstance(), ShellBrowser::InsertSubitems(), ShellBrowser::invalidate_cache(), MainFrameBase::MainFrameBase(), MDIMainFrame::MDIMainFrame(), MdiSdiDlg::MdiSdiDlg(), MinimizeDesktopEnumFct(), FindProgramDlg::Notify(), DesktopSettingsDlg::Notify(), TaskbarSettingsDlg::Notify(), MainFrameBase::OpenShellFolders(), ExplorerAboutDlg::Paint(), DesktopBar::ProcessHotKey(), MainFrameBase::ProcessMessage(), PropertySheetDialog::PropertySheetDialog(), PropSheetPage::PropSheetPage(), Favorites::read(), NotifyArea::read_config(), ShellDirectory::read_directory(), WinDirectory::read_directory(), Entry::read_directory_base(), TrayNotifyDlg::RefreshProperties(), StartMenuRoot::StartMenuRoot(), SwitchDesktopEnumFct(), TaskbarSettingsDlg::TaskbarSettingsDlg(), TrayNotifyDlg::TrayNotifyDlg(), SDIMainFrame::update_shell_browser(), MDIShellBrowserChild::update_shell_browser(), WindowClass::WindowClass(), BackgroundWindow::WndProc(), DesktopWindow::WndProc(), NotifyArea::write_config(), Entry::~Entry(), and MainFrameBase::~MainFrameBase().

◆ SelectOpt

boolean SelectOpt =FALSE

Definition at line 53 of file explorer.cpp.

Referenced by ExplorerCmd::EvaluateOption().