summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-21 21:58:47 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-21 21:58:47 +0000
commit7c0fdf0c457d55b6bfdda0282cf5099057c715c7 (patch)
tree31389d750c1fb6a6e7ecdd9279d32c238a50ff62 /plugins
parent4d970faf406c59e807a9ffd4d7a51f1aaad6636a (diff)
Not needed version checks removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/src/options.cpp2
-rw-r--r--plugins/AVS/src/services.cpp10
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp2
-rw-r--r--plugins/AssocMgr/src/reg.cpp20
-rw-r--r--plugins/AutoShutdown/src/cpuusage.cpp12
-rw-r--r--plugins/AutoShutdown/src/frame.cpp60
-rw-r--r--plugins/AutoShutdown/src/shutdownsvc.cpp16
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/Clist_blind/src/cluiopts.cpp9
-rw-r--r--plugins/Clist_modern/src/hdr/modern_defsettings.h2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp15
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp56
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp2
-rw-r--r--plugins/Clist_mw/src/cluiopts.cpp7
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/DbChecker/src/selectdb.cpp3
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp4
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp4
-rw-r--r--plugins/Dbx_mmap_SA/src/dialogs.cpp2
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp199
-rw-r--r--plugins/HistorySweeperLight/src/options.cpp3
-rw-r--r--plugins/ModernOpt/src/modernopt.cpp2
-rw-r--r--plugins/MyDetails/src/frame.cpp6
-rw-r--r--plugins/NewXstatusNotify/src/indsnd.cpp4
-rw-r--r--plugins/NoHistory/src/options.cpp2
-rw-r--r--plugins/NotesAndReminders/src/globals.h2
-rw-r--r--plugins/NotesAndReminders/src/hotkeys.cpp10
-rw-r--r--plugins/NotesAndReminders/src/main.cpp2
-rw-r--r--plugins/NotesAndReminders/src/notes.cpp34
-rw-r--r--plugins/NotesAndReminders/src/options.cpp9
-rw-r--r--plugins/Ping/src/pingthread.cpp3
-rw-r--r--plugins/Popup/res/resource.rc1
-rw-r--r--plugins/Popup/src/config.h1
-rw-r--r--plugins/Popup/src/opt_adv.cpp13
-rw-r--r--plugins/Popup/src/resource.h1
-rw-r--r--plugins/SimpleStatusMsg/src/msgbox.cpp4
-rw-r--r--plugins/SplashScreen/src/options.cpp122
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp11
-rw-r--r--plugins/TipperYM/src/mir_smileys.cpp6
-rw-r--r--plugins/TipperYM/src/options.cpp4
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp98
42 files changed, 332 insertions, 437 deletions
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 01b78cc9d8..1eb81be6a7 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -1029,7 +1029,7 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP
HWND hwndList = GetDlgItem(hwndDlg, IDC_PROTOCOLS);
ListView_SetExtendedListViewStyleEx(hwndList, 0, LVS_EX_SUBITEMIMAGES);
- HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 4, 0);
+ HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 4, 0);
ListView_SetImageList(hwndList, hIml, LVSIL_SMALL);
LVCOLUMN lvc = {0};
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index 56dd9e1661..7b776bc28f 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -137,10 +137,7 @@ static INT_PTR avSetAvatar(HANDLE hContact, TCHAR *tszPath)
filter[0] = '\0';
CallService(MS_UTILS_GETBITMAPFILTERSTRINGST, SIZEOF(filter), ( LPARAM )filter);
- if (IsWinVer2000Plus())
- ofn.lStructSize = sizeof(ofn);
- else
- ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = 0;
ofn.lpstrFile = FileName;
ofn.lpstrFilter = filter;
@@ -774,10 +771,7 @@ INT_PTR avSetMyAvatar( char* protocol, TCHAR* tszPath )
FoldersGetCustomPathT(hMyAvatarsFolder, inipath, SIZEOF(inipath), _T("."));
- if (IsWinVer2000Plus())
- ofn.lStructSize = sizeof(ofn);
- else
- ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = 0;
ofn.lpstrFile = FileName;
ofn.lpstrFilter = filter;
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index e895bffb09..cbbdeb538e 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -138,7 +138,7 @@ bool AddContactDlgAccounts(HWND hdlg, ADDCONTACTSTRUCT* acs)
RECT rc;
int iIndex = 0, cbWidth = 0;
- HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, iAccCount, 0);
+ HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, iAccCount, 0);
ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_SETIMAGELIST, 0, (LPARAM)hIml));
SendDlgItemMessage(hdlg, IDC_PROTO, CB_RESETCONTENT, 0, 0);
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp
index c285c65221..b0d7765182 100644
--- a/plugins/AssocMgr/src/reg.cpp
+++ b/plugins/AssocMgr/src/reg.cpp
@@ -680,7 +680,7 @@ BOOL AddRegClass(const char *pszClassName,const TCHAR *pszTypeDescription,const
return FALSE;
}
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_CREATE_SUB_KEY,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_CREATE_SUB_KEY,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT; /* might be write protected by security settings */
/* class */
@@ -772,7 +772,7 @@ BOOL RemoveRegClass(const char *pszClassName)
TCHAR *ptszClassName,*ptszPrevRunCmd;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,DELETE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,DELETE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* class name */
@@ -902,7 +902,7 @@ BOOL AddRegFileExt(const char *pszFileExt,const char *pszClassName,const char *p
return FALSE;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_CREATE_SUB_KEY,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_CREATE_SUB_KEY,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* file ext */
@@ -943,7 +943,7 @@ void RemoveRegFileExt(const char *pszFileExt,const char *pszClassName)
BOOL fRestored=FALSE;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,DELETE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,DELETE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* file ext */
@@ -1019,7 +1019,7 @@ BOOL AddRegMimeType(const char *pszMimeType,const char *pszFileExt,const TCHAR *
return FALSE;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* database */
@@ -1047,7 +1047,7 @@ void RemoveRegMimeType(const char *pszMimeType,const char *pszFileExt)
BOOL fDelete=TRUE;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* database */
@@ -1078,7 +1078,7 @@ void AddRegOpenWith(const TCHAR *pszAppFileName,BOOL fAllowOpenWith,const TCHAR
HKEY hRootKey,hAppsKey,hExeKey,hShellKey,hVerbKey,hDdeKey;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* database */
@@ -1131,7 +1131,7 @@ void RemoveRegOpenWith(const TCHAR *pszAppFileName)
HKEY hRootKey,hAppsKey,hExeKey,hShellKey,hVerbKey,hDdeKey;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* applications */
@@ -1182,7 +1182,7 @@ void AddRegOpenWithExtEntry(const TCHAR *pszAppFileName,const char *pszFileExt,c
HKEY hRootKey,hAppsKey,hExeKey,hTypesKey;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* applications */
@@ -1212,7 +1212,7 @@ void RemoveRegOpenWithExtEntry(const TCHAR *pszAppFileName,const char *pszFileEx
HKEY hRootKey,hAppsKey,hExeKey,hTypesKey;
/* try to open interactive user's classes key */
- if (!IsWinVer2000Plus() || RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* applications */
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp
index d99be4a6fe..8ab1fa91c0 100644
--- a/plugins/AutoShutdown/src/cpuusage.cpp
+++ b/plugins/AutoShutdown/src/cpuusage.cpp
@@ -90,15 +90,9 @@ static void WinNT_PollThread(void *vparam)
LARGE_INTEGER liPrevCounterValue={0},liCurrentCounterValue={0},liPrevPerfTime100nSec={0};
/* init */
- if(IsWinVer2000Plus()) { /* Win2000+: */
- dwObjectId=238; /*'Processor' object */
- dwCounterId=6; /* '% processor time' counter */
- pwszInstanceName=L"_Total"; /* '_Total' instance */
- } else { /* WinNT4: */
- dwObjectId=2; /* 'System' object */
- dwCounterId=240; /* '% Total processor time' counter */
- pwszInstanceName=NULL;
- }
+ dwObjectId=238; /*'Processor' object */
+ dwCounterId=6; /* '% processor time' counter */
+ pwszInstanceName=L"_Total"; /* '_Total' instance */
_itot_s(dwObjectId, wszValueName, 10);
fSwitched = WinNT_PerfStatsSwitch(_T("PerfOS"), FALSE);
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp
index 3e8262d7fa..04b0a10422 100644
--- a/plugins/AutoShutdown/src/frame.cpp
+++ b/plugins/AutoShutdown/src/frame.cpp
@@ -180,38 +180,36 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA
NULL);
if(dat->hwndTime==NULL) return -1; /* creation failed, calls WM_DESTROY */
/* create tooltips */
- if(IsWinVer98Plus() || IsWinVer2000Plus()) {
- TTTOOLINFO ti;
- dat->hwndToolTip=CreateWindowEx(WS_EX_TOPMOST,
- TOOLTIPS_CLASS,
- NULL,
- WS_POPUP|TTS_ALWAYSTIP|TTS_NOPREFIX,
- CW_USEDEFAULT, CW_USEDEFAULT,
- CW_USEDEFAULT, CW_USEDEFAULT,
- hwndFrame,
- NULL,
- params->hInstance,
- NULL);
- if(dat->hwndToolTip!=NULL) {
- SetWindowPos(dat->hwndToolTip,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
- ZeroMemory(&ti,sizeof(ti));
- ti.cbSize=sizeof(ti);
- ti.hwnd=hwndFrame;
- ti.uFlags=TTF_IDISHWND|TTF_SUBCLASS|TTF_TRANSPARENT;
- ti.lpszText=LPSTR_TEXTCALLBACK; /* commctl 4.70+ */
- ti.uId=(UINT)dat->hwndTime; /* in-place tooltip */
+ TTTOOLINFO ti;
+ dat->hwndToolTip=CreateWindowEx(WS_EX_TOPMOST,
+ TOOLTIPS_CLASS,
+ NULL,
+ WS_POPUP|TTS_ALWAYSTIP|TTS_NOPREFIX,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ hwndFrame,
+ NULL,
+ params->hInstance,
+ NULL);
+ if(dat->hwndToolTip!=NULL) {
+ SetWindowPos(dat->hwndToolTip,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
+ ZeroMemory(&ti,sizeof(ti));
+ ti.cbSize=sizeof(ti);
+ ti.hwnd=hwndFrame;
+ ti.uFlags=TTF_IDISHWND|TTF_SUBCLASS|TTF_TRANSPARENT;
+ ti.lpszText=LPSTR_TEXTCALLBACK; /* commctl 4.70+ */
+ ti.uId=(UINT)dat->hwndTime; /* in-place tooltip */
+ SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
+ ti.uFlags&=~TTF_TRANSPARENT;
+ ti.uId=(UINT)dat->hwndProgress;
+ SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
+ if(dat->hwndDesc!=NULL) {
+ ti.uId=(UINT)dat->hwndDesc;
SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- ti.uFlags&=~TTF_TRANSPARENT;
- ti.uId=(UINT)dat->hwndProgress;
+ }
+ if(dat->hwndIcon!=NULL) {
+ ti.uId=(UINT)dat->hwndIcon;
SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- if(dat->hwndDesc!=NULL) {
- ti.uId=(UINT)dat->hwndDesc;
- SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- }
- if(dat->hwndIcon!=NULL) {
- ti.uId=(UINT)dat->hwndIcon;
- SendMessage(dat->hwndToolTip,TTM_ADDTOOL,0,(LPARAM)&ti);
- }
}
}
/* init layout */
@@ -471,7 +469,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA
if(((NMHDR*)lParam)->hwndFrom==dat->hwndToolTip)
switch(((NMHDR*)lParam)->code) {
case TTN_SHOW: /* 'in-place' tooltip on dat->hwndTime */
- if(dat->flags&FWPDF_TIMEISCLIPPED && (HWND)wParam==dat->hwndTime && IsWinVer2000Plus()) {
+ if(dat->flags&FWPDF_TIMEISCLIPPED && (HWND)wParam==dat->hwndTime) {
RECT rc;
if(GetWindowRect(dat->hwndTime,&rc)) {
SetWindowLongPtr(dat->hwndToolTip, GWL_STYLE, GetWindowLongPtr(dat->hwndToolTip, GWL_STYLE) | TTS_NOANIMATE);
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp
index d22ed2e2f3..4228b56b32 100644
--- a/plugins/AutoShutdown/src/shutdownsvc.cpp
+++ b/plugins/AutoShutdown/src/shutdownsvc.cpp
@@ -94,7 +94,7 @@ static BOOL IsShutdownTypeEnabled(BYTE shutdownType)
}
}
/* test privilege */
- if(bReturn && IsWinVerNT()) {
+ if(bReturn) {
bReturn=WinNT_SetPrivilege(SE_SHUTDOWN_NAME,TRUE);
if(bReturn) WinNT_SetPrivilege(SE_SHUTDOWN_NAME,FALSE);
}
@@ -127,7 +127,7 @@ static BOOL IsShutdownTypeEnabled(BYTE shutdownType)
RegCloseKey(hKey);
}
}
- else if(IsWinVerNT()) /* for WinNT4 */
+ else
bReturn=SearchPath(NULL,_T("LOGIN.SCR"),NULL,0,NULL,NULL)!=0;
}
break;
@@ -142,11 +142,9 @@ static BOOL IsShutdownTypeEnabled(BYTE shutdownType)
case SDSDT_REBOOT:
case SDSDT_SHUTDOWN:
/* test privileges */
- if(IsWinVerNT()) {
- bReturn=WinNT_SetPrivilege(SE_SHUTDOWN_NAME,TRUE);
- if(bReturn) WinNT_SetPrivilege(SE_SHUTDOWN_NAME,FALSE);
- }
- else bReturn=TRUE;
+ bReturn=WinNT_SetPrivilege(SE_SHUTDOWN_NAME,TRUE);
+ if(bReturn)
+ WinNT_SetPrivilege(SE_SHUTDOWN_NAME,FALSE);
break;
}
return bReturn;
@@ -192,7 +190,7 @@ static DWORD ShutdownNow(BYTE shutdownType)
if(pfnLockWorkStation!=NULL) /* Win2000+ */
if(!pfnLockWorkStation() && !WinNT_IsWorkStationLocked())
dwErrCode=GetLastError();
- else if(IsWinVerNT()) { /* WinNT4 */
+ else {
HKEY hKey;
/* start LOGON.SCR screensaver (locks workstation on NT4) */
if(!SearchPath(NULL,_T("LOGIN.SCR"),NULL,0,NULL,NULL)) {
@@ -332,7 +330,7 @@ static DWORD ShutdownNow(BYTE shutdownType)
case SDSDT_REBOOT: flags=EWX_REBOOT; break;
default: flags=EWX_SHUTDOWN|EWX_POWEROFF;
}
- if(shutdownType==SDSDT_LOGOFF && IsWinVer2000Plus() && !WinNT_IsWorkStationLocked())
+ if(shutdownType==SDSDT_LOGOFF && !WinNT_IsWorkStationLocked())
flags|=EWX_FORCEIFHUNG; /* only considered for WM_ENDSESSION messages */
else flags|=EWX_FORCE; /* must be used when workstation locked */
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index dd417c6160..51706b9bf1 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -345,7 +345,7 @@ void CSWindow::initIcons()
return;
m_statusCount = (int)iNumStatuses;
- if (NULL == (m_icons = ImageList_Create(16, 16, IsWinVerXPPlus() ? ILC_COLOR32 | ILC_MASK : ILC_COLOR16 | ILC_MASK, m_statusCount, 0)))
+ if (NULL == (m_icons = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, m_statusCount, 0)))
return;
for (int i=1; i <= m_statusCount; i++) {
diff --git a/plugins/Clist_blind/src/cluiopts.cpp b/plugins/Clist_blind/src/cluiopts.cpp
index 0a55e9f298..afc07d3802 100644
--- a/plugins/Clist_blind/src/cluiopts.cpp
+++ b/plugins/Clist_blind/src/cluiopts.cpp
@@ -79,14 +79,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
else SetDlgItemTextA(hwndDlg, IDC_TITLETEXT, MIRANDANAME);
}
- if (!IsWinVer2000Plus()) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_FADEINOUT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DROPSHADOW), FALSE);
- }
- else
- CheckDlgButton(hwndDlg, IDC_TRANSPARENT,
- db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
if (!IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), FALSE);
diff --git a/plugins/Clist_modern/src/hdr/modern_defsettings.h b/plugins/Clist_modern/src/hdr/modern_defsettings.h
index ca03dcdd6f..7bae7516e8 100644
--- a/plugins/Clist_modern/src/hdr/modern_defsettings.h
+++ b/plugins/Clist_modern/src/hdr/modern_defsettings.h
@@ -223,7 +223,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SETTING_BLENDINACTIVESTATE_DEFAULT 0 //"CLC","BlendInActiveState"
#define CLCDEFAULT_MODERN_SELTEXTCOLOUR (g_CluiData.fDisableSkinEngine?GetSysColor(COLOR_HIGHLIGHTTEXT):RGB(0,0,128))
-#define CLCDEFAULT_MODERN_HOTTEXTCOLOUR (g_CluiData.fDisableSkinEngine?(IsWinVer98Plus()?CLCDEFAULT_MODERN_SELTEXTCOLOUR:GetSysColor(COLOR_HOTLIGHT)):RGB(0,0,255))
+#define CLCDEFAULT_MODERN_HOTTEXTCOLOUR (g_CluiData.fDisableSkinEngine ? CLCDEFAULT_MODERN_SELTEXTCOLOUR : RGB(0,0,255))
#define CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR RGB(255,255,0)
#define CLCDEFAULT_NOVSCROLL 0 //"CLC","NoVScrollBar"
#define CLCDEFAULT_INFOTIPTIME 750 //"! "CLC","InfoTipHoverTime"
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 92184f0c75..451594269f 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -1239,12 +1239,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
dbv.pszVal = NULL;
}
}
- if ( !IsWinVer2000Plus()) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),FALSE);
- }
- else CheckDlgButton(hwndDlg,IDC_TRANSPARENT,db_get_b(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
if ( !IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
@@ -1394,7 +1389,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
}
AniAva_UpdateParent();
db_set_b(NULL,"CLUI","FadeInOut",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT));
- g_CluiData.fSmoothAnimation = IsWinVer2000Plus() && (BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT);
+ g_CluiData.fSmoothAnimation = (BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT);
{
int i1 = SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_GETPOS, 0, 0);
int i2 = SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_GETPOS, 0, 0);
@@ -1884,12 +1879,6 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE, 0, MAKELONG(900, 1));
SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0));
- if ( !IsWinVer2000Plus()) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),FALSE);
- }
-
if ( !IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index ba54fa857b..24b5588c44 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -338,7 +338,7 @@ HRESULT CLUI::LoadDllsRuntime()
g_proc_SetLayeredWindowAttributesNew = (BOOL (WINAPI *)(HWND,COLORREF,BYTE,DWORD))GetProcAddress(m_hUserDll, "SetLayeredWindowAttributes");
g_CluiData.fLayered = (g_proc_UpdateLayeredWindow != NULL) && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
- g_CluiData.fSmoothAnimation = IsWinVer2000Plus() && db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
+ g_CluiData.fSmoothAnimation = db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
g_CluiData.fLayered = (g_CluiData.fLayered*db_get_b(NULL, "ModernData", "EnableLayering", g_CluiData.fLayered)) && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
}
@@ -604,31 +604,29 @@ static BOOL CLUI_WaitThreadsCompletion(HWND hwnd)
void CLUI_UpdateLayeredMode()
{
g_CluiData.fDisableSkinEngine = db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
- if ( IsWinVer2000Plus()) {
- BOOL tLayeredFlag = TRUE;
- tLayeredFlag &= ( db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag) && !g_CluiData.fDisableSkinEngine);
-
- if (g_CluiData.fLayered != tLayeredFlag) {
- BOOL fWasVisible = IsWindowVisible(pcli->hwndContactList);
- if (fWasVisible)
- ShowWindow(pcli->hwndContactList,SW_HIDE);
-
- //change layered mode
- LONG exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
- if (tLayeredFlag)
- exStyle |= WS_EX_LAYERED;
- else
- exStyle &= ~WS_EX_LAYERED;
-
- SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
- SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
- g_CluiData.fLayered = tLayeredFlag;
- Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
- CLUI_ChangeWindowMode();
- Sync(CLUIFrames_OnClistResize_mod, 0, 0 );
- if (fWasVisible)
- ShowWindow(pcli->hwndContactList,SW_SHOW);
- }
+ BOOL tLayeredFlag = TRUE;
+ tLayeredFlag &= ( db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag) && !g_CluiData.fDisableSkinEngine);
+
+ if (g_CluiData.fLayered != tLayeredFlag) {
+ BOOL fWasVisible = IsWindowVisible(pcli->hwndContactList);
+ if (fWasVisible)
+ ShowWindow(pcli->hwndContactList,SW_HIDE);
+
+ //change layered mode
+ LONG exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
+ if (tLayeredFlag)
+ exStyle |= WS_EX_LAYERED;
+ else
+ exStyle &= ~WS_EX_LAYERED;
+
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
+ g_CluiData.fLayered = tLayeredFlag;
+ Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
+ CLUI_ChangeWindowMode();
+ Sync(CLUIFrames_OnClistResize_mod, 0, 0 );
+ if (fWasVisible)
+ ShowWindow(pcli->hwndContactList,SW_SHOW);
}
}
@@ -669,8 +667,8 @@ void CLUI_ChangeWindowMode()
if ( !pcli->hwndContactList) return;
g_mutex_bChangingMode = TRUE;
- g_bTransparentFlag = IsWinVer2000Plus() && db_get_b( NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT);
- g_CluiData.fSmoothAnimation = IsWinVer2000Plus() && db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
+ g_bTransparentFlag = db_get_b( NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT);
+ g_CluiData.fSmoothAnimation = db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
if (g_bTransparentFlag == 0 && g_CluiData.bCurrentAlpha != 0)
g_CluiData.bCurrentAlpha = 255;
//2- Calculate STYLES and STYLESEX
@@ -1333,7 +1331,7 @@ int CLUI_IconsChanged(WPARAM wParam,LPARAM lParam)
void CLUI_cli_LoadCluiGlobalOpts()
{
- BOOL tLayeredFlag = IsWinVer2000Plus();
+ BOOL tLayeredFlag = TRUE;
tLayeredFlag &= db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag);
if (tLayeredFlag) {
if ( db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 1)
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
index 23a53c5ae8..577218a782 100644
--- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp
@@ -2857,7 +2857,7 @@ int LoadCLUIFramesModule(void)
//container helper
WNDCLASS cntclass;
- cntclass.style = CS_DBLCLKS|CS_HREDRAW|CS_VREDRAW|( IsWinVerXPPlus() ? CS_DROPSHADOW : 0);
+ cntclass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_DROPSHADOW;
cntclass.lpfnWndProc = CLUIFrameContainerWndProc;
cntclass.cbClsExtra = 0;
cntclass.cbWndExtra = 0;
diff --git a/plugins/Clist_mw/src/cluiopts.cpp b/plugins/Clist_mw/src/cluiopts.cpp
index 5b8b277b11..f3685f5c67 100644
--- a/plugins/Clist_mw/src/cluiopts.cpp
+++ b/plugins/Clist_mw/src/cluiopts.cpp
@@ -131,12 +131,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
dbv.pszVal = NULL;
}
}
- if ( !IsWinVer2000Plus()) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),FALSE);
- }
- else CheckDlgButton(hwndDlg,IDC_TRANSPARENT,db_get_b(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
if ( !IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index e813455b89..c2203a4417 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -1278,7 +1278,7 @@ skipbg:
return DefWindowProc(hwnd, msg, wParam, lParam);
if (noRecurse)
return DefWindowProc(hwnd, msg, wParam, lParam);
- if ( !cfg::dat.fadeinout || !IsWinVer2000Plus())
+ if ( !cfg::dat.fadeinout)
return DefWindowProc(hwnd, msg, wParam, lParam);
g_fading_active = 1;
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp
index a28d44223a..a92d72febc 100644
--- a/plugins/DbChecker/src/selectdb.cpp
+++ b/plugins/DbChecker/src/selectdb.cpp
@@ -168,8 +168,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
case WM_INITDIALOG:
TranslateDialogDefault(hdlg);
{
- HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
- (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 3, 3);
+ HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 3, 3);
ImageList_AddIcon(hIml, LoadIcon(hInst, MAKEINTRESOURCE(IDI_PROFILEGREEN)));
ImageList_AddIcon(hIml, LoadIcon(hInst, MAKEINTRESOURCE(IDI_PROFILEYELLOW)));
ImageList_AddIcon(hIml, LoadIcon(hInst, MAKEINTRESOURCE(IDI_PROFILERED)));
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp
index 64b2534f94..9a8facfbd8 100644
--- a/plugins/DbEditorPP/src/main_window.cpp
+++ b/plugins/DbEditorPP/src/main_window.cpp
@@ -241,7 +241,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
// image list
int numberOfIcons = 0;
- himl = ImageList_Create(16, 16, IsWinVerXPPlus() ? ILC_COLOR32 | ILC_MASK : ILC_COLOR8 | ILC_MASK, 10, 0);
+ himl = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 10, 0);
if (himl != NULL) {
if (AddIconToList(himl, LoadSkinnedDBEIcon(ICO_SETTINGS)))
numberOfIcons++;
@@ -271,7 +271,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
himl2 = NULL;
numberOfIcons = 0;
- if (himl2 = ImageList_Create(16, 16, IsWinVerXPPlus() ? ILC_COLOR32 | ILC_MASK : ILC_COLOR8 | ILC_MASK, 5, 0)) {
+ if (himl2 = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 5, 0)) {
if (AddIconToList(himl2, LoadIcon(hInst, MAKEINTRESOURCE(ICO_BINARY))))
numberOfIcons++;
if (AddIconToList(himl2, LoadIcon(hInst, MAKEINTRESOURCE(ICO_BYTE))))
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index aa5d0ff87a..69774bd4b7 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -728,7 +728,7 @@ void SettingsListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
LVHITTESTINFO hti;
hti.pt=((NMLISTVIEW*)lParam)->ptAction;
- if (db_get_b(NULL,modname,"DontAllowInLineEdit",0) || !IsWinVer2000Plus()) /* fix for TioDuke and win98 */
+ if (db_get_b(NULL,modname,"DontAllowInLineEdit",0))
break;
if (info && ListView_SubItemHitTest(GetDlgItem(hwnd,IDC_SETTINGS),&hti) >-1)
{
@@ -772,7 +772,7 @@ void SettingsListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
hti.pt=((NMLISTVIEW*)lParam)->ptAction;
if (info && ListView_SubItemHitTest(GetDlgItem(hwnd,IDC_SETTINGS),&hti) >-1)
{
- if ((hti.iSubItem > 1 || hti.flags == LVHT_ONITEMICON) || (db_get_b(NULL,modname,"DontAllowInLineEdit",0) || !IsWinVer2000Plus()/* fix for TioDuke and win98 */ ))
+ if ((hti.iSubItem > 1 || hti.flags == LVHT_ONITEMICON) || (db_get_b(NULL,modname,"DontAllowInLineEdit",0)))
{
char setting[256];
SendMessage(info->hwnd2Edit,WM_COMMAND,MAKEWPARAM(IDOK,0),0);
diff --git a/plugins/Dbx_mmap_SA/src/dialogs.cpp b/plugins/Dbx_mmap_SA/src/dialogs.cpp
index 4af9f177ac..5ca3197958 100644
--- a/plugins/Dbx_mmap_SA/src/dialogs.cpp
+++ b/plugins/Dbx_mmap_SA/src/dialogs.cpp
@@ -128,7 +128,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
p_Db = (CDbxMmapSA*)lParam;
{
- HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 2, 0);
+ HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 2, 0);
ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_OTHER_LOADED));
ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_OTHER_NOTLOADED));
ListView_SetImageList( hwndList, hIml, LVSIL_SMALL );
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 0d103be59e..04bd1a5f07 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -542,127 +542,122 @@ HICON __fastcall CreateJoinedIcon(HICON hBottom, HICON hTop)
nImage = CreateBitmap32Point(16, 16, (LPVOID*)&ptPixels);
oImage = (HBITMAP)SelectObject(tempDC, nImage);
-// if (ptPixels) memset(ptPixels, 0, 16 * 16 * 4);
+ ICONINFO iciBottom = { 0 };
+ ICONINFO iciTop = { 0 };
- if (IsWinVerXPPlus())
- {
- ICONINFO iciBottom = { 0 };
- ICONINFO iciTop = { 0 };
-
- BITMAP bmp_top = { 0 };
- BITMAP bmp_top_mask = { 0 };
+ BITMAP bmp_top = { 0 };
+ BITMAP bmp_top_mask = { 0 };
- BITMAP bmp_bottom = { 0 };
- BITMAP bmp_bottom_mask = { 0 };
+ BITMAP bmp_bottom = { 0 };
+ BITMAP bmp_bottom_mask = { 0 };
- GetIconInfo(hBottom, &iciBottom);
- GetObject(iciBottom.hbmColor, sizeof(BITMAP), &bmp_bottom);
- GetObject(iciBottom.hbmMask, sizeof(BITMAP), &bmp_bottom_mask);
+ GetIconInfo(hBottom, &iciBottom);
+ GetObject(iciBottom.hbmColor, sizeof(BITMAP), &bmp_bottom);
+ GetObject(iciBottom.hbmMask, sizeof(BITMAP), &bmp_bottom_mask);
- GetIconInfo(hTop, &iciTop);
- GetObject(iciTop.hbmColor, sizeof(BITMAP), &bmp_top);
- GetObject(iciTop.hbmMask, sizeof(BITMAP), &bmp_top_mask);
+ GetIconInfo(hTop, &iciTop);
+ GetObject(iciTop.hbmColor, sizeof(BITMAP), &bmp_top);
+ GetObject(iciTop.hbmMask, sizeof(BITMAP), &bmp_top_mask);
- if (bmp_bottom.bmBitsPixel == 32 && bmp_top.bmBitsPixel == 32)
+ if (bmp_bottom.bmBitsPixel == 32 && bmp_top.bmBitsPixel == 32)
+ {
+ LPBYTE BottomBuffer, TopBuffer, BottomMaskBuffer, TopMaskBuffer;
+ LPBYTE bb, tb, bmb, tmb;
+ LPBYTE db = ptPixels;
+ int vstep_d = 16 * 4;
+ int vstep_b = bmp_bottom.bmWidthBytes;
+ int vstep_t = bmp_top.bmWidthBytes;
+ int vstep_bm = bmp_bottom_mask.bmWidthBytes;
+ int vstep_tm = bmp_top_mask.bmWidthBytes;
+
+ if (bmp_bottom.bmBits)
+ bb = BottomBuffer = (LPBYTE)bmp_bottom.bmBits;
+ else
{
- LPBYTE BottomBuffer, TopBuffer, BottomMaskBuffer, TopMaskBuffer;
- LPBYTE bb, tb, bmb, tmb;
- LPBYTE db = ptPixels;
- int vstep_d = 16 * 4;
- int vstep_b = bmp_bottom.bmWidthBytes;
- int vstep_t = bmp_top.bmWidthBytes;
- int vstep_bm = bmp_bottom_mask.bmWidthBytes;
- int vstep_tm = bmp_top_mask.bmWidthBytes;
-
- if (bmp_bottom.bmBits)
- bb = BottomBuffer = (LPBYTE)bmp_bottom.bmBits;
- else
- {
- BottomBuffer = (LPBYTE)_alloca(bmp_bottom.bmHeight * bmp_bottom.bmWidthBytes);
- GetBitmapBits(iciBottom.hbmColor, bmp_bottom.bmHeight * bmp_bottom.bmWidthBytes, BottomBuffer);
- bb = BottomBuffer + vstep_b * (bmp_bottom.bmHeight - 1);
- vstep_b = -vstep_b;
- }
- if (bmp_top.bmBits)
- tb = TopBuffer = (LPBYTE)bmp_top.bmBits;
- else
- {
- TopBuffer = (LPBYTE)_alloca(bmp_top.bmHeight * bmp_top.bmWidthBytes);
- GetBitmapBits(iciTop.hbmColor, bmp_top.bmHeight * bmp_top.bmWidthBytes, TopBuffer);
- tb = TopBuffer + vstep_t * (bmp_top.bmHeight - 1);
- vstep_t = -vstep_t;
- }
- if (bmp_bottom_mask.bmBits)
- bmb = BottomMaskBuffer = (LPBYTE)bmp_bottom_mask.bmBits;
- else
- {
- BottomMaskBuffer = (LPBYTE)_alloca(bmp_bottom_mask.bmHeight * bmp_bottom_mask.bmWidthBytes);
- GetBitmapBits(iciBottom.hbmMask, bmp_bottom_mask.bmHeight * bmp_bottom_mask.bmWidthBytes, BottomMaskBuffer);
- bmb = BottomMaskBuffer + vstep_bm * (bmp_bottom_mask.bmHeight - 1);
- vstep_bm = -vstep_bm;
- }
- if (bmp_top_mask.bmBits)
- tmb = TopMaskBuffer = (LPBYTE)bmp_top_mask.bmBits;
- else
- {
- TopMaskBuffer = (LPBYTE)_alloca(bmp_top_mask.bmHeight * bmp_top_mask.bmWidthBytes);
- GetBitmapBits(iciTop.hbmMask, bmp_top_mask.bmHeight * bmp_top_mask.bmWidthBytes, TopMaskBuffer);
- tmb = TopMaskBuffer + vstep_tm * (bmp_top_mask.bmHeight - 1);
- vstep_tm = -vstep_tm;
- }
- {
- int x; int y;
- BOOL topHasAlpha = checkHasAlfa(TopBuffer, bmp_top.bmWidth, bmp_top.bmHeight);
- BOOL bottomHasAlpha = checkHasAlfa(BottomBuffer, bmp_bottom.bmWidth, bmp_bottom.bmHeight);
- BOOL topMaskUsed = !topHasAlpha && checkMaskUsed(TopMaskBuffer);
- BOOL bottomMaskUsed = !bottomHasAlpha && checkMaskUsed(BottomMaskBuffer);
+ BottomBuffer = (LPBYTE)_alloca(bmp_bottom.bmHeight * bmp_bottom.bmWidthBytes);
+ GetBitmapBits(iciBottom.hbmColor, bmp_bottom.bmHeight * bmp_bottom.bmWidthBytes, BottomBuffer);
+ bb = BottomBuffer + vstep_b * (bmp_bottom.bmHeight - 1);
+ vstep_b = -vstep_b;
+ }
+ if (bmp_top.bmBits)
+ tb = TopBuffer = (LPBYTE)bmp_top.bmBits;
+ else
+ {
+ TopBuffer = (LPBYTE)_alloca(bmp_top.bmHeight * bmp_top.bmWidthBytes);
+ GetBitmapBits(iciTop.hbmColor, bmp_top.bmHeight * bmp_top.bmWidthBytes, TopBuffer);
+ tb = TopBuffer + vstep_t * (bmp_top.bmHeight - 1);
+ vstep_t = -vstep_t;
+ }
+ if (bmp_bottom_mask.bmBits)
+ bmb = BottomMaskBuffer = (LPBYTE)bmp_bottom_mask.bmBits;
+ else
+ {
+ BottomMaskBuffer = (LPBYTE)_alloca(bmp_bottom_mask.bmHeight * bmp_bottom_mask.bmWidthBytes);
+ GetBitmapBits(iciBottom.hbmMask, bmp_bottom_mask.bmHeight * bmp_bottom_mask.bmWidthBytes, BottomMaskBuffer);
+ bmb = BottomMaskBuffer + vstep_bm * (bmp_bottom_mask.bmHeight - 1);
+ vstep_bm = -vstep_bm;
+ }
+ if (bmp_top_mask.bmBits)
+ tmb = TopMaskBuffer = (LPBYTE)bmp_top_mask.bmBits;
+ else
+ {
+ TopMaskBuffer = (LPBYTE)_alloca(bmp_top_mask.bmHeight * bmp_top_mask.bmWidthBytes);
+ GetBitmapBits(iciTop.hbmMask, bmp_top_mask.bmHeight * bmp_top_mask.bmWidthBytes, TopMaskBuffer);
+ tmb = TopMaskBuffer + vstep_tm * (bmp_top_mask.bmHeight - 1);
+ vstep_tm = -vstep_tm;
+ }
+ {
+ int x; int y;
+ BOOL topHasAlpha = checkHasAlfa(TopBuffer, bmp_top.bmWidth, bmp_top.bmHeight);
+ BOOL bottomHasAlpha = checkHasAlfa(BottomBuffer, bmp_bottom.bmWidth, bmp_bottom.bmHeight);
+ BOOL topMaskUsed = !topHasAlpha && checkMaskUsed(TopMaskBuffer);
+ BOOL bottomMaskUsed = !bottomHasAlpha && checkMaskUsed(BottomMaskBuffer);
- for(y = 0; y < 16; y++)
+ for(y = 0; y < 16; y++)
+ {
+ for(x = 0; x < 16; x++)
{
- for(x = 0; x < 16; x++)
+ DWORD bottom_d = ((LPDWORD)bb)[x];
+ DWORD top_d = ((LPDWORD)tb)[x];
+
+ if (topMaskUsed)
{
- DWORD bottom_d = ((LPDWORD)bb)[x];
- DWORD top_d = ((LPDWORD)tb)[x];
-
- if (topMaskUsed)
- {
- if (GetMaskBit(tmb, x))
- top_d &= 0x00FFFFFF;
- else
- top_d |= 0xFF000000;
- }
- else if (!topHasAlpha)
+ if (GetMaskBit(tmb, x))
+ top_d &= 0x00FFFFFF;
+ else
top_d |= 0xFF000000;
+ }
+ else if (!topHasAlpha)
+ top_d |= 0xFF000000;
- if (bottomMaskUsed)
- {
- if (GetMaskBit(bmb, x))
- bottom_d &= 0x00FFFFFF;
- else
- bottom_d |= 0xFF000000;
- }
- else if (!bottomHasAlpha)
+ if (bottomMaskUsed)
+ {
+ if (GetMaskBit(bmb, x))
+ bottom_d &= 0x00FFFFFF;
+ else
bottom_d |= 0xFF000000;
-
- ((LPDWORD)db)[x] = blend(bottom_d, top_d);
}
- bb += vstep_b;
- tb += vstep_t;
- bmb += vstep_bm;
- tmb += vstep_tm;
- db += vstep_d;
+ else if (!bottomHasAlpha)
+ bottom_d |= 0xFF000000;
+
+ ((LPDWORD)db)[x] = blend(bottom_d, top_d);
}
+ bb += vstep_b;
+ tb += vstep_t;
+ bmb += vstep_bm;
+ tmb += vstep_tm;
+ db += vstep_d;
}
-
- drawn = TRUE;
}
- DeleteObject(iciBottom.hbmColor);
- DeleteObject(iciTop.hbmColor);
- DeleteObject(iciBottom.hbmMask);
- DeleteObject(iciTop.hbmMask);
+ drawn = TRUE;
}
+ DeleteObject(iciBottom.hbmColor);
+ DeleteObject(iciTop.hbmColor);
+ DeleteObject(iciBottom.hbmMask);
+ DeleteObject(iciTop.hbmMask);
+
if (!drawn) {
DrawIconEx(tempDC, 0, 0, hBottom, 16, 16, 0, NULL, DI_NORMAL);
DrawIconEx(tempDC, 0, 0, hTop, 16, 16, 0, NULL, DI_NORMAL);
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp
index d2b2a329f7..f7e6b3e200 100644
--- a/plugins/HistorySweeperLight/src/options.cpp
+++ b/plugins/HistorySweeperLight/src/options.cpp
@@ -214,8 +214,7 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
{
case WM_INITDIALOG:
{
- HIMAGELIST hIml = ImageList_Create( GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
- ILC_MASK | (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16 ), 2, 2 );
+ HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 2, 2);
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT);
ImageList_AddIcon(hIml, hIcon);
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp
index 1ee279c4df..0f82e52e50 100644
--- a/plugins/ModernOpt/src/modernopt.cpp
+++ b/plugins/ModernOpt/src/modernopt.cpp
@@ -175,7 +175,7 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
dat->hfntBold = CreateFontIndirect(&lf);
hwndCtrl = GetDlgItem(hwndDlg, IDC_TV_SUBSECTIONS);
- HIMAGELIST himl = ImageList_Create(16, 16, ILC_MASK + ( IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16 ), 2, 1);
+ HIMAGELIST himl = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 2, 1);
TreeView_SetImageList(hwndCtrl, himl, TVSIL_NORMAL);
for (i = 0; i < dat->pObjectList.getCount(); ++i) {
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index 666548fd73..3d111368da 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -1429,11 +1429,7 @@ void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto
MENUITEMINFO mii = {0};
mii.cbSize = sizeof(mii);
-
- if (!IsWinVer98Plus())
- mii.fMask = MIIM_TYPE;
- else
- mii.fMask = MIIM_STRING;
+ mii.fMask = MIIM_STRING;
GetMenuItemInfo(menu, i, TRUE, &mii);
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp
index 9d4a2d1675..d8e747d6e1 100644
--- a/plugins/NewXstatusNotify/src/indsnd.cpp
+++ b/plugins/NewXstatusNotify/src/indsnd.cpp
@@ -93,7 +93,7 @@ HIMAGELIST GetStatusIconsImgList(char *szProto)
HIMAGELIST hList = NULL;
if (szProto)
{
- hList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16 | ILC_MASK, STATUS_COUNT, 0);
+ hList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, STATUS_COUNT, 0);
if (hList != NULL)
{
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++)
@@ -489,7 +489,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
{
TranslateDialogDefault(hwndDlg);
- HIMAGELIST hImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16 | ILC_MASK, 3, 3);
+ HIMAGELIST hImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 3, 3);
ImageList_AddIcon(hImageList, LoadIcon(hInst,MAKEINTRESOURCE(IDI_SOUND)));
SendDlgItemMessage(hwndDlg,IDC_SOUNDICON,STM_SETICON, (WPARAM)ImageList_GetIcon(hImageList, EXTRA_IMAGE_SOUND, ILD_NORMAL), 0);
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index 8dae1fe190..ea790bd978 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -108,7 +108,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
TranslateDialogDefault( hwndDlg );
hwndList = GetDlgItem(hwndDlg, IDC_LIST);
{
- HIMAGELIST hIml = ImageList_Create( GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), (IsWinVerXPPlus()?ILC_COLOR32:ILC_COLOR16)|ILC_MASK, 2, 2);
+ HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
ImageList_AddIcon(hIml, hIconKeep);
ImageList_AddIcon(hIml, hIconRemove);
SendMessage(hwndList, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml);
diff --git a/plugins/NotesAndReminders/src/globals.h b/plugins/NotesAndReminders/src/globals.h
index 35a7188126..e440c95870 100644
--- a/plugins/NotesAndReminders/src/globals.h
+++ b/plugins/NotesAndReminders/src/globals.h
@@ -121,8 +121,6 @@ extern int g_Transparency;
extern char *g_RemindSMS;
-extern BOOL g_isWin2kPlus;
-
extern TCHAR *g_lpszAltBrowser;
extern int g_reminderListGeom[4];
diff --git a/plugins/NotesAndReminders/src/hotkeys.cpp b/plugins/NotesAndReminders/src/hotkeys.cpp
index a71ecf9399..fb5fb678c5 100644
--- a/plugins/NotesAndReminders/src/hotkeys.cpp
+++ b/plugins/NotesAndReminders/src/hotkeys.cpp
@@ -121,14 +121,10 @@ void CreateMsgWindow(void)
RegisterClassEx(&TWC);
}
- if ( IsWinVer2000Plus() )
- {
- // win2k+ has special message-only windows support
- hParent = HWND_MESSAGE;
- }
+ hParent = HWND_MESSAGE;
- HKHwnd = CreateWindowEx(WS_EX_TOOLWINDOW, MSG_WND_CLASS, _T("StickyNotes"), 0, 0, 0, 0, 0, hParent, NULL, hmiranda, NULL);
- SetTimer(HKHwnd, 1026, REMINDER_UPDATE_INTERVAL, 0);
+ HKHwnd = CreateWindowEx(WS_EX_TOOLWINDOW, MSG_WND_CLASS, _T("StickyNotes"), 0, 0, 0, 0, 0, hParent, NULL, hmiranda, NULL);
+ SetTimer(HKHwnd, 1026, REMINDER_UPDATE_INTERVAL, 0);
}
void DestroyMsgWindow(void)
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 386cc792fb..660b0a41d2 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -311,8 +311,6 @@ extern "C" __declspec(dllexport) int Load(void)
ctrls.dwICC = ICC_DATE_CLASSES;
InitCommonControlsEx(&ctrls);
- g_isWin2kPlus = IsWinVer2000Plus();
-
hRichedDll = LoadLibrary(_T("RICHED20.DLL"));
if (!hRichedDll) {
if (MessageBox(0, TranslateT("Miranda could not load the Note & Reminders plugin, RICHED20.DLL is missing. If you are using Windows 95 or WINE please make sure you have riched20.dll installed. Press 'Yes' to continue loading Miranda."), _T(SECTIONNAME), MB_YESNO | MB_ICONINFORMATION) != IDYES)
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp
index 9907655063..5c19457227 100644
--- a/plugins/NotesAndReminders/src/notes.cpp
+++ b/plugins/NotesAndReminders/src/notes.cpp
@@ -1018,22 +1018,17 @@ static BOOL DoContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam)
// NOTE: names used for FindMenuItem would need to include & chars if such shortcuts are added to the menus
- // color preset menu items uses features that require win2k or later, I'm too lazy to make a fallback path
- // for obsolete OS versions (win95/98/ME users can still use the "Custom" menu option)
- if (g_isWin2kPlus)
+ n = FindMenuItem(FhMenu, _T("Appearance"));
+ if (n >= 0 && (hSub = GetSubMenu(FhMenu, n)))
{
- n = FindMenuItem(FhMenu, _T("Appearance"));
- if (n >= 0 && (hSub = GetSubMenu(FhMenu, n)))
- {
- HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Background Color")));
- HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Text Color")));
+ HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Background Color")));
+ HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Text Color")));
- for (i=0; i<SIZEOF(clrPresets); i++)
- InsertMenu(hBg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_BG+i, TranslateTS(clrPresets[i].szName));
+ for (i=0; i<SIZEOF(clrPresets); i++)
+ InsertMenu(hBg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_BG+i, TranslateTS(clrPresets[i].szName));
- for (i=0; i<SIZEOF(clrPresets); i++)
- InsertMenu(hFg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_FG+i, TranslateTS(clrPresets[i].szName));
- }
+ for (i=0; i<SIZEOF(clrPresets); i++)
+ InsertMenu(hFg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_FG+i, TranslateTS(clrPresets[i].szName));
}
CallService(MS_LANGPACK_TRANSLATEMENU,(DWORD)FhMenu,0);
@@ -1274,17 +1269,9 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l
rect = wr;
OffsetRect(&rect, -wr.left, -wr.top);
- if (g_isWin2kPlus)
- {
- hBkBrush = (HBRUSH)GetStockObject(DC_BRUSH);
- SetDCBrushColor(hdc, GetCaptionColor((SN && SN->BgColor) ? SN->BgColor : BodyColor));
- }
- else
- {
- hBkBrush = (HBRUSH)CreateSolidBrush( GetCaptionColor((SN && SN->BgColor) ? SN->BgColor : BodyColor) );
- }
+ hBkBrush = (HBRUSH)GetStockObject(DC_BRUSH);
+ SetDCBrushColor(hdc, GetCaptionColor((SN && SN->BgColor) ? SN->BgColor : BodyColor));
- //FillRect(hdc, &rect, hBkBrush);
// draw all frame sides separately to avoid filling client area (which flickers)
{
// top
@@ -1302,7 +1289,6 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l
r.left = rect.right - 3; r.right = rect.right;
FillRect(hdc, &r, hBkBrush);
}
- if (hBkBrush && !g_isWin2kPlus) DeleteObject(hBkBrush);
// paint title bar contents (time stamp and buttons)
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp
index fefe500820..1cbb55f47b 100644
--- a/plugins/NotesAndReminders/src/options.cpp
+++ b/plugins/NotesAndReminders/src/options.cpp
@@ -18,7 +18,6 @@ int g_NoteTitleDate, g_NoteTitleTime;
int g_NoteWidth,g_NoteHeight;
int g_Transparency;
char *g_RemindSMS = NULL;
-BOOL g_isWin2kPlus = TRUE;
TCHAR *g_lpszAltBrowser = NULL;
@@ -479,13 +478,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar
ofn.nMaxFile = SIZEOF(s);
ofn.lpstrTitle = TranslateT("Select Executable");
ofn.lpstrInitialDir = _T(".");
- ofn.Flags = OFN_FILEMUSTEXIST|OFN_LONGNAMES;
- if ( IsWinVer98Plus() )
- {
- ofn.Flags |= OFN_ENABLESIZING;
- if (g_isWin2kPlus)
- ofn.Flags |= OFN_DONTADDTORECENT;
- }
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_ENABLESIZING | OFN_DONTADDTORECENT;
SendDlgItemMessage(hdlg,IDC_EDIT_ALTBROWSER,WM_GETTEXT,(WPARAM)ofn.nMaxFile,(LPARAM)s);
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index b5c018d517..badce66eef 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -609,7 +609,8 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
static int noRecurse=0;
if(lParam) break;
if(noRecurse) break;
- if(!db_get_b(NULL,"CLUI","FadeInOut",0) || !IsWinVer2000Plus()) break;
+ if(!db_get_b(NULL,"CLUI","FadeInOut",0))
+ break;
#ifdef WS_EX_LAYERED
if(GetWindowLong(hwnd,GWL_EXSTYLE)&WS_EX_LAYERED) {
DWORD thisTick,startTick;
diff --git a/plugins/Popup/res/resource.rc b/plugins/Popup/res/resource.rc
index 1291172eaa..38abb74c67 100644
--- a/plugins/Popup/res/resource.rc
+++ b/plugins/Popup/res/resource.rc
@@ -103,7 +103,6 @@ BEGIN
CONTROL "Miranda's window",IDC_MIRANDAWND,"Button",BS_AUTORADIOBUTTON,21,172,115,10
CONTROL "the active window",IDC_ACTIVEWND,"Button",BS_AUTORADIOBUTTON,21,183,115,10
GROUPBOX "Transparency",IDC_STATIC,151,3,146,56
- CONTROL "Enable Win 9x/Me transparency",IDC_TRANS_9X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,15,136,8
CONTROL "Use transparency",IDC_TRANS,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,157,15,136,8
RTEXT "opacity:",IDC_TRANS_TXT1,157,25,59,12,SS_CENTERIMAGE
CONTROL "",IDC_TRANS_SLIDER,"msctls_trackbar32",WS_TABSTOP,218,25,56,12
diff --git a/plugins/Popup/src/config.h b/plugins/Popup/src/config.h
index 673b1e086e..f6a0635b18 100644
--- a/plugins/Popup/src/config.h
+++ b/plugins/Popup/src/config.h
@@ -80,7 +80,6 @@ typedef struct tagPOPUPOPTIONS {
//Monitor
BYTE Monitor;
//Transparency
- BYTE Enable9xTransparency;
BYTE UseTransparency;
BYTE Alpha;
BYTE OpaqueOnHover;
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index 6df45bf210..47afc3933f 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -61,7 +61,6 @@ void LoadOption_AdvOpts()
PopupOptions.Monitor = db_get_b(NULL, MODULNAME, "Monitor", SETTING_MONITOR_DEFAULT);
//Transparency
- PopupOptions.Enable9xTransparency = db_get_b(NULL, MODULNAME, "EnableRegionTransparency", TRUE);
PopupOptions.UseTransparency = db_get_b(NULL, MODULNAME, "UseTransparency", TRUE);
PopupOptions.Alpha = db_get_b(NULL, MODULNAME, "Alpha", SETTING_ALPHA_DEFAULT);
PopupOptions.OpaqueOnHover = db_get_b(NULL, MODULNAME, "OpaqueOnHover", TRUE);
@@ -154,10 +153,6 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
}
//Group: Transparency
{
- //9x/ME
- CheckDlgButton(hwnd, IDC_TRANS_9X, PopupOptions.Enable9xTransparency);
- //EnableWindow(GetDlgItem(hwnd, IDC_TRANS_9X), !IsWinVer2000Plus());
- ShowWindow(GetDlgItem(hwnd, IDC_TRANS_9X), IsWinVer2000Plus() ? SW_HIDE : SW_SHOW);
//win2k+
CheckDlgButton(hwnd, IDC_TRANS, PopupOptions.UseTransparency);
SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETRANGE, FALSE, MAKELONG(1,255));
@@ -175,7 +170,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwnd, IDC_TRANS_PERCENT), how && PopupOptions.UseTransparency);
EnableWindow(GetDlgItem(hwnd, IDC_TRANS_OPAQUEONHOVER), how && PopupOptions.UseTransparency);
}
- ShowWindow(GetDlgItem(hwnd, IDC_TRANS), IsWinVer2000Plus() ? SW_SHOW : SW_HIDE);
+ ShowWindow(GetDlgItem(hwnd, IDC_TRANS), SW_SHOW);
}
//Group: Effects
{
@@ -296,11 +291,6 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
- case IDC_TRANS_9X:
- PopupOptions.Enable9xTransparency = !PopupOptions.Enable9xTransparency;
- SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
- break;
-
case IDC_TRANS:
PopupOptions.UseTransparency = !PopupOptions.UseTransparency;
{
@@ -515,7 +505,6 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
//Monitor
db_set_b(NULL, MODULNAME, "Monitor", PopupOptions.Monitor);
//Transparency
- db_set_b(NULL, MODULNAME, "EnableRegionTransparency", PopupOptions.Enable9xTransparency);
db_set_b(NULL, MODULNAME, "UseTransparency", PopupOptions.UseTransparency);
db_set_b(NULL, MODULNAME, "Alpha", PopupOptions.Alpha);
db_set_b(NULL, MODULNAME, "OpaqueOnHover", PopupOptions.OpaqueOnHover);
diff --git a/plugins/Popup/src/resource.h b/plugins/Popup/src/resource.h
index 9585f9e793..a2f81a2aec 100644
--- a/plugins/Popup/src/resource.h
+++ b/plugins/Popup/src/resource.h
@@ -66,7 +66,6 @@
#define IDC_AVT_SIZE_SLIDE 1057
#define IDC_AVT_SIZE 1058
#define IDC_AVT_REQUEST 1059
-#define IDC_TRANS_9X 1062
#define IDC_TRANS 1063
#define IDC_TRANS_TXT1 1064
#define IDC_TRANS_SLIDER 1065
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp
index 9fa19e2e40..a35c7c6a63 100644
--- a/plugins/SimpleStatusMsg/src/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/src/msgbox.cpp
@@ -57,7 +57,7 @@ MsgEditCtrl;
HIMAGELIST AddOtherIconsToImageList(struct MsgBoxData *data)
{
- HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 4, 0);
+ HIMAGELIST himlIcons = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 4, 0);
for (int i = 0; i < 5; ++i)
ImageList_AddIcon(himlIcons, data->icon[i]);
@@ -75,7 +75,7 @@ HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags)
for (i = 0; i < 9; ++i)
if (Proto_Status2Flag(ID_STATUS_ONLINE + i) & status_flags) num_icons++;
- HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, num_icons, 0);
+ HIMAGELIST himlIcons = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, num_icons, 0);
HICON hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_OFFLINE);
ImageList_AddIcon(himlIcons, hicon);
Skin_ReleaseIcon(hicon);
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp
index ded6acd23a..156974c7ed 100644
--- a/plugins/SplashScreen/src/options.cpp
+++ b/plugins/SplashScreen/src/options.cpp
@@ -48,67 +48,79 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
- if (!png2dibavail)
- {
+ if (!png2dibavail) {
ShowWindow(GetDlgItem(hwndDlg, IDC_PNG2DIBWARN), SW_SHOW);
EnableWindow(GetDlgItem(hwndDlg, IDC_ACTIVE), false);
EnableWindow(GetDlgItem(hwndDlg, IDC_RANDOM), false);
EnableWindow(GetDlgItem(hwndDlg, IDC_SPLASHPATH), false);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHOOSESPLASH), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWVERSION), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWTIME), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ST_SPIN), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FADEIN), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FISTEP), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FI_SPIN), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FADEOUT), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FOSTEP), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FO_SPIN), false);
+ } else {
+ ReadDbConfig();
+ TCHAR inBuf[80];
+ DBVARIANT dbv = {0};
+ db_get_ts(NULL, MODNAME, "Path", &dbv);
+ if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ {
+ _tcscpy_s(inBuf, _T("splash\\splash.png"));
+ db_free(&dbv);
+ }
+ else
+ _tcscpy_s(inBuf, dbv.ptszVal);
+ dbv.ptszVal = NULL;
+ SetWindowText(GetDlgItem(hwndDlg, IDC_SPLASHPATH),inBuf);
+ db_get_ts(NULL, MODNAME, "Sound", &dbv);
+ if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ {
+ _tcscpy_s(inBuf, _T("sounds\\startup.wav"));
+ db_free(&dbv);
+ }
+ else
+ _tcscpy_s(inBuf, dbv.ptszVal);
+ dbv.ptszVal = NULL;
+ SetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH),inBuf);
+
+ db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv);
+ if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ {
+ _tcscpy_s(inBuf, _T(""));
+ db_free(&dbv);
+ }
+ else
+ _tcscpy_s(inBuf, dbv.ptszVal);
+ dbv.ptszVal = NULL;
+ SetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), inBuf);
+ if (options.active)
+ CheckDlgButton(hwndDlg, IDC_ACTIVE, BST_CHECKED);
+ if (options.playsnd && !options.inheritGS)
+ CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_INDETERMINATE);
+ else if (options.playsnd)
+ CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_CHECKED);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_LOOPSOUND), false);
+ if (options.fadein)
+ CheckDlgButton(hwndDlg, IDC_FADEIN, BST_CHECKED);
+ if (options.fadeout)
+ CheckDlgButton(hwndDlg, IDC_FADEOUT, BST_CHECKED);
+ if (options.random)
+ CheckDlgButton(hwndDlg, IDC_RANDOM, BST_CHECKED);
+ if (options.showversion)
+ CheckDlgButton(hwndDlg, IDC_SHOWVERSION, BST_CHECKED);
+
+ SetWindowText(GetDlgItem(hwndDlg, IDC_SHOWTIME), _itot(options.showtime, inBuf, 10));
+ SetWindowText(GetDlgItem(hwndDlg, IDC_FISTEP), _itot(options.fisteps, inBuf, 10));
+ SetWindowText(GetDlgItem(hwndDlg, IDC_FOSTEP), _itot(options.fosteps, inBuf, 10));
+
+ SendDlgItemMessage(hwndDlg, IDC_SHOWTIME, EM_LIMITTEXT, 5, 0);
}
- ReadDbConfig();
- TCHAR inBuf[80];
- DBVARIANT dbv = {0};
- db_get_ts(NULL, MODNAME, "Path", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
- {
- _tcscpy_s(inBuf, _T("splash\\splash.png"));
- db_free(&dbv);
- }
- else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_SPLASHPATH),inBuf);
- db_get_ts(NULL, MODNAME, "Sound", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
- {
- _tcscpy_s(inBuf, _T("sounds\\startup.wav"));
- db_free(&dbv);
- }
- else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH),inBuf);
- db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
- {
- _tcscpy_s(inBuf, _T(""));
- db_free(&dbv);
- }
- else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), inBuf);
- if (options.active) CheckDlgButton(hwndDlg, IDC_ACTIVE, BST_CHECKED);
- if (options.playsnd && !options.inheritGS) CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_INDETERMINATE);
- else if (options.playsnd) CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_CHECKED);
- //if (options.loopsnd) CheckDlgButton(hwndDlg, IDC_LOOPSOUND, BST_CHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOOPSOUND), false);
- if (options.fadein) CheckDlgButton(hwndDlg, IDC_FADEIN, BST_CHECKED);
- if (options.fadeout) CheckDlgButton(hwndDlg, IDC_FADEOUT, BST_CHECKED);
- if (options.random) CheckDlgButton(hwndDlg, IDC_RANDOM, BST_CHECKED);
- if (options.showversion) CheckDlgButton(hwndDlg, IDC_SHOWVERSION, BST_CHECKED);
-
- SetWindowText(GetDlgItem(hwndDlg, IDC_SHOWTIME), _itot(options.showtime, inBuf, 10));
- SetWindowText(GetDlgItem(hwndDlg, IDC_FISTEP), _itot(options.fisteps, inBuf, 10));
- SetWindowText(GetDlgItem(hwndDlg, IDC_FOSTEP), _itot(options.fosteps, inBuf, 10));
-
- SendDlgItemMessage(hwndDlg, IDC_SHOWTIME, EM_LIMITTEXT, 5, 0);
- /*
- SendDlgItemMessage(hwndDlg, IDC_ST_SPIN, UDM_SETRANGE32, 0, 20000);
- SendDlgItemMessage(hwndDlg, IDC_FI_SPIN, UDM_SETRANGE32, 1, 7);
- SendDlgItemMessage(hwndDlg, IDC_FO_SPIN, UDM_SETRANGE32, 1, 7);
- */
return TRUE;
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
index e3fd4580bb..566e0c01d1 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp
@@ -587,7 +587,7 @@ int CSModuleLoaded(WPARAM wParam, LPARAM lParam)
openInputDesktop = ( pfnOpenInputDesktop )GetProcAddress (hUser32, "OpenInputDesktop");
closeDesktop = ( pfnCloseDesktop )GetProcAddress (hUser32, "CloseDesktop");
- if ( IsWinVer2000Plus() && !db_get_b(NULL, MODULENAME, SETTING_IGNLOCK, FALSE))
+ if (!db_get_b(NULL, MODULENAME, SETTING_IGNLOCK, FALSE))
MyGetLastInputInfo = (BOOL (WINAPI *)(PLASTINPUTINFO))GetProcAddress(GetModuleHandleA("user32"),"GetLastInputInfo");
else
MyGetLastInputInfo = NULL;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index fd9c2a39d6..690267dab6 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -180,14 +180,9 @@ static void SaveAvatarToFile(TWindowData *dat, HBITMAP hbm, int isOwnPic)
TCHAR filter[MAX_PATH];
mir_sntprintf(filter, SIZEOF(filter), _T("%s%c*.bmp;*.png;*.jpg;*.gif%c%c"), TranslateT("Image files"), 0, 0, 0);
ofn.lpstrFilter = filter;
- if (IsWinVer2000Plus()) {
- ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLESIZING | OFN_ENABLEHOOK;
- ofn.lpfnHook = (LPOFNHOOKPROC)OpenFileSubclass;
- ofn.lStructSize = sizeof(ofn);
- } else {
- ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
- ofn.Flags = OFN_HIDEREADONLY;
- }
+ ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLESIZING | OFN_ENABLEHOOK;
+ ofn.lpfnHook = (LPOFNHOOKPROC)OpenFileSubclass;
+ ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = 0;
ofn.lpstrFile = szFinalFilename;
ofn.lpstrInitialDir = szFinalPath;
diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp
index c42af4a871..9e19108565 100644
--- a/plugins/TipperYM/src/mir_smileys.cpp
+++ b/plugins/TipperYM/src/mir_smileys.cpp
@@ -212,8 +212,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, SMIL
// Get real height of the line
text_height = DrawText(hdcMem, _T("A"), 1, &tmp_rc, DT_CALCRECT | uTextFormat);
- if (IsWinVer2000Plus())
- SaveAlpha(&free_rc);
+ SaveAlpha(&free_rc);
// Just draw ellipsis
if (free_rc.right <= free_rc.left)
@@ -306,8 +305,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, SMIL
}
}
- if (IsWinVer2000Plus())
- RestoreAlpha(&free_rc);
+ RestoreAlpha(&free_rc);
}
void DestroySmileyList(SortedList* p_list)
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 25ea363932..98195ce74d 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -836,7 +836,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
}
- HIMAGELIST himlStates = ImageList_Create(16, 16, IsWinVerXPPlus() ? ILC_COLOR32 | ILC_MASK : ILC_COLOR8 | ILC_MASK, 3, 0);
+ HIMAGELIST himlStates = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 3, 0);
ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_TICK));
@@ -2150,7 +2150,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TREE_SECOND_ITEMS), GWL_STYLE) | TVS_NOHSCROLL);
HIMAGELIST himlCheckBoxes;
- himlCheckBoxes = ImageList_Create(16, 16, IsWinVerXPPlus() ? ILC_COLOR32 | ILC_MASK : ILC_COLOR8 | ILC_MASK, 3, 0);
+ himlCheckBoxes = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 3, 0);
ImageList_AddIcon(himlCheckBoxes, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
ImageList_AddIcon(himlCheckBoxes, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
ImageList_AddIcon(himlCheckBoxes, LoadSkinnedIcon(SKINICON_OTHER_TICK));
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
index 046305e064..02ba385361 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
@@ -34,54 +34,50 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**/
static void InitAlteredPlacesBar()
{
- // do not try it on a win9x Box
- if (IsWinVer2000Plus())
+ HKEY hkMiranda;
+ LONG result;
+
+ // create or open temporary hive for miranda specific places
+ result = RegCreateKey(HKEY_CURRENT_USER, HKEY_MIRANDA_PLACESBAR, &hkMiranda);
+ if (SUCCEEDED(result))
{
- HKEY hkMiranda;
- LONG result;
+ HKEY hkPlacesBar;
- // create or open temporary hive for miranda specific places
- result = RegCreateKey(HKEY_CURRENT_USER, HKEY_MIRANDA_PLACESBAR, &hkMiranda);
+ // map the current users registry
+ RegOverridePredefKey(HKEY_CURRENT_USER, hkMiranda);
+ // open the policy key
+ result = RegCreateKey(HKEY_CURRENT_USER, HKEY_WINPOL_PLACESBAR, &hkPlacesBar);
+ // install the places bar
if (SUCCEEDED(result))
{
- HKEY hkPlacesBar;
-
- // map the current users registry
- RegOverridePredefKey(HKEY_CURRENT_USER, hkMiranda);
- // open the policy key
- result = RegCreateKey(HKEY_CURRENT_USER, HKEY_WINPOL_PLACESBAR, &hkPlacesBar);
- // install the places bar
- if (SUCCEEDED(result))
+ DWORD dwFolderID;
+ LPSTR p;
+ CHAR szMirandaPath[MAX_PATH];
+ CHAR szProfilePath[MAX_PATH];
+
+ // default places: Desktop, My Documents, My Computer
+ dwFolderID = 0; RegSetValueEx(hkPlacesBar, _T("Place0"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
+ dwFolderID = 5; RegSetValueEx(hkPlacesBar, _T("Place1"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
+ dwFolderID = 17; RegSetValueEx(hkPlacesBar, _T("Place2"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
+
+ // Miranda's installation path
+ GetModuleFileNameA(GetModuleHandle(NULL), szMirandaPath, SIZEOF(szMirandaPath));
+ p = mir_strrchr(szMirandaPath, '\\');
+ if (p)
{
- DWORD dwFolderID;
- LPSTR p;
- CHAR szMirandaPath[MAX_PATH];
- CHAR szProfilePath[MAX_PATH];
-
- // default places: Desktop, My Documents, My Computer
- dwFolderID = 0; RegSetValueEx(hkPlacesBar, _T("Place0"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
- dwFolderID = 5; RegSetValueEx(hkPlacesBar, _T("Place1"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
- dwFolderID = 17; RegSetValueEx(hkPlacesBar, _T("Place2"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
-
- // Miranda's installation path
- GetModuleFileNameA(GetModuleHandle(NULL), szMirandaPath, SIZEOF(szMirandaPath));
- p = mir_strrchr(szMirandaPath, '\\');
- if (p)
- {
- RegSetValueExA(hkPlacesBar, "Place3", 0, REG_SZ, (PBYTE)szMirandaPath, (p - szMirandaPath) + 1);
- }
-
- // Miranda's profile path
- if (!CallService(MS_DB_GETPROFILEPATH, SIZEOF(szProfilePath), (LPARAM)szProfilePath))
- {
- // only add if different from profile path
- RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (PBYTE)szProfilePath, (DWORD)strlen(szProfilePath) + 1);
- }
+ RegSetValueExA(hkPlacesBar, "Place3", 0, REG_SZ, (PBYTE)szMirandaPath, (p - szMirandaPath) + 1);
+ }
- RegCloseKey(hkPlacesBar);
+ // Miranda's profile path
+ if (!CallService(MS_DB_GETPROFILEPATH, SIZEOF(szProfilePath), (LPARAM)szProfilePath))
+ {
+ // only add if different from profile path
+ RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (PBYTE)szProfilePath, (DWORD)strlen(szProfilePath) + 1);
}
- RegCloseKey(hkMiranda);
+
+ RegCloseKey(hkPlacesBar);
}
+ RegCloseKey(hkMiranda);
}
}
@@ -94,12 +90,8 @@ static void InitAlteredPlacesBar()
**/
static void ResetAlteredPlaceBars()
{
- // make sure not to call the following on a Win9x Box
- if (IsWinVer2000Plus())
- {
- RegOverridePredefKey(HKEY_CURRENT_USER, NULL);
- SHDeleteKey(HKEY_CURRENT_USER, HKEY_MIRANDA_PLACESBAR);
- }
+ RegOverridePredefKey(HKEY_CURRENT_USER, NULL);
+ SHDeleteKey(HKEY_CURRENT_USER, HKEY_MIRANDA_PLACESBAR);
}
/**
@@ -275,17 +267,9 @@ static void InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR
GetInitialDir(pszInitialDir);
pofn->lpstrInitialDir = pszInitialDir;
-
-
- if (IsWinVer2000Plus()) {
- pofn->lStructSize = sizeof (OPENFILENAME);
- pofn->Flags |= OFN_ENABLEHOOK|OFN_EXPLORER;
- pofn->lpfnHook = (LPOFNHOOKPROC)OpenSaveFileDialogHook;
- }
- else {
- pofn->lStructSize = OPENFILENAME_SIZE_VERSION_400;
- }
-
+ pofn->lStructSize = sizeof (OPENFILENAME);
+ pofn->Flags |= OFN_ENABLEHOOK|OFN_EXPLORER;
+ pofn->lpfnHook = (LPOFNHOOKPROC)OpenSaveFileDialogHook;
}