mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 17:56:06 +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:
parent
e264b0b3c9
commit
ff164b383d
2 changed files with 49 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue