summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-09-03 07:57:53 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-09-03 07:57:53 +0000
commit7494409d38ba3cf3ed88f4ba34f5b20c02078932 (patch)
tree53efd51c6c668a40be60f611845a0290a8251899 /src/corelib
parent2b034d3d8504fae3eba98fb57ae806ffd3b89cfe (diff)
downloadfpGUI-7494409d38ba3cf3ed88f4ba34f5b20c02078932.tar.xz
* GDI: Added two helper functions that could come in handly later.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/gdi/gfx_gdi.pas12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas
index d0bcc846..42107f47 100644
--- a/src/corelib/gdi/gfx_gdi.pas
+++ b/src/corelib/gdi/gfx_gdi.pas
@@ -321,6 +321,18 @@ begin
EY := EP.Y;
end;
+// returns true when the operating system is windows 2000 or newer
+function IsWin2kOrLater: Boolean;
+begin
+ Result := (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion >= 5);
+end;
+
+// returns true when the operating system is windows XP or newer
+function IsWinXP: Boolean;
+begin
+ Result := (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion >= 5) and (Win32MinorVersion >= 1);
+end;
+
function fpgWindowProc(hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
var
w: TfpgWindowImpl;