diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-05-05 12:15:08 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-05-05 12:15:08 +0000 |
commit | 653261a27182e9c8969ed074f0da9ec4dba920b1 (patch) | |
tree | 00a8878163293b6a69c999bbd106d9ccefa2ed69 /Tooltip_Notify/src/Utils.cpp | |
parent | 4314e4924b2ddb9aea86b39d6d683fcc3f7b1822 (diff) |
added Tooltip Notofy
added Zero Notification
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@72 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'Tooltip_Notify/src/Utils.cpp')
-rw-r--r-- | Tooltip_Notify/src/Utils.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Tooltip_Notify/src/Utils.cpp b/Tooltip_Notify/src/Utils.cpp new file mode 100644 index 0000000..ce73dbc --- /dev/null +++ b/Tooltip_Notify/src/Utils.cpp @@ -0,0 +1,32 @@ +//
+// Utils.cpp
+//
+
+#include "stdafx.h"
+#include "Utils.h"
+
+BOOL IsNt50()
+{
+ WORD wOsVersion = LOWORD(GetVersion());
+ BYTE bMajorVer = LOBYTE(wOsVersion);
+ BYTE bMinorVer = HIBYTE(wOsVersion);
+
+ return (bMajorVer>=5 && bMinorVer>=0);
+}
+
+void TruncateWithDots(TCHAR* szString, int iNewLen)
+{
+ assert(iNewLen >= 0);
+
+ int iOrigLen = _tcslen(szString);
+ if (iNewLen < iOrigLen)
+ {
+ TCHAR* p = szString+iNewLen;
+ *p = _T('\0');
+ for(int i=0; --p>=szString && i<3; i++)
+ {
+ *p = _T('.');
+ }
+ }
+}
+
|