summaryrefslogtreecommitdiff
path: root/src/corelib/gdi
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2014-09-19 15:44:56 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2014-09-19 15:44:56 +0100
commit8409869f55b178214d4a20f39e19603817d55105 (patch)
treeb38484e326affae830f09950ffa9378708faf402 /src/corelib/gdi
parent373b713182b6da1b1af992810926ed75b41ba8e8 (diff)
downloadfpGUI-8409869f55b178214d4a20f39e19603817d55105.tar.xz
Windows: Just for fun, allow the ability to hook into the System Menu
This means we can easily add an "About fpGUI" menu item in the System Menu of a window.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r--src/corelib/gdi/fpg_gdi.pas13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index f1372928..159d73d5 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -1,7 +1,7 @@
{
fpGUI - Free Pascal GUI Toolkit
- Copyright (C) 2006 - 2013 See the file AUTHORS.txt, included in this
+ Copyright (C) 2006 - 2014 See the file AUTHORS.txt, included in this
distribution, for details of the copyright.
See the file COPYING.modifiedLGPL, included in this distribution,
@@ -347,6 +347,10 @@ var
OldMousePos: TPoint; // used to detect fake MouseMove events
NeedToUnitialize: Boolean;
+
+const
+ ID_ABOUT = 200001;
+
// some required keyboard functions
{$INCLUDE fpg_keys_gdi.inc}
@@ -1204,6 +1208,13 @@ begin
Windows.EndPaint(w.WinHandle, @PaintStruct);
end;
+ WM_SYSCOMMAND:
+ begin
+ if wParam = ID_ABOUT then
+ fpgSendMessage(nil, w, FPGM_ABOUT, msgp)
+ else
+ Windows.DefWindowProc(hwnd, uMsg, wParam, lParam);
+ end
else
Result := Windows.DefWindowProc(hwnd, uMsg, wParam, lParam);
end;