mirror of
https://github.com/reactos/reactos.git
synced 2025-05-13 06:18:17 +00:00
[MMC] Implement standard "About" menu action (#4639)
Reviewed-by: Serge Gautherie <reactos-git_serge_171003@gautherie.fr> Reviewed-by: Mark Jansen <mark.jansen@reactos.org> Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
This commit is contained in:
parent
67d063cbc8
commit
c994ba79d1
3 changed files with 17 additions and 2 deletions
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "precomp.h"
|
||||||
|
#include <shellapi.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
|
|
||||||
|
@ -311,6 +312,7 @@ FrameOnCommand(HWND hwnd,
|
||||||
{
|
{
|
||||||
PCONSOLE_MAINFRAME_WND Info;
|
PCONSOLE_MAINFRAME_WND Info;
|
||||||
HWND hChild;
|
HWND hChild;
|
||||||
|
LPTSTR lpTitle;
|
||||||
|
|
||||||
Info = (PCONSOLE_MAINFRAME_WND)GetWindowLongPtr(hwnd, 0);
|
Info = (PCONSOLE_MAINFRAME_WND)GetWindowLongPtr(hwnd, 0);
|
||||||
|
|
||||||
|
@ -334,6 +336,15 @@ FrameOnCommand(HWND hwnd,
|
||||||
PostMessage(hwnd, WM_CLOSE, 0, 0);
|
PostMessage(hwnd, WM_CLOSE, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IDM_HELP_ABOUT:
|
||||||
|
if (AllocAndLoadString(&lpTitle, hAppInstance, IDS_APPTITLE))
|
||||||
|
{
|
||||||
|
ShellAbout(hwnd, lpTitle, NULL,
|
||||||
|
LoadIcon(hAppInstance, MAKEINTRESOURCE(IDI_MAINAPP)));
|
||||||
|
LocalFree(lpTitle);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (LOWORD(wParam) >= IDM_MDI_FIRSTCHILD)
|
if (LOWORD(wParam) >= IDM_MDI_FIRSTCHILD)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,8 +55,7 @@ LengthOfStrResource(IN HINSTANCE hInst,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INT
|
||||||
static INT
|
|
||||||
AllocAndLoadString(OUT LPTSTR *lpTarget,
|
AllocAndLoadString(OUT LPTSTR *lpTarget,
|
||||||
IN HINSTANCE hInst,
|
IN HINSTANCE hInst,
|
||||||
IN UINT uID)
|
IN UINT uID)
|
||||||
|
|
|
@ -32,6 +32,11 @@ INT
|
||||||
LengthOfStrResource(IN HINSTANCE hInst,
|
LengthOfStrResource(IN HINSTANCE hInst,
|
||||||
IN UINT uID);
|
IN UINT uID);
|
||||||
|
|
||||||
|
INT
|
||||||
|
AllocAndLoadString(OUT LPTSTR *lpTarget,
|
||||||
|
IN HINSTANCE hInst,
|
||||||
|
IN UINT uID);
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
LoadAndFormatString(IN HINSTANCE hInstance,
|
LoadAndFormatString(IN HINSTANCE hInstance,
|
||||||
IN UINT uID,
|
IN UINT uID,
|
||||||
|
|
Loading…
Reference in a new issue