mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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 <shellapi.h>
|
||||
#include <stdlib.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
|
@ -311,6 +312,7 @@ FrameOnCommand(HWND hwnd,
|
|||
{
|
||||
PCONSOLE_MAINFRAME_WND Info;
|
||||
HWND hChild;
|
||||
LPTSTR lpTitle;
|
||||
|
||||
Info = (PCONSOLE_MAINFRAME_WND)GetWindowLongPtr(hwnd, 0);
|
||||
|
||||
|
@ -334,6 +336,15 @@ FrameOnCommand(HWND hwnd,
|
|||
PostMessage(hwnd, WM_CLOSE, 0, 0);
|
||||
break;
|
||||
|
||||
case IDM_HELP_ABOUT:
|
||||
if (AllocAndLoadString(&lpTitle, hAppInstance, IDS_APPTITLE))
|
||||
{
|
||||
ShellAbout(hwnd, lpTitle, NULL,
|
||||
LoadIcon(hAppInstance, MAKEINTRESOURCE(IDI_MAINAPP)));
|
||||
LocalFree(lpTitle);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (LOWORD(wParam) >= IDM_MDI_FIRSTCHILD)
|
||||
{
|
||||
|
|
|
@ -55,8 +55,7 @@ LengthOfStrResource(IN HINSTANCE hInst,
|
|||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static INT
|
||||
INT
|
||||
AllocAndLoadString(OUT LPTSTR *lpTarget,
|
||||
IN HINSTANCE hInst,
|
||||
IN UINT uID)
|
||||
|
|
|
@ -32,6 +32,11 @@ INT
|
|||
LengthOfStrResource(IN HINSTANCE hInst,
|
||||
IN UINT uID);
|
||||
|
||||
INT
|
||||
AllocAndLoadString(OUT LPTSTR *lpTarget,
|
||||
IN HINSTANCE hInst,
|
||||
IN UINT uID);
|
||||
|
||||
DWORD
|
||||
LoadAndFormatString(IN HINSTANCE hInstance,
|
||||
IN UINT uID,
|
||||
|
|
Loading…
Reference in a new issue