diff options
Diffstat (limited to 'plugins')
61 files changed, 112 insertions, 112 deletions
| diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp index 0eadf15e1d..1dc974e01f 100644 --- a/plugins/Alarms/src/alarm_win.cpp +++ b/plugins/Alarms/src/alarm_win.cpp @@ -4,7 +4,7 @@  #define ID_TIMER_SOUND				10101
  #define SOUND_REPEAT_PERIOD			5000	// milliseconds
  #define SPEACH_REPEAT_PERIOD		15000	// milliseconds
 -HANDLE hAlarmWindowList = 0;
 +MWindowList hAlarmWindowList = 0;
  FontIDT title_font_id, window_font_id;
  ColourIDT bk_colour_id;
 diff --git a/plugins/Alarms/src/alarm_win.h b/plugins/Alarms/src/alarm_win.h index 5a73de86dd..7bea4402f5 100644 --- a/plugins/Alarms/src/alarm_win.h +++ b/plugins/Alarms/src/alarm_win.h @@ -11,7 +11,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar  #define WMU_SETOPT					(WM_USER + 60)
 -extern HANDLE hAlarmWindowList;
 +extern MWindowList hAlarmWindowList;
  void SetAlarmWinOptions();
 diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index a1701f74ec..ff105f96d1 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -32,7 +32,7 @@ HANDLE hFolder = NULL;  TCHAR profilePath[MAX_PATH];		// database profile path (read at startup only)
  TCHAR basedir[MAX_PATH];
  int hLangpack = 0;
 -HANDLE hAvatarWindowsList = NULL;
 +MWindowList hAvatarWindowsList = NULL;
  int OptInit(WPARAM wParam,LPARAM lParam);
 diff --git a/plugins/AvatarHistory/src/stdafx.h b/plugins/AvatarHistory/src/stdafx.h index 2c294ccda7..4bf6f2395f 100644 --- a/plugins/AvatarHistory/src/stdafx.h +++ b/plugins/AvatarHistory/src/stdafx.h @@ -33,7 +33,7 @@  extern HINSTANCE hInst;
  extern HGENMENU hMenu;
  extern DWORD mirVer;
 -extern HANDLE hAvatarWindowsList;
 +extern MWindowList hAvatarWindowsList;
  extern Options opts;
  extern HANDLE hFolder;
  extern TCHAR basedir[];
 diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 837167f42b..4243dd9f06 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -2,7 +2,7 @@  int hLangpack;
  HINSTANCE hInst;
 -HANDLE hWindowList;
 +MWindowList hWindowList;
  PLUGININFOEX pluginInfo={
  	sizeof(PLUGININFOEX),
 diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp index d78ab4ba15..34418e3818 100644 --- a/plugins/Clist_modern/src/modern_tbbutton.cpp +++ b/plugins/Clist_modern/src/modern_tbbutton.cpp @@ -34,7 +34,7 @@ static mir_cs csTips;  static HWND hwndToolTips = NULL;
  static BOOL	bThemed = FALSE;
 -static HANDLE hButtonWindowList = NULL;
 +static MWindowList hButtonWindowList = NULL;
  static int OnIconLibIconChanged(WPARAM, LPARAM)
  {
 diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index 20ce9de27a..89d359b656 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -61,7 +61,7 @@ INT_PTR CloseAction(WPARAM, LPARAM)  	return 0;
  }
 -static HANDLE hWindowListIGN = 0;
 +static MWindowList hWindowListIGN = 0;
  // dialog procedure for handling the contact ignore dialog (available from the contact menu
  static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 77a50dc048..12d7923f76 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -31,9 +31,9 @@ int hLangpack;  int g_Utf8EventsSupported = TRUE;
 -HANDLE ghSendWindowList;
 -HANDLE ghRecvWindowList;
 -gAckList gaAckData;
 +MWindowList g_hSendWindowList;
 +MWindowList g_hRecvWindowList;
 +gAckList g_aAckData;
  HGENMENU hContactMenuItem;
 @@ -155,20 +155,20 @@ static int HookContactSettingChanged(WPARAM hContact, LPARAM lParam)  	if (strcmpnull(cws->szModule, "CList") && strcmpnull(cws->szModule, szProto))
  		return 0;
 -	WindowList_Broadcast(ghSendWindowList, DM_UPDATETITLE, 0, 0);
 -	WindowList_Broadcast(ghRecvWindowList, DM_UPDATETITLE, 0, 0);
 +	WindowList_Broadcast(g_hSendWindowList, DM_UPDATETITLE, 0, 0);
 +	WindowList_Broadcast(g_hRecvWindowList, DM_UPDATETITLE, 0, 0);
  	return 0;
  }
  static int HookContactDeleted(WPARAM wParam, LPARAM)
  {  // if our contact gets deleted close his window
 -	HWND h = WindowList_Find(ghSendWindowList, wParam);
 +	HWND h = WindowList_Find(g_hSendWindowList, wParam);
  	if (h)
  		SendMessage(h, WM_CLOSE, 0, 0);
  	// since we hack the window list - more windows for one contact, we need to close them all
 -	while (h = WindowList_Find(ghRecvWindowList, wParam))
 +	while (h = WindowList_Find(g_hRecvWindowList, wParam))
  		SendMessage(h, WM_CLOSE, 0, 0);
  	return 0;
  }
 @@ -176,7 +176,7 @@ static int HookContactDeleted(WPARAM wParam, LPARAM)  static INT_PTR ServiceSendCommand(WPARAM wParam, LPARAM)
  {
  	//find window for hContact
 -	HWND hWnd = WindowList_Find(ghSendWindowList, wParam);
 +	HWND hWnd = WindowList_Find(g_hSendWindowList, wParam);
  	if (!hWnd)
  		CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEND), NULL, SendDlgProc, wParam);
  	else {
 @@ -204,8 +204,8 @@ extern "C" __declspec(dllexport) int Load(void)  	InitCommonControls();
 -	ghSendWindowList = WindowList_Create();
 -	ghRecvWindowList = WindowList_Create();
 +	g_hSendWindowList = WindowList_Create();
 +	g_hRecvWindowList = WindowList_Create();
  	//init hooks
  	HookEvent(ME_SYSTEM_MODULESLOADED, HookModulesLoaded);
 @@ -225,7 +225,7 @@ extern "C" __declspec(dllexport) int Load(void)  extern "C" __declspec(dllexport) int Unload(void)
  {
 -	WindowList_Destroy(ghSendWindowList);
 -	WindowList_Destroy(ghRecvWindowList);
 +	WindowList_Destroy(g_hSendWindowList);
 +	WindowList_Destroy(g_hRecvWindowList);
  	return 0;
  }
 diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index 10aa4e70c5..84331201a3 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -169,7 +169,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  		TranslateDialogDefault(hwndDlg);
  		{
  			CLISTEVENT *pcle = (CLISTEVENT*)lParam;
 -			WindowList_Add(ghRecvWindowList, hwndDlg, pcle->hContact);
 +			WindowList_Add(g_hRecvWindowList, hwndDlg, pcle->hContact);
  			SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS)));
  			EnableDlgItem(hwndDlg, IDOK, FALSE);
  			EnableDlgItem(hwndDlg, IDDETAILS, FALSE);
 @@ -448,7 +448,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  		break;
  	case WM_CLOSE:  // user closed window, so destroy it
 -		WindowList_Remove(ghRecvWindowList, hwndDlg);
 +		WindowList_Remove(g_hRecvWindowList, hwndDlg);
  		DestroyWindow(hwndDlg);
  		break;
 diff --git a/plugins/ContactsPlus/src/receive.h b/plugins/ContactsPlus/src/receive.h index 73ee03cb1e..52db60a171 100644 --- a/plugins/ContactsPlus/src/receive.h +++ b/plugins/ContactsPlus/src/receive.h @@ -60,7 +60,7 @@ struct TRecvContactsData  	HICON      hIcons[4];    // icons for dialog
  };
 -extern HANDLE ghRecvWindowList;
 +extern MWindowList g_hRecvWindowList;
  INT_PTR CALLBACK RecvDlgProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index ae074322ea..2e0217c9e0 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -121,7 +121,7 @@ int TSendContactsData::SendContactsPacket(HWND hwndDlg, MCONTACT *phContacts, in  		return FALSE; // Failure
  	}
 -	TAckData *ackData = gaAckData.Add(hProcc, new TAckData(hContact));
 +	TAckData *ackData = g_aAckData.Add(hProcc, new TAckData(hContact));
  	uacklist.Add(hProcc);
  	ackData->nContacts = nContacts;
  	ackData->aContacts = (MCONTACT*)mir_alloc(nContacts*sizeof(MCONTACT));
 @@ -230,7 +230,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  		TranslateDialogDefault(hwndDlg);
  		SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS)));
  		SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), lParam);
 -		WindowList_Add(ghSendWindowList, hwndDlg, lParam);
 +		WindowList_Add(g_hSendWindowList, hwndDlg, lParam);
  		wndData = new TSendContactsData(lParam);
  		SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)wndData);
  		// new dlg init 
 @@ -272,7 +272,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  			wndData->UnhookProtoAck();
  			if (wndData->uacklist.Count) {
  				for (int i = 0; i < wndData->uacklist.Count; i++)
 -					delete gaAckData.Remove(wndData->uacklist.Items[i]); // remove our ackdata & release structure
 +					delete g_aAckData.Remove(wndData->uacklist.Items[i]); // remove our ackdata & release structure
  				mir_free(wndData->uacklist.Items);
  				wndData->uacklist.Items = NULL;
 @@ -292,7 +292,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  		case MSGERROR_RETRY:// resend timeouted packets
  			for (int i = 0; i < wndData->uacklist.Count; i++) {
 -				TAckData *lla = gaAckData.Remove(wndData->uacklist.Items[i]);
 +				TAckData *lla = g_aAckData.Remove(wndData->uacklist.Items[i]);
  				HANDLE hProcc = (HANDLE)CallContactService(wndData->hContact, PSS_CONTACTS, MAKEWPARAM(0, lla->nContacts), (LPARAM)lla->aContacts);
  				if (!hProcc) { // if fatal do not include
 @@ -303,7 +303,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  				else {
  					// update process code
  					wndData->uacklist.Items[i] = hProcc;
 -					gaAckData.Add(hProcc, lla);
 +					g_aAckData.Add(hProcc, lla);
  				}
  			}// collect TAckData for our window, resend
  			break;
 @@ -384,7 +384,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  			if (ack->type != ACKTYPE_CONTACTS)
  				break;
 -			TAckData *ackData = gaAckData.Get(ack->hProcess);
 +			TAckData *ackData = g_aAckData.Get(ack->hProcess);
  			if (ackData == NULL)
  				break;    // on unknown hprocc go away
 @@ -424,7 +424,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  				pBlob += strlennull(pBlob) + 1;
  			}
  			db_event_add(ackData->hContact, &dbei);
 -			gaAckData.Remove(ack->hProcess); // do not release here, still needed
 +			g_aAckData.Remove(ack->hProcess); // do not release here, still needed
  			wndData->uacklist.Remove(ack->hProcess); // packet confirmed
  			for (i = 0; i < ackData->nContacts; i++) {
  				mir_free(maSend[i].mcaUIN);
 @@ -464,7 +464,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara  	case WM_DESTROY:
  		for (int i = 0; i < SIZEOF(wndData->hIcons); i++)
  			DestroyIcon(wndData->hIcons[i]);
 -		WindowList_Remove(ghSendWindowList, hwndDlg);
 +		WindowList_Remove(g_hSendWindowList, hwndDlg);
  		delete wndData;
  		break;
  	}
 diff --git a/plugins/ContactsPlus/src/send.h b/plugins/ContactsPlus/src/send.h index a9240ddef1..eada2a7da7 100644 --- a/plugins/ContactsPlus/src/send.h +++ b/plugins/ContactsPlus/src/send.h @@ -101,8 +101,8 @@ struct gAckList {    ~gAckList() { if (Count) { for (int i=0; i<Count; i++) delete Items[i]; mir_free(Items); }; }
  };
 -extern HANDLE ghSendWindowList;
 -extern gAckList gaAckData;
 +extern MWindowList g_hSendWindowList;
 +extern gAckList g_aAckData;
  INT_PTR CALLBACK SendDlgProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
 diff --git a/plugins/ExternalAPI/m_yamn.h b/plugins/ExternalAPI/m_yamn.h index 43b8fccffc..2be7c32712 100644 --- a/plugins/ExternalAPI/m_yamn.h +++ b/plugins/ExternalAPI/m_yamn.h @@ -11,8 +11,8 @@ typedef struct CYAMNVariables  {
  #define YAMN_VARIABLESVERSION	3
  	HINSTANCE hInst;
 -	HANDLE MessageWnds;
 -	HANDLE NewMailAccountWnd;
 +	MWindowList MessageWnds;
 +	MWindowList NewMailAccountWnd;
  	int Shutdown;
  } YAMN_VARIABLES, *PYAMN_VARIABLES;
 diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp index 7ee80afda2..94459df0ca 100644 --- a/plugins/FavContacts/src/services.cpp +++ b/plugins/FavContacts/src/services.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include "stdafx.h"
  static MCONTACT hContactToActivate;
 -static HANDLE hDialogsList;
 +static MWindowList hDialogsList;
  INT_PTR svcShowMenu(WPARAM, LPARAM)
  {
 diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index f29f3fb3da..fa6e4ddb6e 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -15,7 +15,7 @@ PLUGININFOEX pluginInfo =  	{ 0x34b5a402, 0x1b79, 0x4246, { 0xb0, 0x41, 0x43, 0xd0, 0xb5, 0x90, 0xae, 0x2c } }
  };
 -HANDLE hFileList;
 +MWindowList hFileList;
  HINSTANCE hInst;
  int hLangpack;
 diff --git a/plugins/FileAsMessage/src/main.h b/plugins/FileAsMessage/src/main.h index e0e6c01114..ee3577a12d 100644 --- a/plugins/FileAsMessage/src/main.h +++ b/plugins/FileAsMessage/src/main.h @@ -41,7 +41,7 @@ extern const ulong INITCRC;  #define WM_FE_SKINCHANGE	WM_USER+102
  extern HINSTANCE hInst;
 -extern HANDLE hFileList;
 +extern MWindowList hFileList;
  extern HANDLE hEventNewFile;
  extern HICON hIcons[5];
 diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 2f94d2ec47..8f6e6aa3f7 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -19,9 +19,8 @@  // Global variables
  HINSTANCE hInst;
 -                             
 -HANDLE hWindowList;
 +MWindowList hWindowList;
  HCURSOR splitCursor;
  int hLangpack;
 diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index cb9f69c8f3..28e5520a86 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -19,7 +19,7 @@  #include "linklist.h"
  extern HINSTANCE hInst;
 -extern HANDLE hWindowList;
 +extern MWindowList hWindowList;
  extern HCURSOR splitCursor;
  MYCOLOURSET colourSet;
 diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index aa80b1c799..b2524bb251 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -19,7 +19,7 @@  #include "linklist.h"
  extern HINSTANCE hInst;
 -extern HANDLE hWindowList;
 +extern MWindowList hWindowList;
  /*
  The hyperlink detection in this function is taken from the
 diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp index 01da6e43e0..58201979cb 100644 --- a/plugins/IEHistory/src/IEHistory.cpp +++ b/plugins/IEHistory/src/IEHistory.cpp @@ -25,7 +25,7 @@ int hLangpack;//Miranda NG langpack used by translate functions, filled by mir_g  char ModuleName[] = "IEHistory";  HICON hIcon;  HINSTANCE hInstance; -HANDLE hOpenWindowsList = NULL; +MWindowList hOpenWindowsList = NULL;  HMODULE hUxTheme = 0;  BOOL(WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD) = NULL; @@ -70,7 +70,7 @@ extern "C" int __declspec(dllexport) Load(void)  	/// all initialization here  	hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HISTORYICON)); -	hOpenWindowsList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0); +	hOpenWindowsList = WindowList_Create();  	InitServices(); diff --git a/plugins/IEHistory/src/stdafx.h b/plugins/IEHistory/src/stdafx.h index daaa9d2916..ad8cfce450 100644 --- a/plugins/IEHistory/src/stdafx.h +++ b/plugins/IEHistory/src/stdafx.h @@ -79,7 +79,7 @@ extern HICON hIcon; //history icon  extern int hLangpack;  extern char ModuleName[];  extern HINSTANCE hInstance; //dll instance -extern HANDLE hOpenWindowsList; +extern MWindowList hOpenWindowsList;  extern PLUGININFOEX pluginInfo; diff --git a/plugins/Msg_Export/src/Glob.h b/plugins/Msg_Export/src/Glob.h index e63481959f..1f59deeb5f 100755 --- a/plugins/Msg_Export/src/Glob.h +++ b/plugins/Msg_Export/src/Glob.h @@ -55,6 +55,6 @@ using namespace std;  extern HINSTANCE hInstance;
 -extern HANDLE hInternalWindowList;
 +extern MWindowList hInternalWindowList;
  #endif
\ No newline at end of file diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index e5172f703b..1eb1177f0c 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -23,7 +23,7 @@ int hLangpack = 0;  static HANDLE hOpenHistoryMenuItem = 0;
 -HANDLE hInternalWindowList = NULL;
 +MWindowList hInternalWindowList = NULL;
  /////////////////////////////////////////////////////
  // Remember to update the Version in the resource !!!
 diff --git a/plugins/NewAwaySysMod/src/Common.h b/plugins/NewAwaySysMod/src/Common.h index c8a99eef6d..36b036c619 100644 --- a/plugins/NewAwaySysMod/src/Common.h +++ b/plugins/NewAwaySysMod/src/Common.h @@ -294,7 +294,7 @@ TCString VariablesEscape(TCString Str);  INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  // ReadAwayMsg.cpp
 -extern HANDLE g_hReadWndList;
 +extern MWindowList g_hReadWndList;
  INT_PTR GetContactStatMsg(WPARAM wParam, LPARAM lParam);
  // AwayOpt.cpp
 diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index 4d998293d8..8d7784a42e 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -23,7 +23,7 @@  #define EXTRAICON_XSTEP (GetSystemMetrics(SM_CXSMICON) + 1)
 -static HANDLE hCLWindowList;
 +static MWindowList hCLWindowList;
  static int CLContactDeleted(WPARAM wParam, LPARAM lParam)
  {
 diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp index 7cc7c12fc8..04163e7dd5 100644 --- a/plugins/NewAwaySysMod/src/MsgTree.cpp +++ b/plugins/NewAwaySysMod/src/MsgTree.cpp @@ -46,12 +46,12 @@ SettingsList[] = {  	IDS_MESSAGEDLG_DEF_OTL,  ID_STATUS_OUTTOLUNCH, IDR_MSGTREEMENU_DEF_OTL
  };
 -static HANDLE hMTWindowList;
 +static MWindowList hMTWindowList;
  static WNDPROC g_OrigEditProc;
  void LoadMsgTreeModule()
  {
 -	hMTWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
 +	hMTWindowList = WindowList_Create();
  }
  static LRESULT CALLBACK EditSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
 diff --git a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp index f394c9bdda..1123ae5fab 100644 --- a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp @@ -30,7 +30,7 @@ struct READAWAYMSGDATA  #define RAMDLGSIZESETTING "ReadAwayMsgDlg"
 -HANDLE g_hReadWndList = NULL;
 +MWindowList g_hReadWndList = NULL;
  static int ReadAwayMsgDlgResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc)
  {
 diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h index da0659d198..11b78ad76f 100644 --- a/plugins/NewsAggregator/Src/Common.h +++ b/plugins/NewsAggregator/Src/Common.h @@ -56,7 +56,8 @@ Boston, MA 02111-1307, USA.  extern HINSTANCE hInst;
  extern HWND hAddFeedDlg;
 -extern HANDLE hChangeFeedDlgList, hNetlibUser;
 +extern MWindowList hChangeFeedDlgList;
 +extern HANDLE hNetlibUser;
  extern UINT_PTR timerId;
  // check if Feeds is currently updating
  extern bool ThreadRunning;
 diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index 13c08a8693..112b90b7ef 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -24,7 +24,7 @@ HINSTANCE hInst = NULL;  int hLangpack;
  HANDLE hPrebuildMenuHook = NULL;
  HWND hAddFeedDlg;
 -HANDLE hChangeFeedDlgList = NULL;
 +MWindowList hChangeFeedDlgList = NULL;
  XML_API xi = {0};
  TCHAR tszRoot[MAX_PATH] = {0};
  HANDLE hUpdateMutex;
 diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index c8b0c7289f..bc2769807d 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  	on current active mode for user.
  	*************************************************************************************/
 -static HANDLE hDialogsList = NULL;
 +static MWindowList hDialogsList = NULL;
  static void SrmmMenu_UpdateIcon(MCONTACT hContact)
  {
 diff --git a/plugins/Quotes/src/CurrencyConverter.cpp b/plugins/Quotes/src/CurrencyConverter.cpp index 5e5de39f81..9a3d45cb50 100644 --- a/plugins/Quotes/src/CurrencyConverter.cpp +++ b/plugins/Quotes/src/CurrencyConverter.cpp @@ -96,7 +96,7 @@ namespace  		{
  		case WM_INITDIALOG:
  		{
 -			HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX, false);
 +			MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX, false);
  			assert(hWL);
  			WindowList_Add(hWL, hDlg, NULL);
 @@ -155,7 +155,7 @@ namespace  		return (TRUE);
  		case WM_CLOSE:
  		{
 -			HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX, false);
 +			MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX, false);
  			assert(hWL);
  			WindowList_Remove(hWL, hDlg);
  			Utils_SaveWindowPosition(hDlg, NULL, QUOTES_PROTOCOL_NAME, WINDOW_PREFIX);
 @@ -282,7 +282,7 @@ namespace  INT_PTR QuotesMenu_CurrencyConverter(WPARAM, LPARAM)
  {
 -	HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX, true);
 +	MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX, true);
  	HWND hWnd = WindowList_Find(hWL, NULL);
  	if (NULL != hWnd)
  	{
 diff --git a/plugins/Quotes/src/ModuleInfo.cpp b/plugins/Quotes/src/ModuleInfo.cpp index 656d17ad64..65d2593482 100644 --- a/plugins/Quotes/src/ModuleInfo.cpp +++ b/plugins/Quotes/src/ModuleInfo.cpp @@ -22,9 +22,9 @@ CModuleInfo& CModuleInfo::GetInstance()  	return mi;
  }
 -HANDLE CModuleInfo::GetWindowList(const std::string& rsKey, bool bAllocateIfNonExist /*= true*/)
 +MWindowList CModuleInfo::GetWindowList(const std::string& rsKey, bool bAllocateIfNonExist /*= true*/)
  {
 -	HANDLE hResult = NULL;
 +	MWindowList hResult = NULL;
  	THandles::const_iterator i = m_ahWindowLists.find(rsKey);
  	if (i != m_ahWindowLists.end())
  	{
 diff --git a/plugins/Quotes/src/ModuleInfo.h b/plugins/Quotes/src/ModuleInfo.h index 6f4676bb1a..fdc67ccd6a 100644 --- a/plugins/Quotes/src/ModuleInfo.h +++ b/plugins/Quotes/src/ModuleInfo.h @@ -21,7 +21,7 @@ public:  	static CModuleInfo& GetInstance();
  	void OnMirandaShutdown();
 -	HANDLE GetWindowList(const std::string& rsKey, bool bAllocateIfNonExist = true);
 +	MWindowList GetWindowList(const std::string& rsKey, bool bAllocateIfNonExist = true);
  	bool GetExtendedStatusFlag()const;
  	static bool Verify();
 @@ -35,7 +35,7 @@ public:  	static void SetHTMLEngine(THTMLEnginePtr pEngine);
  private:
 -	typedef std::map<std::string, HANDLE> THandles;
 +	typedef std::map<std::string, MWindowList> THandles;
  	THandles m_ahWindowLists;
  	bool m_bExtendedStatusInfo;
  };
 diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp index e94245e3c3..64f5012243 100644 --- a/plugins/Quotes/src/QuoteInfoDlg.cpp +++ b/plugins/Quotes/src/QuoteInfoDlg.cpp @@ -206,7 +206,7 @@ namespace  		case WM_INITDIALOG:
  		{
  			hContact = MCONTACT(lParam);
 -			HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO, false);
 +			MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO, false);
  			assert(hWL);
  			WindowList_Add(hWL, hdlg, hContact);
 @@ -225,7 +225,7 @@ namespace  			{
  				SetWindowLongPtr(hdlg, GWLP_USERDATA, 0);
 -				HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO, false);
 +				MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO, false);
  				assert(hWL);
  				WindowList_Remove(hWL, hdlg);
  				Utils_SaveWindowPosition(hdlg, hContact, QUOTES_MODULE_NAME, WINDOW_PREFIX_INFO);
 @@ -253,7 +253,7 @@ int Quotes_OnContactDoubleClick(WPARAM wp, LPARAM/* lp*/)  	MCONTACT hContact = MCONTACT(wp);
  	if (CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact))
  	{
 -		HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO, true);
 +		MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO, true);
  		assert(hWL);
  		HWND hWnd = WindowList_Find(hWL, hContact);
  		if (NULL != hWnd) {
 diff --git a/plugins/Quotes/src/SettingsDlg.cpp b/plugins/Quotes/src/SettingsDlg.cpp index 6e14d26137..268b9a1c1b 100644 --- a/plugins/Quotes/src/SettingsDlg.cpp +++ b/plugins/Quotes/src/SettingsDlg.cpp @@ -271,7 +271,7 @@ namespace  			MCONTACT hContact = MCONTACT(lp);
  			TranslateDialogDefault(hWnd);
 -			HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS, false);
 +			MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS, false);
  			assert(hWL);
  			WindowList_Add(hWL, hWnd, hContact);
 @@ -493,7 +493,7 @@ namespace  			CSettingWindowParam* pParam = get_param(hWnd);
  			SetWindowLongPtr(hWnd, GWLP_USERDATA, 0);
 -			HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS, false);
 +			MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS, false);
  			assert(hWL);
  			WindowList_Remove(hWL, hWnd);
  			Utils_SaveWindowPosition(hWnd, pParam->m_hContact, QUOTES_MODULE_NAME, WINDOW_PREFIX_SETTINGS);
 @@ -509,7 +509,7 @@ namespace  void ShowSettingsDlg(MCONTACT hContact)
  {
 -	HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS, true);
 +	MWindowList hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS, true);
  	assert(hWL);
  	HWND hWnd = WindowList_Find(hWL, hContact);
  	if (NULL != hWnd)
 diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index a0251e344c..dc8ac0b113 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -13,7 +13,7 @@ int hLangpack = 0;  CLIST_INTERFACE *pcli;
  HANDLE hTopToolbarButtonShowList;
  HANDLE hMsgWndEvent;
 -HANDLE hWindowList;
 +MWindowList hWindowList;
  HGENMENU hMenuItemRemove;
  const INT_PTR boo = 0;
 diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h index c5a2d6e7a6..30c1ee6a88 100644 --- a/plugins/Scriver/src/globals.h +++ b/plugins/Scriver/src/globals.h @@ -82,9 +82,9 @@ struct GlobalMessageData  {
  	unsigned int flags;
  	unsigned int flags2;
 -	HANDLE hMessageWindowList;
 +	MWindowList hMessageWindowList;
  	DWORD openFlags;
 -	HANDLE hParentWindowList;
 +	MWindowList hParentWindowList;
  	ParentWindowData *lastParent;
  	ParentWindowData *lastChatParent;
  	DWORD limitNamesLength;
 diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index cf3280e56e..fa56ecbfcf 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include "seen.h"
 -static HANDLE hWindowList;
 +static MWindowList hWindowList;
  char* BuildSetting(int historyLast)
  {
 diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index b5a50a98c1..7fee9de885 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -22,7 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  HINSTANCE hInstance;
  HANDLE ehmissed = NULL, ehuserinfo = NULL, ehmissed_proto = NULL;
 -HANDLE g_hShutdownEvent, g_pUserInfo;
 +HANDLE g_hShutdownEvent;
 +MWindowList g_pUserInfo;
  int hLangpack;
 diff --git a/plugins/SeenPlugin/src/seen.h b/plugins/SeenPlugin/src/seen.h index 8bfc453336..6f2273546b 100644 --- a/plugins/SeenPlugin/src/seen.h +++ b/plugins/SeenPlugin/src/seen.h @@ -119,7 +119,7 @@ extern HINSTANCE hInstance;  extern DWORD StatusColors15bits[];
  extern BOOL includeIdle;
  extern HANDLE ehmissed, ehuserinfo, ehmissed_proto;
 -extern HANDLE g_pUserInfo;
 +extern MWindowList g_pUserInfo;
  extern HGENMENU hmenuitem;
  extern DWORD dwmirver;
 diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 76457e7267..b3e9a0334e 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -28,8 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,  #include "commonheaders.h"
  static HGENMENU hAwayMsgMenuItem, hCopyMsgMenuItem, hGoToURLMenuItem;
 -static HANDLE hWindowList;
 -static HANDLE hWindowList2;
 +static MWindowList hWindowList, hWindowList2;
  static char *StrNormNewlineA(char *szStr)
  {
 diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index 7893c21309..bd22ddca47 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -133,7 +133,7 @@ public:  	BOOL        m_autoSplit;
  	BOOL        m_FlashOnMTN;
  	DWORD       dwThreadID;
 -	HANDLE      m_hMessageWindowList, hUserPrefsWindowList;
 +	MWindowList m_hMessageWindowList, hUserPrefsWindowList;
  	HMENU       m_MenuBar;
  	COLORREF    m_ipBackgroundGradient;
  	COLORREF    m_ipBackgroundGradientHigh;
 diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h index 99a2f80cd5..4fc142756b 100644 --- a/plugins/TabSRMM/src/mim.h +++ b/plugins/TabSRMM/src/mim.h @@ -193,7 +193,7 @@ public:  	static	int MessageEventAdded(WPARAM wParam, LPARAM lParam);
  public:
 -	HANDLE m_hMessageWindowList;
 +	MWindowList m_hMessageWindowList;
  	// various function pointers
  	static PDTTE  m_pfnDrawThemeTextEx;
 diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index e931c1b9d0..49a7a70c33 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -4,7 +4,7 @@ HANDLE hTypingNotify;  static HGENMENU hDisableMenu = NULL;
 -static HANDLE hPopupsList = NULL;
 +static MWindowList hPopupsList = NULL;
  static BYTE   OnePopup;
  static BYTE   ShowMenu;
 diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index ced9ac7c04..a5a2c76604 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -136,7 +136,6 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,  			DWORD	*pdwActionToTake = (DWORD *)lParam;
  			unsigned int iOldIEView = 0;
  			HWND	hWnd = M.FindWindow(hContact);
 -			DWORD	sCodePage = M.GetDword(hContact, "ANSIcodepage", 0);
  			BYTE	bOldInfoPanel = M.GetByte(hContact, "infopanel", 0);
  			if (hWnd) {
 diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index f69a4c8c2b..d7be4d2221 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -52,7 +52,7 @@ static TRTFColorTable _rtf_ctable[] =  int				Utils::rtf_ctable_size = 0;
  TRTFColorTable* Utils::rtf_ctable = 0;
 -HANDLE			CWarning::hWindowList = 0;
 +MWindowList CWarning::hWindowList = 0;
  static TCHAR *w_bbcodes_begin[] = { _T("[b]"), _T("[i]"), _T("[u]"), _T("[s]"), _T("[color=") };
  static TCHAR *w_bbcodes_end[] = { _T("[/b]"), _T("[/i]"), _T("[/u]"), _T("[/s]"), _T("[/color]") };
 diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h index 3815595ffa..6db72b6c26 100644 --- a/plugins/TabSRMM/src/utils.h +++ b/plugins/TabSRMM/src/utils.h @@ -179,7 +179,7 @@ private:  	static __int64 getMask(); // get bit mask for disabled message classes
  private:
 -	static	HANDLE			hWindowList;
 +	static MWindowList hWindowList;
  };
  #endif /* __UTILS_H */
 diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 22caa0e3c2..c6ef0f73fb 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -392,7 +392,7 @@ int TrafficCounter_Draw(HWND hwnd, HDC hDC)  static void TC_AlphaText(HDC hDC, LPCTSTR lpString, RECT* lpRect, UINT format, BYTE ClistModernPresent)
  {
 -	int nCount = mir_tstrlen( lpString );
 +	int nCount = (int)mir_tstrlen( lpString );
  	if (ClistModernPresent)
  		AlphaText(hDC, lpString, nCount, lpRect, format, Traffic_FontColor);
 diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index 196ec13abb..fa304ad0de 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -159,7 +159,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size)  	l += mir_tstrlen(szUnit) + 1;
  	Res = (TCHAR*)malloc(l * sizeof(TCHAR));
  	if (!Res) return 0;
 -	GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, Res, l);
 +	GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, Res, (int)l);
  	mir_tstrcat(Res, szUnit);
  	if (Size && Buffer)
 diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index a8d286eeed..0828884142 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -59,8 +59,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  ***********************************************************************************************************/
  static BYTE bInitIcons = INIT_ICONS_NONE;
 -static HANDLE ghWindowList = NULL;
 -static HANDLE ghDetailsInitEvent = NULL;
 +static MWindowList g_hWindowList = NULL;
 +static HANDLE g_hDetailsInitEvent = NULL;
  static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
 @@ -249,7 +249,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)  	myGlobals.WantAeroAdaption = db_get_b(NULL, MODNAME, SET_PROPSHEET_AEROADAPTION, TRUE);
  	// allow only one dialog per user
 -	if (HWND hWnd = WindowList_Find(ghWindowList, wParam)) {
 +	if (HWND hWnd = WindowList_Find(g_hWindowList, wParam)) {
  		SetForegroundWindow(hWnd);
  		SetFocus(hWnd);
  		return 0;
 @@ -301,7 +301,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)  	}
  	// add the pages
 -	NotifyEventHooks(ghDetailsInitEvent, (WPARAM)&psh, wParam);
 +	NotifyEventHooks(g_hDetailsInitEvent, (WPARAM)&psh, wParam);
  	if (!psh._pPages || !psh._numPages) {
  		MsgErr(NULL, LPGENT("No pages have been added. Canceling dialog creation!"));
  		return 1;
 @@ -319,7 +319,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)  			if (psh._hContact) {
  				psh._pszProto = DB::Contact::Proto(psh._hContact);
  				if ((INT_PTR)psh._pszProto != CALLSERVICE_NOTFOUND)
 -					NotifyEventHooks(ghDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
 +					NotifyEventHooks(g_hDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
  			}
  		}
  		psh._hContact = wParam;
 @@ -400,7 +400,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam)  **/
  static int OnDeleteContact(WPARAM wParam, LPARAM lParam)
  {
 -	HWND hWnd = WindowList_Find(ghWindowList, wParam);
 +	HWND hWnd = WindowList_Find(g_hWindowList, wParam);
  	if (hWnd != NULL)
  		DestroyWindow(hWnd);
  	return 0;
 @@ -414,7 +414,7 @@ static int OnDeleteContact(WPARAM wParam, LPARAM lParam)  **/
  static int OnShutdown(WPARAM wParam, LPARAM lParam)
  {
 -	WindowList_BroadcastAsync(ghWindowList, WM_DESTROY, 0, 0);
 +	WindowList_BroadcastAsync(g_hWindowList, WM_DESTROY, 0, 0);
  	return 0;
  }
 @@ -576,7 +576,7 @@ void DlgContactInfoInitTreeIcons()  						pszContactProto = DB::Contact::Proto(psh._hContact);
  						if ((INT_PTR)pszContactProto != CALLSERVICE_NOTFOUND && !mir_strcmp(pd[i]->szModuleName, pszContactProto)) {
  							// call a notification for the contact to retrieve all protocol specific tree items
 -							NotifyEventHooks(ghDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
 +							NotifyEventHooks(g_hDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
  							if (psh._pPages) {
  								psh.Free_pPages();
  								psh._dwFlags = PSTVF_INITICONS | PSF_PROTOPAGESONLY;
 @@ -592,7 +592,7 @@ void DlgContactInfoInitTreeIcons()  		if (!(bInitIcons & INIT_ICONS_OWNER)) {
  			psh._hContact = NULL;
  			psh._pszProto = NULL;
 -			NotifyEventHooks(ghDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
 +			NotifyEventHooks(g_hDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
  			if (psh._pPages) {
  				psh.Free_pPages();
  			}
 @@ -610,8 +610,8 @@ void DlgContactInfoInitTreeIcons()  **/
  void DlgContactInfoUnLoadModule()
  {
 -	WindowList_Destroy(ghWindowList);
 -	DestroyHookableEvent(ghDetailsInitEvent);
 +	WindowList_Destroy(g_hWindowList);
 +	DestroyHookableEvent(g_hDetailsInitEvent);
  }
  /**
 @@ -622,7 +622,7 @@ void DlgContactInfoUnLoadModule()  **/
  void DlgContactInfoLoadModule()
  {
 -	ghDetailsInitEvent = CreateHookableEvent(ME_USERINFO_INITIALISE);
 +	g_hDetailsInitEvent = CreateHookableEvent(ME_USERINFO_INITIALISE);
  	CreateServiceFunction(MS_USERINFO_SHOWDIALOG, ShowDialog);
  	CreateServiceFunction("UserInfo/AddPage", AddPage);
 @@ -630,7 +630,7 @@ void DlgContactInfoLoadModule()  	HookEvent(ME_DB_CONTACT_DELETED, OnDeleteContact);
  	HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
  	HookEvent(ME_USERINFO_INITIALISE, InitDetails);
 -	ghWindowList = WindowList_Create();
 +	g_hWindowList = WindowList_Create();
  	// check whether changing my details via UserInfoEx is basically possible
  	myGlobals.CanChangeDetails = FALSE;
 @@ -821,7 +821,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar  			// show the first propsheetpage
  			//
  			// finally add the dialog to the window list
 -			WindowList_Add(ghWindowList, hDlg, pPs->hContact);
 +			WindowList_Add(g_hWindowList, hDlg, pPs->hContact);
  			// show the dialog
  			pPs->dwFlags &= ~PSF_LOCKED;
 @@ -1615,7 +1615,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar  		ResetUpdateInfo(pPs);
  		// avoid any further message processing for this dialog page
 -		WindowList_Remove(ghWindowList, hDlg);
 +		WindowList_Remove(g_hWindowList, hDlg);
  		SetUserData(hDlg, NULL);
  		// unhook events and stop timers
 diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index eba9346537..02e61c82d2 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -37,8 +37,7 @@ HWND hPopupWindow;  HANDLE hHookWeatherUpdated;
  HANDLE hHookWeatherError;
 -HANDLE hDataWindowList;
 -HANDLE hWindowList;
 +MWindowList hDataWindowList, hWindowList;
  HANDLE hUpdateMutex;
 diff --git a/plugins/Weather/src/weather.h b/plugins/Weather/src/weather.h index 77550391bc..182fb07cd9 100644 --- a/plugins/Weather/src/weather.h +++ b/plugins/Weather/src/weather.h @@ -363,11 +363,12 @@ extern MYOPTIONS opt;  extern unsigned status;
  extern unsigned old_status;
 -extern HANDLE hDataWindowList;
 +extern MWindowList hDataWindowList;
 +extern MWindowList hWindowList;
 +
  extern HANDLE hNetlibUser, hNetlibHttp;
  extern HANDLE hHookWeatherUpdated;
  extern HANDLE hHookWeatherError;
 -extern HANDLE hWindowList;
  extern HANDLE hTBButton;
  extern UINT_PTR timerId;
  extern HANDLE hUpdateMutex;
 @@ -546,6 +547,6 @@ void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact);  INT_PTR CALLBACK DlgProcBrief(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  void InitIcons(void);
 -HICON  LoadIconEx(const char* name, BOOL big);
 +HICON  LoadIconEx(const char* name, bool big);
  HANDLE GetIconHandle(const char* name);
  void   ReleaseIconEx(HICON hIcon);
 diff --git a/plugins/Weather/src/weather_icons.cpp b/plugins/Weather/src/weather_icons.cpp index 74a25ffbe8..e4b548b37c 100644 --- a/plugins/Weather/src/weather_icons.cpp +++ b/plugins/Weather/src/weather_icons.cpp @@ -42,7 +42,7 @@ void InitIcons(void)  	Icon_Register(hInst, WEATHERPROTONAME, iconList, SIZEOF(iconList), WEATHERPROTONAME);
  }
 -HICON  LoadIconEx(const char* name, BOOL big)
 +HICON LoadIconEx(const char* name, bool big)
  {
  	char szSettingName[100];
  	mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", WEATHERPROTONAME, name);
 diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 714df36626..7c91da6ffc 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -23,7 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  #define MS_TOOLTIP_SHOWTIP		"mToolTip/ShowTip"
  #define MS_TOOLTIP_HIDETIP		"mToolTip/HideTip"
 -static HANDLE hMwinWindowList;
 +static MWindowList hMwinWindowList;
  static HANDLE hFontHook;
  HGENMENU hMwinMenu;
 diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 1e3ff4bd07..a9981b30fe 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -23,8 +23,8 @@  #include "stdafx.h"
  #include "webview.h"
 +MWindowList hWindowList;
  HANDLE hNetlibUser;
 -HANDLE hWindowList;
  HANDLE hHookDisplayDataAlert, hHookAlertPopup, hHookAlertWPopup, hHookErrorPopup, hHookAlertOSD;
  int    hLangpack = 0;
 diff --git a/plugins/WebView/src/webview.h b/plugins/WebView/src/webview.h index eea8f08c03..b78c165caf 100644 --- a/plugins/WebView/src/webview.h +++ b/plugins/WebView/src/webview.h @@ -144,7 +144,8 @@ extern HWND ContactHwnd;  extern HINSTANCE hInst;
  extern HMENU hMenu;
  extern int bpStatus;
 -extern HANDLE hNetlibUser, hWindowList;
 +extern HANDLE hNetlibUser;
 +extern MWindowList hWindowList;
  extern HANDLE hMenuItem1, hMenuItemCountdown;
  extern char optionsname[80];
 diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp index dd7984dd90..6560ce3bd2 100644 --- a/plugins/WhenWasIt/src/WhenWasIt.cpp +++ b/plugins/WhenWasIt/src/WhenWasIt.cpp @@ -24,7 +24,7 @@ char ModuleName[] = "WhenWasIt";  HINSTANCE hInstance;
  HWND hBirthdaysDlg = NULL;
  HWND hUpcomingDlg = NULL;
 -HANDLE hAddBirthdayWndsList = NULL;
 +MWindowList hAddBirthdayWndsList = NULL;
  int hLangpack;
  HANDLE hmCheckBirthdays = NULL;
 diff --git a/plugins/WhenWasIt/src/commonheaders.h b/plugins/WhenWasIt/src/commonheaders.h index a0435abcc1..1bf7b34c5a 100644 --- a/plugins/WhenWasIt/src/commonheaders.h +++ b/plugins/WhenWasIt/src/commonheaders.h @@ -66,7 +66,7 @@ extern char ModuleName[];  extern HINSTANCE hInstance;
  extern HWND hBirthdaysDlg;
  extern HWND hUpcomingDlg;
 -extern HANDLE hAddBirthdayWndsList;
 +extern MWindowList hAddBirthdayWndsList;
  struct CommonData{
  	DWORD foreground;
 diff --git a/plugins/XSoundNotify/src/Common.h b/plugins/XSoundNotify/src/Common.h index 4cbed8f0fb..2f31a6276e 100644 --- a/plugins/XSoundNotify/src/Common.h +++ b/plugins/XSoundNotify/src/Common.h @@ -39,7 +39,7 @@ struct XSN_Data  extern LIST<XSN_Data> XSN_Users;
  extern HINSTANCE hInst;
 -extern HANDLE hChangeSoundDlgList;
 +extern MWindowList hChangeSoundDlgList;
  extern BYTE isIgnoreSound, isOwnSound;
  bool IsSuitableProto(PROTOACCOUNT *pa);
 diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 3cfe906eec..7a857a1b59 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -13,7 +13,7 @@ HINSTANCE hInst;  int hLangpack;
  LIST<XSN_Data> XSN_Users(10, NumericKeySortT);
  HGENMENU hChangeSound = NULL;
 -HANDLE hChangeSoundDlgList = NULL;
 +MWindowList hChangeSoundDlgList = NULL;
  BYTE isIgnoreSound = 0, isOwnSound = 0;
  CHAT_MANAGER *pci;
 diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index d56c93f3eb..4a2a341cfc 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -220,7 +220,7 @@ static void LoadPlugins()  				continue;  			// we have a dot -			int len = mir_tstrlen(fd.cFileName); // find the length of the string +			int len = (int)mir_tstrlen(fd.cFileName); // find the length of the string  			TCHAR* end = fd.cFileName+len; // get a pointer to the NULL  			int safe = (end-dot)-1;	// figure out how many chars after the dot are "safe", not including NULL | 
