mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
- Implement the code for the "Run" and "Shutdown" menu items, create stubs for the other custom commands
- Replace the ROS-specific STDCALL by APIENTRY for the function prototypes svn path=/trunk/; revision=33966
This commit is contained in:
@@ -25,15 +25,21 @@
|
||||
#include "undoc.h"
|
||||
|
||||
/* dynamic imports due to lack of support in msvc linker libs */
|
||||
typedef INT (STDCALL *REGSHELLHOOK)(HWND, DWORD);
|
||||
typedef INT (APIENTRY *REGSHELLHOOK)(HWND, DWORD);
|
||||
#ifdef UNICODE
|
||||
#define PROC_NAME_DRAWCAPTIONTEMP "DrawCaptionTempW"
|
||||
typedef BOOL (STDCALL *DRAWCAPTEMP)(HWND, HDC, const RECT*, HFONT, HICON, LPCWSTR, UINT);
|
||||
typedef BOOL (APIENTRY *DRAWCAPTEMP)(HWND, HDC, const RECT*, HFONT, HICON, LPCWSTR, UINT);
|
||||
#else
|
||||
#define PROC_NAME_DRAWCAPTIONTEMP "DrawCaptionTempA"
|
||||
typedef BOOL (STDCALL *DRAWCAPTEMP)(HWND, HDC, const RECT*, HFONT, HICON, LPCSTR, UINT);
|
||||
typedef BOOL (APIENTRY *DRAWCAPTEMP)(HWND, HDC, const RECT*, HFONT, HICON, LPCSTR, UINT);
|
||||
#endif
|
||||
typedef HRESULT (STDCALL *SHINVDEFCMD)(HWND, IShellFolder*, LPCITEMIDLIST);
|
||||
typedef HRESULT (APIENTRY *SHINVDEFCMD)(HWND, IShellFolder*, LPCITEMIDLIST);
|
||||
typedef void (APIENTRY *RUNFILEDLG)(HWND, HICON, LPCWSTR, LPCWSTR, LPCWSTR, UINT);
|
||||
typedef void (APIENTRY *EXITWINDLG)(HWND);
|
||||
typedef HRESULT (APIENTRY *SHWINHELP)(HWND, LPWSTR, UINT, DWORD);
|
||||
|
||||
/* Constants for RunFileDlg */
|
||||
#define RFF_CALCDIRECTORY 0x04 /* Calculates the working directory from the file name. */
|
||||
|
||||
static ULONG __inline
|
||||
Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...)
|
||||
|
||||
@@ -2260,7 +2260,45 @@ HandleTrayContextMenu:
|
||||
lParam,
|
||||
&Ret)))
|
||||
{
|
||||
/* FIXME: Handle own commands */
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
/* FIXME: Handle these commands as well */
|
||||
case IDM_TASKBARANDSTARTMENU:
|
||||
case IDM_SEARCH:
|
||||
case IDM_HELPANDSUPPORT:
|
||||
break;
|
||||
|
||||
case IDM_RUN:
|
||||
{
|
||||
HANDLE hShell32;
|
||||
RUNFILEDLG RunFileDlg;
|
||||
|
||||
hShell32 = GetModuleHandle(TEXT("SHELL32.DLL"));
|
||||
RunFileDlg = (RUNFILEDLG)GetProcAddress(hShell32, (LPCSTR)61);
|
||||
|
||||
RunFileDlg(hwnd, NULL, NULL, NULL, NULL, RFF_CALCDIRECTORY);
|
||||
break;
|
||||
}
|
||||
|
||||
/* FIXME: Handle these commands as well */
|
||||
case IDM_SYNCHRONIZE:
|
||||
case IDM_LOGOFF:
|
||||
case IDM_DISCONNECT:
|
||||
case IDM_UNDOCKCOMPUTER:
|
||||
break;
|
||||
|
||||
case IDM_SHUTDOWN:
|
||||
{
|
||||
HANDLE hShell32;
|
||||
EXITWINDLG ExitWinDlg;
|
||||
|
||||
hShell32 = GetModuleHandle(TEXT("SHELL32.DLL"));
|
||||
ExitWinDlg = (EXITWINDLG)GetProcAddress(hShell32, (LPCSTR)60);
|
||||
|
||||
ExitWinDlg(hwnd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user