- implement Drag Drop from the tree view.
- activate accelerator keys like <DEL> in shell view folders
- program manager "progman" DDE server
-- command line parameters like "/e,/root,c:\"
+- command line parameters like "/e,/root,c:\" and "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}" (launch auf control panel)
- search functionality in start menu
- Windows-key combos
- Application Desktop Toolbars
Paint();
break;
+ case WM_LBUTTONDBLCLK:
+ //launch_file(_hwnd, _T("timedate.cpl"), SW_SHOWNORMAL); // This would be enough, but we want the fastest solution.
+ //launch_file(_hwnd, _T("rundll32.exe /d shell32.dll,Control_RunDLL timedate.cpl"), SW_SHOWNORMAL);
+ RunDLL(_hwnd, _T("shell32"), "Control_RunDLL", _T("timedate.cpl"), SW_SHOWNORMAL);
+ break;
+
default:
return super::WndProc(nmsg, wparam, lparam);
}
return 0;
}
+
+
+typedef void (WINAPI*RUNDLLPROC)(HWND hwnd, HINSTANCE hinst, LPCTSTR cmdline, DWORD nCmdShow);
+
+BOOL RunDLL(HWND hwnd, LPCTSTR dllname, LPCSTR procname, LPCTSTR cmdline, UINT nCmdShow)
+{
+ HMODULE hmod = LoadLibrary(dllname);
+ if (!hmod)
+ return FALSE;
+
+/*TODO
+ <Windows NT/2000>
+ It is possible to create a Unicode version of the function.
+ Rundll32 first tries to find a function named EntryPointW.
+ If it cannot find this function, it tries EntryPointA, then EntryPoint.
+ To create a DLL that supports ANSI on Windows 95/98/Me and Unicode otherwise,
+ export two functions: EntryPointW and EntryPoint.
+*/
+ RUNDLLPROC proc = (RUNDLLPROC)GetProcAddress(hmod, procname);
+ if (!proc) {
+ FreeLibrary(hmod);
+ return FALSE;
+ }
+
+ proc(hwnd, hmod, cmdline, nCmdShow);
+
+ FreeLibrary(hmod);
+
+ return TRUE;
+}
// search for windows of a specific classname
extern int find_window_class(LPCTSTR classname);
+ // create a bitmap from an icon
+extern HBITMAP create_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd);
+
// launch a program or document file
extern BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow);
#ifdef UNICODE
#define launch_fileA launch_file
#endif
- // create a bitmap from an icon
-extern HBITMAP create_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd);
+ // call an DLL export like rundll32
+BOOL RunDLL(HWND hwnd, LPCTSTR dllname, LPCSTR procname, LPCTSTR cmdline, UINT nCmdShow);
#ifdef __cplusplus