diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-15 10:38:20 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-15 10:38:20 +0000 |
commit | 48540940b6c28bb4378abfeb500ec45a625b37b6 (patch) | |
tree | 2ef294c0763e802f91d868bdef4229b6868527de /plugins/SplashScreen/src/services.cpp | |
parent | 5c350913f011e119127baeb32a6aedeb4f0d33bc (diff) |
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SplashScreen/src/services.cpp')
-rw-r--r-- | plugins/SplashScreen/src/services.cpp | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/plugins/SplashScreen/src/services.cpp b/plugins/SplashScreen/src/services.cpp new file mode 100644 index 0000000000..7d4730c8f3 --- /dev/null +++ b/plugins/SplashScreen/src/services.cpp @@ -0,0 +1,74 @@ +/*
+ Splash Screen Plugin for Miranda-IM (www.miranda-im.org)
+ (c) 2004-2007 nullbie, (c) 2005-2007 Thief
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ File name : $URL: http://svn.miranda.im/mainrepo/splashscreen/trunk/src/services.cpp $
+ Revision : $Rev: 951 $
+ Last change on : $Date: 2007-10-16 18:46:53 +0400 (Вт, 16 окт 2007) $
+ Last change by : $Author: Thief $
+
+*/
+
+#include "headers.h"
+
+INT_PTR ShowSplashService(WPARAM wparam,LPARAM lparam)
+{
+ bserviceinvoked = true;
+ TCHAR szOldfn [256];
+ TCHAR* pos;
+ TCHAR* filename = (TCHAR*) wparam;
+ int timetoshow = (int) lparam;
+
+ lstrcpy(szOldfn, szSplashFile);
+ options.showtime = timetoshow;
+
+ pos = _tcsrchr(filename, _T(':'));
+ if (pos == NULL)
+ mir_sntprintf(szSplashFile, SIZEOF(szSplashFile), _T("%s\\%s"), szMirDir, filename);
+ else
+ lstrcpy(szSplashFile, filename);
+
+ ShowSplash(false);
+
+ lstrcpy(szSplashFile, szOldfn);
+
+ return 0;
+}
+
+#ifdef _DEBUG
+INT_PTR TestService(WPARAM wParam,LPARAM lParam)
+{
+ TCHAR szTempPath[MAX_PATH];
+
+ OPENFILENAME ofn={0};
+ ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.lpstrFilter = _T("PNG and BMP files\0*.png;*.bmp\0\0");
+ ofn.hwndOwner=0;
+ ofn.lpstrFile = szTempPath;
+ ofn.nMaxFile = MAX_PATH;
+ ofn.nMaxFileTitle = MAX_PATH;
+ ofn.Flags = OFN_HIDEREADONLY;
+ ofn.lpstrInitialDir = szSplashFile;
+ *szTempPath = '\0';
+ ofn.lpstrDefExt = _T("");
+
+ if (GetOpenFileName(&ofn))
+ CallService(MS_SHOWSPLASH,(WPARAM)szTempPath,(LPARAM)0);
+
+ return 0;
+}
+#endif
\ No newline at end of file |