diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-21 14:08:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-21 14:08:42 +0000 |
commit | b4523bc74a6afcc0428034f8b2726e1b2e226475 (patch) | |
tree | f08f1338e76d8bc3c63958050589b7dbf293f8a7 | |
parent | fece4176cb07bfe47dd5091a9c0eb6d69a6a107e (diff) |
- fix for the Netlib_Logf event
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@1623 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
23 files changed, 343 insertions, 342 deletions
diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib Binary files differindex 447d28d1e7..ec7f9a8692 100644 --- a/bin10/lib/mir_core.lib +++ b/bin10/lib/mir_core.lib diff --git a/src/core/miranda.h b/src/core/miranda.h index 169b8d5db4..b74a85b5f9 100644 --- a/src/core/miranda.h +++ b/src/core/miranda.h @@ -256,5 +256,6 @@ public: extern "C"
{
MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX* pInfo);
+ MIR_CORE_DLL(int) GetSubscribersCount(HANDLE hHook);
MIR_CORE_DLL(void) db_setCurrent(MIDatabase* _db);
};
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def index 66324ec1ed..0a13752fff 100644 --- a/src/mir_core/mir_core.def +++ b/src/mir_core/mir_core.def @@ -130,3 +130,4 @@ db_setCurrent @127 CmdLine_GetOption @128
CmdLine_Parse @129
Utf8CheckString @130
+GetSubscribersCount @131
diff --git a/src/mir_core/modules.cpp b/src/mir_core/modules.cpp index 794af53e74..4e9a518d26 100644 --- a/src/mir_core/modules.cpp +++ b/src/mir_core/modules.cpp @@ -275,6 +275,15 @@ MIR_CORE_DLL(int) NotifyEventHooks(HANDLE hEvent, WPARAM wParam, LPARAM lParam) return item->result;
}
+extern "C" MIR_CORE_DLL(int) GetSubscribersCount(THook* pHook)
+{
+ switch ( checkHook(pHook)) {
+ case hookInvalid:
+ case hookEmpty: return 0;
+ }
+ return pHook->subscriberCount;
+}
+
static HANDLE HookEventInt(int type, const char* name, MIRANDAHOOK hookProc, void* object, LPARAM lParam)
{
mir_cslock lck(csHooks);
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp index 30ed412bda..bddf1ffc6c 100644 --- a/src/modules/addcontact/addcontact.cpp +++ b/src/modules/addcontact/addcontact.cpp @@ -109,18 +109,18 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp DWORD flags = (acs->szProto) ? CallProtoServiceInt(NULL,acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
if (flags&PF4_FORCEADDED) { // force you were added requests for this protocol
- EnableWindow(GetDlgItem(hdlg, IDC_ADDED), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_ADDED), FALSE);
}
if (flags&PF4_FORCEAUTH) { // force auth requests for this protocol
- EnableWindow(GetDlgItem(hdlg, IDC_AUTH), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTH), FALSE);
}
if (flags&PF4_NOCUSTOMAUTH) {
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHGB), FALSE);
}
else {
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), IsDlgButtonChecked(hdlg, IDC_AUTH));
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), IsDlgButtonChecked(hdlg, IDC_AUTH));
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHREQ), IsDlgButtonChecked(hdlg, IDC_AUTH));
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHGB), IsDlgButtonChecked(hdlg, IDC_AUTH));
SetDlgItemText(hdlg, IDC_AUTHREQ, TranslateT("Please authorize my request and add me to your contact list."));
}
}
@@ -135,12 +135,12 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp {
DWORD flags = CallProtoServiceInt(NULL,acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH) {
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHGB), FALSE);
}
else {
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), IsDlgButtonChecked(hdlg, IDC_AUTH));
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), IsDlgButtonChecked(hdlg, IDC_AUTH));
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHREQ), IsDlgButtonChecked(hdlg, IDC_AUTH));
+ EnableWindow( GetDlgItem(hdlg, IDC_AUTHGB), IsDlgButtonChecked(hdlg, IDC_AUTH));
}
}
break;
@@ -171,7 +171,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp break;
TCHAR szHandle[256];
- if (GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, SIZEOF(szHandle)))
+ if ( GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, SIZEOF(szHandle)))
DBWriteContactSettingTString(hContact, "CList", "MyHandle", szHandle);
int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index bdb0fe356c..04e7fe9b3a 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -145,7 +145,7 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP mir_sntprintf(szFinal, SIZEOF(szFinal), szFormat, cli.pfnGetContactDisplayName((HANDLE)lParam, 0));
SetDlgItemText(hWnd, IDC_TOPLINE, szFinal);
}
- SetFocus(GetDlgItem(hWnd, IDNO));
+ SetFocus( GetDlgItem(hWnd, IDNO));
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
break;
case WM_COMMAND:
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp index b60bbbd5de..38fb4d0788 100644 --- a/src/modules/clist/contacts.cpp +++ b/src/modules/clist/contacts.cpp @@ -366,7 +366,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara dat = (struct ContactOptionsData*)mir_alloc(sizeof(struct ContactOptionsData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
dat->dragging = 0;
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE)|TVS_NOHSCROLL);
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE, GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_NAMEORDER), GWL_STYLE)|TVS_NOHSCROLL);
{ TVINSERTSTRUCT tvis;
int i;
tvis.hParent = NULL;
@@ -375,7 +375,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara for (i=0; i < SIZEOF(nameOrderDescr); i++) {
tvis.item.lParam = nameOrder[i];
tvis.item.pszText = TranslateTS(nameOrderDescr[ nameOrder[i]]);
- TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis);
+ TreeView_InsertItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis);
} }
return TRUE;
}
@@ -391,13 +391,13 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara cws.value.type = DBVT_BLOB;
cws.value.cpbVal = SIZEOF(nameOrderDescr);
cws.value.pbVal = nameOrder;
- tvi.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_NAMEORDER));
+ tvi.hItem = TreeView_GetRoot( GetDlgItem(hwndDlg, IDC_NAMEORDER));
i=0;
while (tvi.hItem != NULL) {
tvi.mask = TVIF_PARAM | TVIF_HANDLE;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
nameOrder[i++] = (BYTE)tvi.lParam;
- tvi.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_NAMEORDER), tvi.hItem);
+ tvi.hItem = TreeView_GetNextSibling( GetDlgItem(hwndDlg, IDC_NAMEORDER), tvi.hItem);
}
CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cws);
CallService(MS_CLIST_INVALIDATEDISPLAYNAME, (WPARAM)INVALID_HANDLE_VALUE, 0);
@@ -411,7 +411,7 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara SetCapture(hwndDlg);
dat->dragging = 1;
dat->hDragItem = ((LPNMTREEVIEW)lParam)->itemNew.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
}
break;
}
@@ -422,23 +422,23 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
- hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_NAMEORDER), hti.hItem, 1);
+ hti.pt.y-=TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_NAMEORDER), hti.hItem, 1);
}
else {
if (hti.flags&TVHT_ABOVE) SendDlgItemMessage(hwndDlg, IDC_NAMEORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
if (hti.flags&TVHT_BELOW) SendDlgItemMessage(hwndDlg, IDC_NAMEORDER, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
}
}
break;
case WM_LBUTTONUP:
if ( !dat->dragging) break;
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_NAMEORDER), NULL, 0);
dat->dragging = 0;
ReleaseCapture();
{ TVHITTESTINFO hti;
@@ -446,13 +446,13 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
- hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti.pt);
+ hti.pt.y-=TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_NAMEORDER))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_NAMEORDER), &hti);
if (dat->hDragItem == hti.hItem) break;
tvi.mask = TVIF_HANDLE|TVIF_PARAM;
tvi.hItem = hti.hItem;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvi);
if (tvi.lParam == SIZEOF(nameOrderDescr)-1) break;
if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
TVINSERTSTRUCT tvis;
@@ -462,11 +462,11 @@ static INT_PTR CALLBACK ContactOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara tvis.item.pszText = name;
tvis.item.cchTextMax = SIZEOF(name);
tvis.item.hItem = dat->hDragItem;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis.item);
- TreeView_DeleteItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis.item);
+ TreeView_DeleteItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), dat->hDragItem);
tvis.hParent = NULL;
tvis.hInsertAfter = hti.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis));
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), TreeView_InsertItem( GetDlgItem(hwndDlg, IDC_NAMEORDER), &tvis));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
}
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 0e45e8efa0..9da91f314d 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -203,12 +203,12 @@ static int InsertSeparator(HWND hwndDlg) static void FreeTreeData(HWND hwndDlg)
{
- HTREEITEM hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ HTREEITEM hItem = TreeView_GetRoot( GetDlgItem(hwndDlg, IDC_MENUITEMS));
while (hItem != NULL) {
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_PARAM;
tvi.hItem = hItem;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
{ MenuItemOptData* O = (MenuItemOptData *)tvi.lParam;
if (O->name) mir_free(O->name);
if (O->defname) mir_free(O->defname);
@@ -217,9 +217,9 @@ static void FreeTreeData(HWND hwndDlg) }
tvi.lParam = 0;
- TreeView_SetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_SetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
- hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_MENUITEMS), hItem);
+ hItem = TreeView_GetNextSibling( GetDlgItem(hwndDlg, IDC_MENUITEMS), hItem);
} }
static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread)
@@ -228,7 +228,7 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) char buf[256];
FreeTreeData(hwndDlg);
- TreeView_DeleteAllItems(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ TreeView_DeleteAllItems( GetDlgItem(hwndDlg, IDC_MENUITEMS));
int menupos = GetMenuObjbyId(MenuObjectId);
if (menupos == -1)
@@ -319,7 +319,7 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) HTREEITEM hti = (HTREEITEM)SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, TVM_INSERTITEM, 0, (LPARAM)&tvis);
if (first) {
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), hti);
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), hti);
first = FALSE;
}
@@ -328,9 +328,9 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, WM_SETREDRAW, TRUE, 0);
mir_free(PDar);
- ShowWindow(GetDlgItem(hwndDlg, IDC_NOTSUPPORTWARNING), (pimo->m_bUseUserDefinedItems) ? SW_HIDE : SW_SHOW);
- EnableWindow(GetDlgItem(hwndDlg, IDC_MENUITEMS), pimo->m_bUseUserDefinedItems);
- EnableWindow(GetDlgItem(hwndDlg, IDC_INSERTSEPARATOR), pimo->m_bUseUserDefinedItems);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_NOTSUPPORTWARNING), (pimo->m_bUseUserDefinedItems) ? SW_HIDE : SW_SHOW);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_MENUITEMS), pimo->m_bUseUserDefinedItems);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_INSERTSEPARATOR), pimo->m_bUseUserDefinedItems);
return 1;
}
@@ -388,7 +388,7 @@ LRESULT CALLBACK LBTNDOWNProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
// ClientToScreen(hwndDlg, &hti.pt);
- // ScreenToClient(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
+ // ScreenToClient( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
TreeView_HitTest(hwnd, &hti);
if (hti.flags&TVHT_ONITEMLABEL) {
/// LabelClicked Set/unset selection
@@ -423,18 +423,18 @@ LRESULT CALLBACK LBTNDOWNProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- struct OrderData *dat = (struct OrderData*)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA);
+ struct OrderData *dat = (struct OrderData*)GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA);
LPNMHDR hdr;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
dat = (struct OrderData*)mir_alloc(sizeof(struct OrderData));
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA, (LONG_PTR)dat);
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_USERDATA, (LONG_PTR)dat);
dat->dragging = 0;
dat->iInitMenuValue = DBGetContactSettingByte(NULL, "CList", "MoveProtoMenus", TRUE);
- MyOldWindowProc = (WNDPROC)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC);
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC, (LONG_PTR)&LBTNDOWNProc);
+ MyOldWindowProc = (WNDPROC)GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC);
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_MENUITEMS), GWLP_WNDPROC, (LONG_PTR)&LBTNDOWNProc);
{
HIMAGELIST himlCheckBoxes;
himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
@@ -443,8 +443,8 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_NOTICK);
ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_TICK);
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_MENUOBJECTS), himlCheckBoxes, TVSIL_NORMAL);
- TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_MENUITEMS), himlCheckBoxes, TVSIL_NORMAL);
+ TreeView_SetImageList( GetDlgItem(hwndDlg, IDC_MENUOBJECTS), himlCheckBoxes, TVSIL_NORMAL);
+ TreeView_SetImageList( GetDlgItem(hwndDlg, IDC_MENUITEMS), himlCheckBoxes, TVSIL_NORMAL);
}
CheckDlgButton(hwndDlg, dat->iInitMenuValue ? IDC_RADIO2 : IDC_RADIO1, TRUE);
CheckDlgButton(hwndDlg, IDC_DISABLEMENUICONS, bIconsDisabled);
@@ -476,13 +476,13 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA HTREEITEM hti;
MenuItemOptData *iod;
- hti = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ hti = TreeView_GetSelection( GetDlgItem(hwndDlg, IDC_MENUITEMS));
if (hti == NULL)
break;
tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
tvi.hItem = hti;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
iod = (MenuItemOptData *)tvi.lParam;
if (iod->name && _tcsstr(iod->name, STR_SEPARATOR))
@@ -504,7 +504,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TCHAR buf[256];
MenuItemOptData *iod;
- HTREEITEM hti = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem(hwndDlg, IDC_MENUITEMS));
if (hti == NULL)
break;
@@ -557,7 +557,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA switch (hdr->code) {
case NM_CUSTOMDRAW:
{
- int i = handleCustomDraw(GetDlgItem(hwndDlg, IDC_MENUITEMS), (LPNMTVCUSTOMDRAW) lParam);
+ int i = handleCustomDraw( GetDlgItem(hwndDlg, IDC_MENUITEMS), (LPNMTVCUSTOMDRAW) lParam);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, i);
return TRUE;
}
@@ -566,7 +566,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetCapture(hwndDlg);
dat->dragging = 1;
dat->hDragItem = ((LPNMTREEVIEW)lParam)->itemNew.hItem;
- TreeView_SelectItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), dat->hDragItem);
+ TreeView_SelectItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), dat->hDragItem);
break;
case NM_CLICK:
@@ -588,7 +588,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
//all changes take effect in runtime
- //ShowWindow(GetDlgItem(hwndDlg, IDC_BUTTONORDERTREEWARNING), SW_SHOW);
+ //ShowWindow( GetDlgItem(hwndDlg, IDC_BUTTONORDERTREEWARNING), SW_SHOW);
}
/*--------MultiSelection----------*/
if (hti.flags&TVHT_ONITEMLABEL) {
@@ -649,17 +649,17 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetDlgItemTextA(hwndDlg, IDC_GENMENU_CUSTOMNAME, "");
SetDlgItemTextA(hwndDlg, IDC_GENMENU_SERVICE, "");
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_SET), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_SET), FALSE);
- hti = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_MENUITEMS));
+ hti = TreeView_GetSelection( GetDlgItem(hwndDlg, IDC_MENUITEMS));
if (hti == NULL)
break;
tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
tvi.hItem = hti;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_MENUITEMS), &tvi);
if (tvi.lParam == 0)
break;
@@ -674,9 +674,9 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (iod->pimi->submenu.first == NULL && iod->uniqname)
SetDlgItemTextA(hwndDlg, IDC_GENMENU_SERVICE, iod->uniqname);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), lstrcmp(iod->name, iod->defname) != 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_SET), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), lstrcmp(iod->name, iod->defname) != 0);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_SET), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), TRUE);
break;
}
break;
@@ -691,21 +691,21 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
HTREEITEM it = hti.hItem;
- hti.pt.y -= TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
+ hti.pt.y -= TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
if ( !(hti.flags&TVHT_ABOVE))
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), hti.hItem, 1);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), hti.hItem, 1);
else
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), it, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), it, 0);
}
else {
if (hti.flags&TVHT_ABOVE) SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
if (hti.flags&TVHT_BELOW) SendDlgItemMessage(hwndDlg, IDC_MENUITEMS, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
} }
break;
@@ -713,7 +713,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if ( !dat->dragging)
break;
- TreeView_SetInsertMark(GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
+ TreeView_SetInsertMark( GetDlgItem(hwndDlg, IDC_MENUITEMS), NULL, 0);
dat->dragging = 0;
ReleaseCapture();
{
@@ -721,9 +721,9 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA hti.pt.x = (short)LOWORD(lParam);
hti.pt.y = (short)HIWORD(lParam);
ClientToScreen(hwndDlg, &hti.pt);
- ScreenToClient(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
- hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
- TreeView_HitTest(GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
+ ScreenToClient( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti.pt);
+ hti.pt.y-=TreeView_GetItemHeight( GetDlgItem(hwndDlg, IDC_MENUITEMS))/2;
+ TreeView_HitTest( GetDlgItem(hwndDlg, IDC_MENUITEMS), &hti);
if (hti.flags&TVHT_ABOVE) hti.hItem = TVI_FIRST;
if (dat->hDragItem == hti.hItem) break;
dat->hDragItem = NULL;
@@ -776,7 +776,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (dat)
mir_free(dat);
- ImageList_Destroy(TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_MENUOBJECTS), NULL, TVSIL_NORMAL));
+ ImageList_Destroy(TreeView_SetImageList( GetDlgItem(hwndDlg, IDC_MENUOBJECTS), NULL, TVSIL_NORMAL));
FreeTreeData(hwndDlg);
break;
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 2021311a7b..8d29ef9c96 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -131,8 +131,8 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA // what, no plugins?!
if (arDbPlugins.getCount() == 0) {
EnableWindow(hwndCombo, FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILENAME), FALSE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_NODBDRIVERS), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_PROFILENAME), FALSE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_NODBDRIVERS), TRUE);
}
else {
for (int i=0; i < arDbPlugins.getCount(); i++) {
@@ -171,12 +171,12 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA return TRUE;
case WM_FOCUSTEXTBOX:
- SetFocus(GetDlgItem(hwndDlg, IDC_PROFILENAME));
+ SetFocus( GetDlgItem(hwndDlg, IDC_PROFILENAME));
break;
case WM_INPUTCHANGED: // when input in the edit box changes
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- EnableWindow(dat->hwndOK, GetWindowTextLength(GetDlgItem(hwndDlg, IDC_PROFILENAME)) > 0);
+ EnableWindow(dat->hwndOK, GetWindowTextLength( GetDlgItem(hwndDlg, IDC_PROFILENAME)) > 0);
break;
case WM_SHOWWINDOW:
@@ -550,17 +550,17 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, tci.pszText = (TCHAR*)odp[i].ptszTitle;
if (dat->prof->pd->noProfiles || shouldAutoCreate(dat->prof->pd->szProfile))
dat->currentPage = 1;
- TabCtrl_InsertItem(GetDlgItem(hwndDlg, IDC_TABS), i, &tci);
+ TabCtrl_InsertItem( GetDlgItem(hwndDlg, IDC_TABS), i, &tci);
}
- GetWindowRect(GetDlgItem(hwndDlg, IDC_TABS), &dat->rcDisplay);
- TabCtrl_AdjustRect(GetDlgItem(hwndDlg, IDC_TABS), FALSE, &dat->rcDisplay);
+ GetWindowRect( GetDlgItem(hwndDlg, IDC_TABS), &dat->rcDisplay);
+ TabCtrl_AdjustRect( GetDlgItem(hwndDlg, IDC_TABS), FALSE, &dat->rcDisplay);
POINT pt = {0, 0};
ClientToScreen(hwndDlg, &pt);
OffsetRect(&dat->rcDisplay, -pt.x, -pt.y);
- TabCtrl_SetCurSel(GetDlgItem(hwndDlg, IDC_TABS), dat->currentPage);
+ TabCtrl_SetCurSel( GetDlgItem(hwndDlg, IDC_TABS), dat->currentPage);
dat->opd[dat->currentPage].hwnd = CreateDialogIndirectParam(dat->opd[dat->currentPage].hInst, dat->opd[dat->currentPage].pTemplate, hwndDlg, dat->opd[dat->currentPage].dlgProc, (LPARAM)dat->prof);
ThemeDialogBackground(dat->opd[dat->currentPage].hwnd);
SetWindowPos(dat->opd[dat->currentPage].hwnd, HWND_TOP, dat->rcDisplay.left, dat->rcDisplay.top, 0, 0, SWP_NOSIZE);
@@ -574,8 +574,8 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, // service mode combobox
if (servicePlugins.getCount() == 0) {
- ShowWindow(GetDlgItem(hwndDlg, IDC_SM_LABEL), FALSE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_SM_COMBO), FALSE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_SM_LABEL), FALSE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_SM_COMBO), FALSE);
}
else {
HWND hwndCombo = GetDlgItem(hwndDlg, IDC_SM_COMBO);
@@ -642,7 +642,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, if (dat->currentPage != -1 && dat->opd[dat->currentPage].hwnd != NULL)
ShowWindow(dat->opd[ dat->currentPage ].hwnd, SW_HIDE);
- dat->currentPage = TabCtrl_GetCurSel(GetDlgItem(hwndDlg, IDC_TABS));
+ dat->currentPage = TabCtrl_GetCurSel( GetDlgItem(hwndDlg, IDC_TABS));
if (dat->currentPage != -1) {
if (dat->opd[dat->currentPage].hwnd == NULL) {
PSHNOTIFY pshn;
@@ -709,7 +709,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, pshn.hdr.hwndFrom = dat->opd[i].hwnd;
SendMessage(dat->opd[i].hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
if (GetWindowLongPtr(dat->opd[i].hwnd, DWLP_MSGRESULT) == PSNRET_INVALID_NOCHANGEPAGE) {
- TabCtrl_SetCurSel(GetDlgItem(hwndDlg, IDC_TABS), i);
+ TabCtrl_SetCurSel( GetDlgItem(hwndDlg, IDC_TABS), i);
if (dat->currentPage != -1)
ShowWindow(dat->opd[ dat->currentPage ].hwnd, SW_HIDE);
dat->currentPage = i;
diff --git a/src/modules/findadd/findadd.cpp b/src/modules/findadd/findadd.cpp index da55c76cff..7e7732aca1 100644 --- a/src/modules/findadd/findadd.cpp +++ b/src/modules/findadd/findadd.cpp @@ -184,7 +184,7 @@ static void StopThrobber(HWND hwndDlg, struct FindAddDlgData *dat) KillTimer(hwndDlg, TIMERID_THROBBER);
dat->throbbing = 0;
dat->pivot = 0;
- InvalidateRect(GetDlgItem(hwndDlg, IDC_STATUSBAR), NULL, FALSE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_STATUSBAR), NULL, FALSE);
}
static void ShowAdvancedSearchDlg(HWND hwndDlg, struct FindAddDlgData *dat)
@@ -195,7 +195,7 @@ static void ShowAdvancedSearchDlg(HWND hwndDlg, struct FindAddDlgData *dat) if (dat->hwndAdvSearch == NULL) {
RECT rc;
dat->hwndAdvSearch = (HWND)CallProtoServiceInt(NULL,szProto, PS_CREATEADVSEARCHUI, 0, (LPARAM)hwndDlg);
- GetWindowRect(GetDlgItem(hwndDlg, IDC_RESULTS), &rc);
+ GetWindowRect( GetDlgItem(hwndDlg, IDC_RESULTS), &rc);
SetWindowPos(dat->hwndAdvSearch, 0, rc.left, rc.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
}
if (animateWindow) {
@@ -211,13 +211,13 @@ static void ReposTinySearchDlg(HWND hwndDlg, struct FindAddDlgData *dat) RECT rc;
RECT clientRect;
POINT pt = {0, 0};
- GetWindowRect(GetDlgItem(hwndDlg, IDC_TINYEXTENDEDGROUP), &rc);
+ GetWindowRect( GetDlgItem(hwndDlg, IDC_TINYEXTENDEDGROUP), &rc);
GetWindowRect(dat->hwndTinySearch, &clientRect);
pt.x = rc.left;
pt.y = rc.top;
ScreenToClient(hwndDlg, &pt);
SetWindowPos(dat->hwndTinySearch, 0, pt.x+5, pt.y+15, rc.right-rc.left-10, rc.bottom-rc.top-30, SWP_NOZORDER);
- //SetWindowPos(GetDlgItem(hwndDlg, IDC_TINYEXTENDEDGROUP), 0, 0, 0, rc.right-rc.left, clientRect.bottom-clientRect.top+20, SWP_NOMOVE|SWP_NOZORDER);
+ //SetWindowPos( GetDlgItem(hwndDlg, IDC_TINYEXTENDEDGROUP), 0, 0, 0, rc.right-rc.left, clientRect.bottom-clientRect.top+20, SWP_NOMOVE|SWP_NOZORDER);
} }
static void ShowTinySearchDlg(HWND hwndDlg, struct FindAddDlgData *dat)
@@ -245,8 +245,8 @@ static void HideAdvancedSearchDlg(HWND hwndDlg, struct FindAddDlgData *dat) void EnableResultButtons(HWND hwndDlg, int enable)
{
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), enable || IsDlgButtonChecked(hwndDlg, IDC_BYPROTOID));
- EnableWindow(GetDlgItem(hwndDlg, IDC_MOREOPTIONS), enable);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ADD), enable || IsDlgButtonChecked(hwndDlg, IDC_BYPROTOID));
+ EnableWindow( GetDlgItem(hwndDlg, IDC_MOREOPTIONS), enable);
}
static void CheckSearchTypeRadioButton(HWND hwndDlg, int idControl)
@@ -317,18 +317,18 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP SIZE textSize;
HDC hdc;
- hdc = GetDC(GetDlgItem(hwndDlg, IDC_STATUSBAR));
+ hdc = GetDC( GetDlgItem(hwndDlg, IDC_STATUSBAR));
SelectObject(hdc, (HFONT)SendDlgItemMessage(hwndDlg, IDC_STATUSBAR, WM_GETFONT, 0, 0));
GetTextExtentPoint32(hdc, TranslateT("Searching"), lstrlen(TranslateT("Searching")), &textSize);
partWidth[0] = textSize.cx;
GetTextExtentPoint32(hdc, _T("01234567890123456789"), 20, &textSize);
partWidth[0]+=textSize.cx;
- ReleaseDC(GetDlgItem(hwndDlg, IDC_STATUSBAR), hdc);
+ ReleaseDC( GetDlgItem(hwndDlg, IDC_STATUSBAR), hdc);
partWidth[1] = partWidth[0]+150;
partWidth[2] = -1;
SendDlgItemMessage(hwndDlg, IDC_STATUSBAR, SB_SETPARTS, SIZEOF(partWidth), (LPARAM)partWidth);
SendDlgItemMessage(hwndDlg, IDC_STATUSBAR, SB_SETTEXT, 1|SBT_OWNERDRAW, 0);
- SetStatusBarSearchInfo(GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
+ SetStatusBarSearchInfo( GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
}
{
TCHAR *szProto = NULL;
@@ -426,13 +426,13 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP GetWindowRect(hwndList, &rc);
GetWindowRect(hwndDlg, &rc2);
mmi->ptMinTrackSize.x = rc.left-rc2.left+10+GetSystemMetrics(SM_CXFRAME);
- GetClientRect(GetDlgItem(hwndDlg, IDC_MOREOPTIONS), &rc);
+ GetClientRect( GetDlgItem(hwndDlg, IDC_MOREOPTIONS), &rc);
mmi->ptMinTrackSize.x+=rc.right+5;
- GetClientRect(GetDlgItem(hwndDlg, IDC_ADD), &rc);
+ GetClientRect( GetDlgItem(hwndDlg, IDC_ADD), &rc);
mmi->ptMinTrackSize.x+=rc.right+5;
- GetClientRect(GetDlgItem(hwndDlg, IDC_STATUSBAR), &rc);
+ GetClientRect( GetDlgItem(hwndDlg, IDC_STATUSBAR), &rc);
mmi->ptMinTrackSize.y = dat->minDlgHeight+20+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYFRAME);
- GetClientRect(GetDlgItem(hwndDlg, IDC_STATUSBAR), &rc);
+ GetClientRect( GetDlgItem(hwndDlg, IDC_STATUSBAR), &rc);
mmi->ptMinTrackSize.y+=rc.bottom;
return 0;
}
@@ -478,8 +478,8 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP #endif
}
else SetDlgItemText(hwndDlg, IDC_BYPROTOID, TranslateT("Handle"));
- if (protoCaps&PF1_NUMERICUSERID) SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE)|ES_NUMBER);
- else SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE)&~ES_NUMBER);
+ if (protoCaps&PF1_NUMERICUSERID) SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE, GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE)|ES_NUMBER);
+ else SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE, GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_PROTOID), GWL_STYLE)&~ES_NUMBER);
}
}
@@ -491,7 +491,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP dat->hwndTinySearch = NULL;
} }
-#define en(id, t) ShowWindow(GetDlgItem(hwndDlg, IDC_##id), dat->show##t?SW_SHOW:SW_HIDE)
+#define en(id, t) ShowWindow( GetDlgItem(hwndDlg, IDC_##id), dat->show##t?SW_SHOW:SW_HIDE)
en(PROTOIDGROUP, ProtoId); en(BYPROTOID, ProtoId); en(PROTOID, ProtoId);
en(EMAILGROUP, Email); en(BYEMAIL, Email); en(EMAIL, Email);
en(NAMEGROUP, Name); en(BYNAME, Name);
@@ -530,9 +530,9 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage(hwndDlg, IDC_STATUSBAR, SB_GETBORDERS, 0, (LPARAM)borders);
SendDlgItemMessage(hwndDlg, IDC_STATUSBAR, SB_GETRECT, 1, (LPARAM)&rc);
InflateRect(&rc, -borders[2]/2, -borders[1]/2);
- hdc = GetDC(GetDlgItem(hwndDlg, IDC_STATUSBAR));
+ hdc = GetDC( GetDlgItem(hwndDlg, IDC_STATUSBAR));
RenderThrobber(hdc, &rc, &dat->throbbing, &dat->pivot);
- ReleaseDC(GetDlgItem(hwndDlg, IDC_STATUSBAR), hdc);
+ ReleaseDC( GetDlgItem(hwndDlg, IDC_STATUSBAR), hdc);
}
break;
case WM_DRAWITEM:
@@ -595,19 +595,19 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
break;
case IDC_BYPROTOID:
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ADD), TRUE);
HideAdvancedSearchDlg(hwndDlg, dat);
break;
case IDC_BYEMAIL:
case IDC_BYNAME:
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), ListView_GetSelectedCount(hwndList) > 0);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ADD), ListView_GetSelectedCount(hwndList) > 0);
HideAdvancedSearchDlg(hwndDlg, dat);
break;
case IDC_PROTOID:
if (HIWORD(wParam) == EN_CHANGE) {
HideAdvancedSearchDlg(hwndDlg, dat);
CheckSearchTypeRadioButton(hwndDlg, IDC_BYPROTOID);
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ADD), TRUE);
}
break;
case IDC_EMAIL:
@@ -625,7 +625,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
break;
case IDC_ADVANCED:
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), ListView_GetSelectedCount(hwndList) > 0);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ADD), ListView_GetSelectedCount(hwndList) > 0);
if (IsDlgButtonChecked(hwndDlg, IDC_ADVANCED))
ShowAdvancedSearchDlg(hwndDlg, dat);
else
@@ -644,7 +644,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (dat->search) {mir_free(dat->search); dat->search = NULL;}
dat->searchCount = 0;
StopThrobber(hwndDlg, dat);
- SetStatusBarSearchInfo(GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
+ SetStatusBarSearchInfo( GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
break;
}
char *szProto = (char*)SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETCURSEL, 0, 0), 0);
@@ -703,7 +703,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP FreeSearchResults(hwndList);
CreateResultsColumns(hwndList, dat, szProto);
- SetStatusBarSearchInfo(GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
+ SetStatusBarSearchInfo( GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
SetStatusBarResultInfo(hwndDlg);
StartThrobber(hwndDlg, dat);
SetDlgItemText(hwndDlg, IDOK, TranslateT("Cancel"));
@@ -746,7 +746,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
case IDC_MOREOPTIONS:
{ RECT rc;
- GetWindowRect(GetDlgItem(hwndDlg, IDC_MOREOPTIONS), &rc);
+ GetWindowRect( GetDlgItem(hwndDlg, IDC_MOREOPTIONS), &rc);
ShowMoreOptionsMenu(hwndDlg, rc.left, rc.bottom);
break;
}
@@ -794,7 +794,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP StopThrobber(hwndDlg, dat);
}
ListView_SortItemsEx(hwndList, SearchResultsCompareFunc, (LPARAM)hwndDlg);
- SetStatusBarSearchInfo(GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
+ SetStatusBarSearchInfo( GetDlgItem(hwndDlg, IDC_STATUSBAR), dat);
}
else if (ack->result == ACKRESULT_SEARCHRESULT && ack->lParam) {
diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp index 6addad0725..40eff6e58a 100644 --- a/src/modules/findadd/searchresults.cpp +++ b/src/modules/findadd/searchresults.cpp @@ -351,10 +351,10 @@ void ShowMoreOptionsMenu(HWND hwndDlg, int x, int y) dat = (struct FindAddDlgData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
{ LVITEM lvi;
- if (ListView_GetSelectedCount(GetDlgItem(hwndDlg, IDC_RESULTS)) != 1) return;
+ if (ListView_GetSelectedCount( GetDlgItem(hwndDlg, IDC_RESULTS)) != 1) return;
lvi.mask = LVIF_PARAM;
- lvi.iItem = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_RESULTS), -1, LVNI_ALL|LVNI_SELECTED);
- ListView_GetItem(GetDlgItem(hwndDlg, IDC_RESULTS), &lvi);
+ lvi.iItem = ListView_GetNextItem( GetDlgItem(hwndDlg, IDC_RESULTS), -1, LVNI_ALL|LVNI_SELECTED);
+ ListView_GetItem( GetDlgItem(hwndDlg, IDC_RESULTS), &lvi);
lsr = (struct ListSearchResult*)lvi.lParam;
}
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index 0ed3aa6911..c0fe7ab0e2 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -259,11 +259,11 @@ UINT_PTR CALLBACK CFHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam CHOOSEFONT* cf = (CHOOSEFONT *)lParam;
TranslateDialogDefault(hdlg);
- ShowWindow(GetDlgItem(hdlg, 1095), SW_HIDE);
+ ShowWindow( GetDlgItem(hdlg, 1095), SW_HIDE);
if (cf && (cf->lCustData & FIDF_DISABLESTYLES)) {
- EnableWindow(GetDlgItem(hdlg, 1137), FALSE);
- ShowWindow(GetDlgItem(hdlg, 1137), SW_HIDE);
- ShowWindow(GetDlgItem(hdlg, 1095), SW_SHOW);
+ EnableWindow( GetDlgItem(hdlg, 1137), FALSE);
+ ShowWindow( GetDlgItem(hdlg, 1137), SW_HIDE);
+ ShowWindow( GetDlgItem(hdlg, 1095), SW_SHOW);
}
return 0;
}
@@ -460,11 +460,11 @@ static void sttFreeListItems(HWND hList) static BOOL ShowEffectButton(HWND hwndDlg, BOOL bShow)
{
- ShowWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), bShow ? SW_HIDE : SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR_STATIC), bShow ? SW_HIDE : SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_BKGCOLOUR), bShow ? SW_HIDE : SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_BKGCOLOUR_STATIC), bShow ? SW_HIDE : SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_EFFECT), bShow ? SW_SHOW : SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_EFFECT_STATIC), bShow ? SW_SHOW : SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_EFFECT), bShow ? SW_SHOW : SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_EFFECT_STATIC), bShow ? SW_SHOW : SW_HIDE);
return TRUE;
}
@@ -603,7 +603,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, FontInternal& F = font_id_list_w2[i];
// sync settings with database
UpdateFontSettings(&F, &F.value);
- sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), F.group, F.hLangpack);
+ sttFsuiCreateSettingsTreeNode( GetDlgItem(hwndDlg, IDC_FONTGROUP), F.group, F.hLangpack);
}
for (i=0; i < colour_id_list_w2.getCount(); i++) {
@@ -611,7 +611,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, // sync settings with database
UpdateColourSettings(&C, &C.value);
- sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), C.group, C.hLangpack);
+ sttFsuiCreateSettingsTreeNode( GetDlgItem(hwndDlg, IDC_FONTGROUP), C.group, C.hLangpack);
}
for (i=0; i < effect_id_list_w2.getCount(); i++) {
@@ -619,7 +619,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, // sync settings with database
UpdateEffectSettings(&E, &E.value);
- sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), E.group, E.hLangpack);
+ sttFsuiCreateSettingsTreeNode( GetDlgItem(hwndDlg, IDC_FONTGROUP), E.group, E.hLangpack);
}
SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETDEFAULTCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOW));
@@ -630,13 +630,13 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, TreeItem *treeItem;
TCHAR *group_buff = NULL;
TVITEM tvi = {0};
- tvi.hItem = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_FONTGROUP));
+ tvi.hItem = TreeView_GetSelection( GetDlgItem(hwndDlg, IDC_FONTGROUP));
tvi.mask = TVIF_HANDLE|TVIF_PARAM;
- TreeView_GetItem(GetDlgItem(hwndDlg, IDC_FONTGROUP), &tvi);
+ TreeView_GetItem( GetDlgItem(hwndDlg, IDC_FONTGROUP), &tvi);
treeItem = (TreeItem *)tvi.lParam;
group_buff = treeItem->groupName;
- sttFreeListItems(GetDlgItem(hwndDlg, IDC_FONTLIST));
+ sttFreeListItems( GetDlgItem(hwndDlg, IDC_FONTLIST));
SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_RESETCONTENT, 0, 0);
if (group_buff) {
@@ -665,7 +665,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, need_restart |= (F.flags & FIDF_NEEDRESTART);
} }
-// ShowWindow(GetDlgItem(hwndDlg, IDC_STAT_RESTART), (need_restart ? SW_SHOW : SW_HIDE));
+// ShowWindow( GetDlgItem(hwndDlg, IDC_STAT_RESTART), (need_restart ? SW_SHOW : SW_HIDE));
if (hBkgColourBrush) {
DeleteObject(hBkgColourBrush);
@@ -679,7 +679,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (first_colour_index == -1)
first_colour_index = colourId;
- if ( !sttFsuiBindColourIdToFonts(GetDlgItem(hwndDlg, IDC_FONTLIST), C.name, C.group, C.name, colourId)) {
+ if ( !sttFsuiBindColourIdToFonts( GetDlgItem(hwndDlg, IDC_FONTLIST), C.name, C.group, C.name, colourId)) {
itemData = (FSUIListItemData*)mir_alloc(sizeof(FSUIListItemData));
itemData->colour_id = colourId;
itemData->font_id = -1;
@@ -702,7 +702,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (first_effect_index == -1)
first_effect_index = effectId;
- if ( !sttFsuiBindEffectIdToFonts(GetDlgItem(hwndDlg, IDC_FONTLIST), E.name, effectId)) {
+ if ( !sttFsuiBindEffectIdToFonts( GetDlgItem(hwndDlg, IDC_FONTLIST), E.name, effectId)) {
itemData = (FSUIListItemData*)mir_alloc(sizeof(FSUIListItemData));
itemData->effect_id = effectId;
itemData->font_id = -1;
@@ -712,16 +712,16 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, } } }
SendDlgItemMessage(hwndDlg, IDC_FONTLIST, WM_SETREDRAW, TRUE, 0);
- UpdateWindow(GetDlgItem(hwndDlg, IDC_FONTLIST));
+ UpdateWindow( GetDlgItem(hwndDlg, IDC_FONTLIST));
SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_SETSEL, TRUE, 0);
SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_FONTLIST, LBN_SELCHANGE), 0);
}
else {
- EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_FONTCOLOUR), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHOOSEFONT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_RESET), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BKGCOLOUR), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_FONTCOLOUR), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_CHOOSEFONT), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_RESET), FALSE);
ShowEffectButton(hwndDlg, FALSE);
}
return TRUE;
@@ -754,7 +754,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, itemName = colour_id_list_w2[iItem].getName();
}
- HDC hdc = GetDC(GetDlgItem(hwndDlg, mis->CtlID));
+ HDC hdc = GetDC( GetDlgItem(hwndDlg, mis->CtlID));
if (hFont)
hoFont = (HFONT) SelectObject(hdc, hFont);
else
@@ -764,7 +764,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, GetTextExtentPoint32(hdc, itemName, lstrlen(itemName), &fontSize);
if (hoFont) SelectObject(hdc, hoFont);
if (hFont) DeleteObject(hFont);
- ReleaseDC(GetDlgItem(hwndDlg, mis->CtlID), hdc);
+ ReleaseDC( GetDlgItem(hwndDlg, mis->CtlID), hdc);
mis->itemWidth = fontSize.cx + 2*FSUI_FONTFRAMEHORZ + 4;
mis->itemHeight = fontSize.cy + 2*FSUI_FONTFRAMEVERT + 4;
return TRUE;
@@ -957,12 +957,12 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, bEnableEffect = 0;
}
- EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), bEnableClBack);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BKGCOLOUR), bEnableClBack);
ShowEffectButton(hwndDlg, bEnableEffect && !bEnableClBack);
- EnableWindow(GetDlgItem(hwndDlg, IDC_FONTCOLOUR), bEnableClText);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHOOSEFONT), bEnableFont);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_RESET), bEnableReset);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_FONTCOLOUR), bEnableClText);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_CHOOSEFONT), bEnableFont);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_RESET), bEnableReset);
if (bEnableClBack) SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETCOLOUR, 0, clBack);
if (bEnableClText) SendDlgItemMessage(hwndDlg, IDC_FONTCOLOUR, CPM_SETCOLOUR, 0, clText);
@@ -1035,8 +1035,8 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SendMessage(hwndDlg, WM_MEASUREITEM, 0, (LPARAM) & mis);
SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_SETITEMHEIGHT, selItems[i], mis.itemHeight);
}
- InvalidateRect(GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
@@ -1062,8 +1062,8 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, EffectInternal& E1 = effect_id_list_w2[itemData->effect_id];
E1.value = es;
}
- InvalidateRect(GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
@@ -1081,8 +1081,8 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, font_id_list_w2[itemData->font_id].value.colour = SendDlgItemMessage(hwndDlg, IDC_FONTCOLOUR, CPM_GETCOLOUR, 0, 0);
}
mir_free(selItems);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
}
break;
@@ -1101,8 +1101,8 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, }
}
mir_free(selItems);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
}
break;
@@ -1133,9 +1133,9 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, }
mir_free(selItems);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_FONTLIST), NULL, TRUE);
SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_FONTLIST, LBN_SELCHANGE), 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
}
break;
@@ -1166,7 +1166,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, font_id_list_w2 = font_id_list_w3;
colour_id_list_w2 = colour_id_list_w3;
effect_id_list_w2 = effect_id_list_w3;
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UNDO), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_UNDO), FALSE);
SendMessage(hwndDlg, UM_SETFONTGROUP, 0, 0);
break;
@@ -1182,7 +1182,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, colour_id_list_w3 = colour_id_list;
effect_id_list_w3 = effect_id_list;
- EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_BTN_UNDO), TRUE);
font_id_list = font_id_list_w2;
colour_id_list = colour_id_list_w2;
@@ -1241,7 +1241,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_DESTROY:
KillTimer(hwndDlg, TIMER_ID);
- sttSaveCollapseState(GetDlgItem(hwndDlg, IDC_FONTGROUP));
+ sttSaveCollapseState( GetDlgItem(hwndDlg, IDC_FONTGROUP));
DeleteObject(hBkgColourBrush);
font_id_list_w2.destroy();
font_id_list_w3.destroy();
@@ -1249,7 +1249,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, colour_id_list_w3.destroy();
effect_id_list_w2.destroy();
effect_id_list_w3.destroy();
- sttFreeListItems(GetDlgItem(hwndDlg, IDC_FONTLIST));
+ sttFreeListItems( GetDlgItem(hwndDlg, IDC_FONTLIST));
break;
}
return FALSE;
@@ -1377,9 +1377,9 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar pf->value.charset = lf.lfCharSet;
_tcscpy(pf->value.szFace, lf.lfFaceName);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_PREVIEWHEADER), NULL, TRUE);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_PREVIEWGENERAL), NULL, TRUE);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_PREVIEWSMALL), NULL, TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_PREVIEWHEADER), NULL, TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_PREVIEWGENERAL), NULL, TRUE);
+ InvalidateRect( GetDlgItem(hwndDlg, IDC_PREVIEWSMALL), NULL, TRUE);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
return TRUE;
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp index 9428d3ffce..6386dac99c 100644 --- a/src/modules/icolib/skin2opts.cpp +++ b/src/modules/icolib/skin2opts.cpp @@ -412,7 +412,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
if (shAutoComplete)
- shAutoComplete(GetDlgItem(hwndDlg, IDC_ICONSET), 1);
+ shAutoComplete( GetDlgItem(hwndDlg, IDC_ICONSET), 1);
SetDlgItemText(hwndDlg, IDC_ICONSET, _T("icons.dll"));
return TRUE;
@@ -430,7 +430,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM RECT rcPreview, rcGroup;
GetWindowRect(hPreview, &rcPreview);
- GetWindowRect(GetDlgItem(hwndDlg, IDC_IMPORTMULTI), &rcGroup);
+ GetWindowRect( GetDlgItem(hwndDlg, IDC_IMPORTMULTI), &rcGroup);
//SetWindowPos(hPreview, 0, 0, 0, rcPreview.right-rcPreview.left, rcGroup.bottom-rcPreview.top, SWP_NOZORDER|SWP_NOMOVE);
}
@@ -547,7 +547,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ListView_GetItem(hPreview, &lvi);
mir_sntprintf(path, MAX_PATH, _T("%s,%d"), filename, (int)lvi.lParam);
SendMessage(hwndParent, DM_CHANGEICON, dropHiLite, (LPARAM)path);
- ListView_SetItemState(GetDlgItem(hwndParent, IDC_PREVIEW), dropHiLite, 0, LVIS_DROPHILITED);
+ ListView_SetItemState( GetDlgItem(hwndParent, IDC_PREVIEW), dropHiLite, 0, LVIS_DROPHILITED);
} }
break;
@@ -591,7 +591,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_CLOSE:
DestroyWindow(hwndDlg);
- EnableWindow(GetDlgItem(hwndParent, IDC_IMPORT), TRUE);
+ EnableWindow( GetDlgItem(hwndParent, IDC_IMPORT), TRUE);
break;
}
@@ -1000,7 +1000,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break;
case WM_DESTROY:
- SaveCollapseState(GetDlgItem(hwndDlg, IDC_CATEGORYLIST));
+ SaveCollapseState( GetDlgItem(hwndDlg, IDC_CATEGORYLIST));
DestroyWindow(dat->hwndIndex);
{
mir_cslock lck(csIconList);
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp index 21f1207386..819cac6070 100644 --- a/src/modules/ignore/ignore.cpp +++ b/src/modules/ignore/ignore.cpp @@ -227,11 +227,11 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM SendDlgItemMessage(hwndDlg, IDC_TYPINGICON, STM_SETICON, (WPARAM)hIcons[8], 0);
if ( !SendMessage(GetParent(hwndDlg), PSM_ISEXPERT, 0, 0)) {
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE)&~(CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN));
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE)&~(CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_AUTOREBUILD, 0, 0);
}
- ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
+ ResetListOptions( GetDlgItem(hwndDlg, IDC_LIST));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRACOLUMNS, IGNOREEVENT_MAX+2, 0);
{ CLCINFOITEM cii = {0};
@@ -242,14 +242,14 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM cii.pszText = TranslateT("** Unknown contacts **");
hItemUnknown = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
- InitialiseItem(GetDlgItem(hwndDlg, IDC_LIST), NULL, hItemUnknown, 0xFFFFFFFF, 0xFFFFFFFF);
+ InitialiseItem( GetDlgItem(hwndDlg, IDC_LIST), NULL, hItemUnknown, 0xFFFFFFFF, 0xFFFFFFFF);
}
- SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetAllContactIcons( GetDlgItem(hwndDlg, IDC_LIST));
+ SetListGroupIcons( GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
return TRUE;
case WM_SETFOCUS:
- SetFocus(GetDlgItem(hwndDlg, IDC_LIST));
+ SetFocus( GetDlgItem(hwndDlg, IDC_LIST));
break;
case WM_NOTIFY:
switch(((LPNMHDR)lParam)->idFrom) {
@@ -258,13 +258,13 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM {
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
- SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
+ SetAllContactIcons( GetDlgItem(hwndDlg, IDC_LIST));
//fall through
case CLN_CONTACTMOVED:
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetListGroupIcons( GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
break;
case CLN_OPTIONSCHANGED:
- ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
+ ResetListOptions( GetDlgItem(hwndDlg, IDC_LIST));
break;
case CLN_CHECKCHANGED:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -281,19 +281,19 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM if ( !(hitFlags&CLCHT_ONITEMEXTRA)) break;
if (nm->iColumn == IGNOREEVENT_MAX) { //ignore all
for (iImage = 0;iImage<IGNOREEVENT_MAX;iImage++)
- SetIconsForColumn(GetDlgItem(hwndDlg, IDC_LIST), hItem, hItemAll, iImage, iImage+3);
+ SetIconsForColumn( GetDlgItem(hwndDlg, IDC_LIST), hItem, hItemAll, iImage, iImage+3);
}
else if (nm->iColumn == IGNOREEVENT_MAX+1) { //ignore none
for (iImage = 0;iImage<IGNOREEVENT_MAX;iImage++)
- SetIconsForColumn(GetDlgItem(hwndDlg, IDC_LIST), hItem, hItemAll, iImage, 0);
+ SetIconsForColumn( GetDlgItem(hwndDlg, IDC_LIST), hItem, hItemAll, iImage, 0);
}
else {
iImage = SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(nm->iColumn, 0));
if (iImage == 0) iImage = nm->iColumn+3;
else if (iImage != 0xFF) iImage = 0;
- SetIconsForColumn(GetDlgItem(hwndDlg, IDC_LIST), hItem, hItemAll, nm->iColumn, iImage);
+ SetIconsForColumn( GetDlgItem(hwndDlg, IDC_LIST), hItem, hItemAll, nm->iColumn, iImage);
}
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetListGroupIcons( GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
@@ -308,18 +308,18 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
do {
hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
- if (hItem) SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
+ if (hItem) SaveItemMask( GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
if (SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
DBDeleteContactSetting(hContact, "CList", "Hidden");
else
DBWriteContactSettingByte(hContact, "CList", "Hidden", 1);
} while (hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0));
- SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), NULL, hItemAll, "Default1");
- SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), NULL, hItemUnknown, "Mask1");
+ SaveItemMask( GetDlgItem(hwndDlg, IDC_LIST), NULL, hItemAll, "Default1");
+ SaveItemMask( GetDlgItem(hwndDlg, IDC_LIST), NULL, hItemUnknown, "Mask1");
return TRUE;
}
case PSN_EXPERTCHANGED:
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, ((PSHNOTIFY*)lParam)->lParam?GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE)|CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN:GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE)&~(CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN));
+ SetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE, ((PSHNOTIFY*)lParam)->lParam?GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE)|CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN:GetWindowLongPtr( GetDlgItem(hwndDlg, IDC_LIST), GWL_STYLE)&~(CLS_CHECKBOXES|CLS_GROUPCHECKBOXES|CLS_SHOWHIDDEN));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_AUTOREBUILD, 0, 0);
break;
}
diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp index bdfd57295f..c572f95d53 100644 --- a/src/modules/netlib/netliblog.cpp +++ b/src/modules/netlib/netliblog.cpp @@ -76,7 +76,8 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa CheckDlgButton(hwndDlg, IDC_DUMPSSL, logOptions.dumpSsl?BST_CHECKED:BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_TEXTDUMPS, logOptions.textDumps?BST_CHECKED:BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_AUTODETECTTEXT, logOptions.autoDetectText?BST_CHECKED:BST_UNCHECKED);
- { int i;
+ {
+ int i;
for (i=0; i < SIZEOF(szTimeFormats); i++)
SendDlgItemMessage(hwndDlg, IDC_TIMEFORMAT, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szTimeFormats[i]));
}
@@ -212,11 +213,11 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa mir_cslock lck(logOptions.cs);
mir_free(logOptions.szUserFile);
- GetWindowText(GetDlgItem(hwndDlg, IDC_FILENAME), str, MAX_PATH);
+ GetWindowText( GetDlgItem(hwndDlg, IDC_FILENAME), str, MAX_PATH);
logOptions.szUserFile = mir_tstrdup(str);
mir_free(logOptions.szFile);
- GetWindowText(GetDlgItem(hwndDlg, IDC_PATH), str, MAX_PATH);
+ GetWindowText( GetDlgItem(hwndDlg, IDC_PATH), str, MAX_PATH);
logOptions.szFile = mir_tstrdup(str);
logOptions.dumpRecv = IsDlgButtonChecked(hwndDlg, IDC_DUMPRECV);
@@ -286,7 +287,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa DestroyWindow(hwndDlg);
break;
case WM_DESTROY:
- ImageList_Destroy(TreeView_GetImageList(GetDlgItem(hwndDlg, IDC_FILTER), TVSIL_STATE));
+ ImageList_Destroy(TreeView_GetImageList( GetDlgItem(hwndDlg, IDC_FILTER), TVSIL_STATE));
logOptions.hwndOpts = NULL;
break;
}
@@ -318,13 +319,13 @@ static INT_PTR NetlibLog(WPARAM wParam, LPARAM lParam) if ( !bIsActive)
return 0;
- if ((nlu != NULL && GetNetlibHandleType(nlu) != NLH_USER) || pszMsg == NULL)
- {
+ if ((nlu != NULL && GetNetlibHandleType(nlu) != NLH_USER) || pszMsg == NULL) {
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
- if (nlu == NULL) /* if the Netlib user handle is NULL, just pretend its not */
- {
+
+ /* if the Netlib user handle is NULL, just pretend its not */
+ if (nlu == NULL) {
if ( !logOptions.toLog)
return 1;
nlu = &nludummy;
@@ -334,8 +335,7 @@ static INT_PTR NetlibLog(WPARAM wParam, LPARAM lParam) return 1;
dwOriginalLastError = GetLastError();
- switch (logOptions.timeFormat)
- {
+ switch (logOptions.timeFormat) {
case TIMEFORMAT_HHMMSS:
GetTimeFormatA(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER,
NULL, NULL, szTime, SIZEOF(szTime));
@@ -361,13 +361,13 @@ static INT_PTR NetlibLog(WPARAM wParam, LPARAM lParam) }
if (logOptions.timeFormat || logOptions.showUser)
mir_snprintf(szHead, SIZEOF(szHead) - 1, "[%s%s%s] ", szTime,
- (logOptions.showUser && logOptions.timeFormat) ? " " : "",
- logOptions.showUser ? nlu->user.szSettingsModule : "");
+ (logOptions.showUser && logOptions.timeFormat) ? " " : "",
+ logOptions.showUser ? nlu->user.szSettingsModule : "");
else
szHead[0] = 0;
if (logOptions.toOutputDebugString) {
- if (szHead[0])
+ if (szHead[0])
OutputDebugStringA(szHead);
OutputDebugStringA(pszMsg);
OutputDebugStringA("\n");
@@ -432,7 +432,7 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, char *szBuf;
int titleLineLen;
struct NetlibUser *nlu;
- bool useStack = false;
+ bool useStack = false;
// This section checks a number of conditions and aborts
// the dump if the data should not be written to the log
@@ -442,7 +442,7 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, return;
// Check user's log settings
- if ( !(logOptions.toOutputDebugString || (logOptions.toFile && logOptions.szFile[0])))
+ if ( !(logOptions.toOutputDebugString || GetSubscribersCount(hLogEvent) != 0 || (logOptions.toFile && logOptions.szFile[0])))
return;
if ((sent && !logOptions.dumpSent) || (!sent && !logOptions.dumpRecv))
return;
@@ -458,8 +458,7 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, ReleaseMutex(hConnectionHeaderMutex);
// check filter settings
- if (nlu == NULL)
- {
+ if (nlu == NULL) {
if ( !logOptions.toLog)
return;
}
@@ -468,29 +467,23 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, if ( !logOptions.textDumps)
isText = 0;
- else if ( !(flags&MSG_DUMPASTEXT))
- {
- if (logOptions.autoDetectText)
- {
- int i;
- for (i=0; i<len; i++)
- {
- if ((buf[i]<' ' && buf[i] != '\t' && buf[i] != '\r' && buf[i] != '\n') || buf[i]>=0x80)
- {
+ else if ( !(flags & MSG_DUMPASTEXT)) {
+ if (logOptions.autoDetectText) {
+ for (int i=0; i < len; i++) {
+ if ((buf[i] < ' ' && buf[i] != '\t' && buf[i] != '\r' && buf[i] != '\n') || buf[i] >= 0x80) {
isText = 0;
break;
}
}
}
- else
- isText = 0;
+ else isText = 0;
}
// Text data
if (isText) {
- int sz = titleLineLen + len + 1;
- useStack = sz <= 8192;
- szBuf = (char*)(useStack ? alloca(sz) : mir_alloc(sz));
+ int sz = titleLineLen + len + 1;
+ useStack = sz <= 8192;
+ szBuf = (char*)(useStack ? alloca(sz) : mir_alloc(sz));
CopyMemory(szBuf, szTitleLine, titleLineLen);
CopyMemory(szBuf + titleLineLen, (const char*)buf, len);
szBuf[titleLineLen + len] = '\0';
@@ -498,13 +491,12 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, // Binary data
else {
int line, col, colsInLine;
- char *pszBuf;
- int sz = titleLineLen + ((len+16)>>4) * 78 + 1;
- useStack = sz <= 8192;
+ int sz = titleLineLen + ((len+16)>>4) * 78 + 1;
+ useStack = sz <= 8192;
- szBuf = (char*)(useStack ? alloca(sz) : mir_alloc(sz));
+ szBuf = (char*)(useStack ? alloca(sz) : mir_alloc(sz));
CopyMemory(szBuf, szTitleLine, titleLineLen);
- pszBuf = szBuf + titleLineLen;
+ char *pszBuf = szBuf + titleLineLen;
for (line = 0;; line += 16) {
colsInLine = min(16, len - line);
@@ -520,8 +512,7 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, for (col = 0; col < colsInLine; col++)
pszBuf += wsprintfA(pszBuf, "%02X%c", buf[line + col], ((col&3) == 3 && col != 15)?'-':' ');
// Fill out last line with blanks
- for (; col<16; col++)
- {
+ for (; col<16; col++) {
lstrcpyA(pszBuf, " ");
pszBuf += 3;
}
@@ -541,7 +532,8 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, }
NetlibLog((WPARAM)nlu, (LPARAM)szBuf);
- if ( !useStack) mir_free(szBuf);
+ if ( !useStack)
+ mir_free(szBuf);
}
void NetlibLogInit(void)
@@ -572,8 +564,7 @@ void NetlibLogInit(void) logOptions.toFile = DBGetContactSettingByte(NULL, "Netlib", "ToFile", 0);
logOptions.toLog = DBGetContactSettingDword(NULL, "Netlib", "NLlog", 1);
- if ( !DBGetContactSettingTString(NULL, "Netlib", "File", &dbv))
- {
+ if ( !DBGetContactSettingTString(NULL, "Netlib", "File", &dbv)) {
logOptions.szUserFile = mir_tstrdup(dbv.ptszVal);
TCHAR *pszNewPath = Utils_ReplaceVarsT(dbv.ptszVal);
@@ -584,8 +575,7 @@ void NetlibLogInit(void) mir_free(pszNewPath);
DBFreeVariant(&dbv);
}
- else
- {
+ else {
logOptions.szUserFile = mir_tstrdup(_T("%miranda_logpath%\\netlog.txt"));
logOptions.szFile = Utils_ReplaceVarsT(logOptions.szUserFile);
}
diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp index 86fc34a6b5..582669eb0d 100644 --- a/src/modules/netlib/netlibopts.cpp +++ b/src/modules/netlib/netlibopts.cpp @@ -74,13 +74,13 @@ static const WORD oftenProxyPorts[] = {1080, 1080, 1080, 8080, 8080, 8080}; static void ShowMultipleControls(HWND hwndDlg, const UINT *controls, int cControls, int state)
{
int i;
- for (i=0;i<cControls;i++) ShowWindow(GetDlgItem(hwndDlg, controls[i]), state);
+ for (i=0;i<cControls;i++) ShowWindow( GetDlgItem(hwndDlg, controls[i]), state);
}
static void EnableMultipleControls(HWND hwndDlg, const UINT *controls, int cControls, int state)
{
int i;
- for (i=0;i<cControls;i++) EnableWindow(GetDlgItem(hwndDlg, controls[i]), state);
+ for (i=0;i<cControls;i++) EnableWindow( GetDlgItem(hwndDlg, controls[i]), state);
}
static void AddProxyTypeItem(HWND hwndDlg, int type, int selectType)
@@ -173,7 +173,7 @@ static void ChangeSettingIntByCheckbox(HWND hwndDlg, UINT ctrlId, int iUser, int static void ChangeSettingStringByEdit(HWND hwndDlg, UINT ctrlId, int iUser, int memberOffset)
{
- int newValueLen = GetWindowTextLength(GetDlgItem(hwndDlg, ctrlId));
+ int newValueLen = GetWindowTextLength( GetDlgItem(hwndDlg, ctrlId));
char *szNewValue = (char*)mir_alloc(newValueLen+1);
GetDlgItemTextA(hwndDlg, ctrlId, szNewValue, newValueLen+1);
if (iUser == -1) {
@@ -366,13 +366,13 @@ static INT_PTR CALLBACK DlgProcNetlibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, enableUser = enablePass = 1;
}
}
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROXYAUTH), enableAuth);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC31), enableUser);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROXYUSER), enableUser);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC32), enablePass);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROXYPASS), enablePass);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROXYHOST), enableServer);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROXYPORT), enableServer);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_PROXYAUTH), enableAuth);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_STATIC31), enableUser);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_PROXYUSER), enableUser);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_STATIC32), enablePass);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_PROXYPASS), enablePass);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_PROXYHOST), enableServer);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_PROXYPORT), enableServer);
}
else EnableMultipleControls(hwndDlg, useProxyControls, SIZEOF(useProxyControls), FALSE);
EnableMultipleControls(hwndDlg, specifyPortsControls, SIZEOF(specifyPortsControls), IsDlgButtonChecked(hwndDlg, IDC_SPECIFYPORTS) != BST_UNCHECKED);
@@ -468,7 +468,7 @@ static INT_PTR CALLBACK DlgProcNetlibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, ChangeSettingStringByEdit(hwndDlg, LOWORD(wParam), iUser, offsetof(NETLIBUSERSETTINGS, szOutgoingPorts));
break;
}
- ShowWindow(GetDlgItem(hwndDlg, IDC_RECONNECTREQD), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_RECONNECTREQD), SW_SHOW);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
diff --git a/src/modules/options/filter.cpp b/src/modules/options/filter.cpp index 4a332b2259..4d75ba55aa 100644 --- a/src/modules/options/filter.cpp +++ b/src/modules/options/filter.cpp @@ -167,7 +167,7 @@ static INT_PTR CALLBACK DlgProcOptSearch(HWND hWnd, UINT msg, WPARAM wParam, LPA break;
case WM_SETFOCUS:
- SetFocus(GetDlgItem(hWnd, IDC_ENABLE_KEYWORDFILTERING));
+ SetFocus( GetDlgItem(hWnd, IDC_ENABLE_KEYWORDFILTERING));
break;
case WM_NOTIFY:
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 1c3c87ad9e..efabe24e0a 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -184,13 +184,13 @@ static void SaveOptionsTreeState(HWND hdlg) tvi.mask = TVIF_TEXT | TVIF_STATE;
tvi.pszText = str;
tvi.cchTextMax = SIZEOF(str);
- tvi.hItem = TreeView_GetRoot(GetDlgItem(hdlg, IDC_PAGETREE));
+ tvi.hItem = TreeView_GetRoot( GetDlgItem(hdlg, IDC_PAGETREE));
while (tvi.hItem != NULL) {
- if (SendMessageA(GetDlgItem(hdlg, IDC_PAGETREE), TVM_GETITEMA, 0, (LPARAM)&tvi)) {
+ if (SendMessageA( GetDlgItem(hdlg, IDC_PAGETREE), TVM_GETITEMA, 0, (LPARAM)&tvi)) {
mir_snprintf(buf, SIZEOF(buf), "%s%s", OPTSTATE_PREFIX, str);
DBWriteContactSettingByte(NULL, "Options", buf, (BYTE)((tvi.state&TVIS_EXPANDED)?1:0));
}
- tvi.hItem = TreeView_GetNextSibling(GetDlgItem(hdlg, IDC_PAGETREE), tvi.hItem);
+ tvi.hItem = TreeView_GetNextSibling( GetDlgItem(hdlg, IDC_PAGETREE), tvi.hItem);
} }
#define DM_FOCUSPAGE (WM_USER+10)
@@ -479,7 +479,7 @@ static void CALLBACK FilterSearchTimerFunc(HWND hwnd, UINT, UINT_PTR, DWORD) DestroyWindow(hFilterSearchWnd);
hFilterSearchWnd = NULL;
}
- RedrawWindow(GetDlgItem(hwnd, IDC_KEYWORD_FILTER), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_ERASE);
+ RedrawWindow( GetDlgItem(hwnd, IDC_KEYWORD_FILTER), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_ERASE);
}
static void ExecuteFindFilterStringsTimer(HWND hdlg)
@@ -681,7 +681,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L if (getComboBoxInfo) {
COMBOBOXINFO cbi;
cbi.cbSize = sizeof(COMBOBOXINFO);
- getComboBoxInfo(GetDlgItem(hdlg, IDC_KEYWORD_FILTER), &cbi);
+ getComboBoxInfo( GetDlgItem(hdlg, IDC_KEYWORD_FILTER), &cbi);
OptionsFilterDefaultProc = (WNDPROC)SetWindowLongPtr(cbi.hwndItem, GWLP_WNDPROC, (LONG_PTR) OptionsFilterSubclassProc);
if (IsAeroMode()) {
@@ -695,7 +695,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L Utils_RestoreWindowPositionNoSize(hdlg, NULL, "Options", "");
Window_SetIcon_IcoLib(hdlg, SKINICON_OTHER_OPTIONS);
CheckDlgButton(hdlg, IDC_EXPERT, DBGetContactSettingByte(NULL, "Options", "Expert", SETTING_SHOWEXPERT_DEFAULT)?BST_CHECKED:BST_UNCHECKED);
- EnableWindow(GetDlgItem(hdlg, IDC_APPLY), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_APPLY), FALSE);
dat = new OptionsDlgData;
SetWindowLongPtr(hdlg, GWLP_USERDATA, (LONG_PTR)dat);
SetWindowText(hdlg, psh->pszCaption);
@@ -754,7 +754,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L mir_free(lastPage);
mir_free(lastTab);
- GetWindowRect(GetDlgItem(hdlg, IDC_STNOPAGE), &dat->rcDisplay);
+ GetWindowRect( GetDlgItem(hdlg, IDC_STNOPAGE), &dat->rcDisplay);
MapWindowPoints(NULL, hdlg, (LPPOINT)&dat->rcDisplay, 2);
// Add an item to count in height
@@ -762,11 +762,11 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L tie.mask = TCIF_TEXT | TCIF_IMAGE;
tie.iImage = -1;
tie.pszText = _T("X");
- TabCtrl_InsertItem(GetDlgItem(hdlg, IDC_TAB), 0, &tie);
+ TabCtrl_InsertItem( GetDlgItem(hdlg, IDC_TAB), 0, &tie);
- GetWindowRect(GetDlgItem(hdlg, IDC_TAB), &dat->rcTab);
+ GetWindowRect( GetDlgItem(hdlg, IDC_TAB), &dat->rcTab);
MapWindowPoints(NULL, hdlg, (LPPOINT)&dat->rcTab, 2);
- TabCtrl_AdjustRect(GetDlgItem(hdlg, IDC_TAB), FALSE, &dat->rcTab);
+ TabCtrl_AdjustRect( GetDlgItem(hdlg, IDC_TAB), FALSE, &dat->rcTab);
//!!!!!!!!!! int enableKeywordFiltering = DBGetContactSettingWord(NULL, "Options", "EnableKeywordFiltering", TRUE);
FillFilterCombo(0, hdlg, dat); //!!!!!!!!!! enableKeywordFiltering,
@@ -801,9 +801,9 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L _tcsncpy(dat->szFilterString, pos, SIZEOF(dat->szFilterString));
}
else {
- int sel = SendMessage(GetDlgItem(hdlg, IDC_KEYWORD_FILTER), (UINT) CB_GETCURSEL, 0, 0);
+ int sel = SendMessage( GetDlgItem(hdlg, IDC_KEYWORD_FILTER), (UINT) CB_GETCURSEL, 0, 0);
if (sel != -1) {
- HINSTANCE hinst = (HINSTANCE)SendMessage(GetDlgItem(hdlg, IDC_KEYWORD_FILTER), (UINT) CB_GETITEMDATA, sel , 0);
+ HINSTANCE hinst = (HINSTANCE)SendMessage( GetDlgItem(hdlg, IDC_KEYWORD_FILTER), (UINT) CB_GETITEMDATA, sel , 0);
TCHAR szFileName[300];
GetModuleFileName(hinst, szFileName, SIZEOF(szFileName));
TCHAR *pos = _tcsrchr(szFileName, _T('\\'));
@@ -941,9 +941,9 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L }
if (dat->szFilterString[0] == 0) // Clear the keyword combo box
- SetWindowText(GetDlgItem(hdlg, IDC_KEYWORD_FILTER), _T(""));
+ SetWindowText( GetDlgItem(hdlg, IDC_KEYWORD_FILTER), _T(""));
if ( !bRemoveFocusFromFilter)
- SetFocus(GetDlgItem(hdlg, IDC_KEYWORD_FILTER)); //set the focus back to the combo box
+ SetFocus( GetDlgItem(hdlg, IDC_KEYWORD_FILTER)); //set the focus back to the combo box
SendDlgItemMessage(hdlg, IDC_KEYWORD_FILTER, CB_SETEDITSEL, 0, oldSel); //but don't select any of the text
@@ -960,7 +960,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L break;
case PSM_CHANGED:
- EnableWindow(GetDlgItem(hdlg, IDC_APPLY), TRUE);
+ EnableWindow( GetDlgItem(hdlg, IDC_APPLY), TRUE);
opd = dat->getCurrent();
if (opd)
@@ -1003,7 +1003,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L case TCN_SELCHANGE:
case TVN_SELCHANGED:
- ShowWindow(GetDlgItem(hdlg, IDC_STNOPAGE), SW_HIDE);
+ ShowWindow( GetDlgItem(hdlg, IDC_STNOPAGE), SW_HIDE);
opd = dat->getCurrent();
if (opd && opd->hwnd != NULL)
@@ -1016,14 +1016,14 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L tvi.mask = TVIF_HANDLE|TVIF_PARAM;
TreeView_GetItem(hwndTree, &tvi);
dat->currentPage = tvi.lParam;
- ShowWindow(GetDlgItem(hdlg, IDC_TAB), SW_HIDE);
+ ShowWindow( GetDlgItem(hdlg, IDC_TAB), SW_HIDE);
}
else {
TCITEM tie;
TVITEM tvi;
tie.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hdlg, IDC_TAB), TabCtrl_GetCurSel(GetDlgItem(hdlg, IDC_TAB)), &tie);
+ TabCtrl_GetItem( GetDlgItem(hdlg, IDC_TAB), TabCtrl_GetCurSel( GetDlgItem(hdlg, IDC_TAB)), &tie);
dat->currentPage = tie.lParam;
tvi.hItem = dat->hCurrentPage;
@@ -1034,7 +1034,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L {
OptionsPageData* p = dat->getCurrent();
if (p == NULL) {
- ShowWindow(GetDlgItem(hdlg, IDC_STNOPAGE), SW_SHOW);
+ ShowWindow( GetDlgItem(hdlg, IDC_STNOPAGE), SW_SHOW);
break;
}
if (p->hwnd == NULL) {
@@ -1051,13 +1051,13 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L GetWindowRect(p->hwnd, &rc);
if (p->simpleBottomControlId) {
- GetWindowRect(GetDlgItem(p->hwnd, p->simpleBottomControlId), &rcControl);
+ GetWindowRect( GetDlgItem(p->hwnd, p->simpleBottomControlId), &rcControl);
p->simpleHeight = rcControl.bottom-rc.top;
}
else p->simpleHeight = p->expertHeight;
if (p->simpleRightControlId) {
- GetWindowRect(GetDlgItem(p->hwnd, p->simpleRightControlId), &rcControl);
+ GetWindowRect( GetDlgItem(p->hwnd, p->simpleRightControlId), &rcControl);
p->simpleWidth = rcControl.right-rc.left;
}
else p->simpleWidth = p->expertWidth;
@@ -1068,7 +1068,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L }
else {
for (int i=0; i < p->nExpertOnlyControls; i++)
- ShowWindow(GetDlgItem(p->hwnd, p->expertOnlyControls[i]), SW_HIDE);
+ ShowWindow( GetDlgItem(p->hwnd, p->expertOnlyControls[i]), SW_HIDE);
w = p->simpleWidth;
h = p->simpleHeight;
}
@@ -1219,7 +1219,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L SendMessage(opd->hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
for (int j = 0; j < opd->nExpertOnlyControls; j++)
- ShowWindow(GetDlgItem(opd->hwnd, opd->expertOnlyControls[j]), expert ? SW_SHOW : SW_HIDE);
+ ShowWindow( GetDlgItem(opd->hwnd, opd->expertOnlyControls[j]), expert ? SW_SHOW : SW_HIDE);
opd->insideTab = IsInsideTab(hdlg, dat, i);
@@ -1264,9 +1264,9 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L }
}
if (opd->insideTab)
- ShowWindow(GetDlgItem(hdlg, IDC_TAB), SW_SHOW);
+ ShowWindow( GetDlgItem(hdlg, IDC_TAB), SW_SHOW);
else
- ShowWindow(GetDlgItem(hdlg, IDC_TAB), SW_HIDE);
+ ShowWindow( GetDlgItem(hdlg, IDC_TAB), SW_HIDE);
}
if (opd->insideTab) {
@@ -1305,7 +1305,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L return TRUE;
PSHNOTIFY pshn;
- EnableWindow(GetDlgItem(hdlg, IDC_APPLY), FALSE);
+ EnableWindow( GetDlgItem(hdlg, IDC_APPLY), FALSE);
SetFocus(hwndTree);
opd = dat->getCurrent();
@@ -1428,14 +1428,14 @@ static void OpenOptionsNow(int hLangpack, const char *pszGroup, const char *pszP HTREEITEM hItem = NULL;
if (pszGroup != NULL) {
mir_ptr<TCHAR> ptszGroup( mir_a2t(pszGroup));
- hItem = FindNamedTreeItemAtRoot(GetDlgItem(hwndOptions, IDC_PAGETREE), TranslateTH(hLangpack, ptszGroup));
+ hItem = FindNamedTreeItemAtRoot( GetDlgItem(hwndOptions, IDC_PAGETREE), TranslateTH(hLangpack, ptszGroup));
if (hItem != NULL)
- hItem = FindNamedTreeItemAtChildren(GetDlgItem(hwndOptions, IDC_PAGETREE), hItem, TranslateTH(hLangpack, ptszPage));
+ hItem = FindNamedTreeItemAtChildren( GetDlgItem(hwndOptions, IDC_PAGETREE), hItem, TranslateTH(hLangpack, ptszPage));
}
- else hItem = FindNamedTreeItemAtRoot(GetDlgItem(hwndOptions, IDC_PAGETREE), TranslateTH(hLangpack, ptszPage));
+ else hItem = FindNamedTreeItemAtRoot( GetDlgItem(hwndOptions, IDC_PAGETREE), TranslateTH(hLangpack, ptszPage));
if (hItem != NULL)
- TreeView_SelectItem(GetDlgItem(hwndOptions, IDC_PAGETREE), hItem);
+ TreeView_SelectItem( GetDlgItem(hwndOptions, IDC_PAGETREE), hItem);
}
}
else {
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index a8882a84e5..61063de605 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -329,7 +329,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar iRow = ListView_GetNextItem(hwndList, iRow, LVNI_ALL);
} }
- ShowWindow(GetDlgItem(hwndDlg, IDC_RESTART), TRUE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_RESTART), TRUE);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
@@ -345,23 +345,23 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar PluginListItemData* dat = (PluginListItemData*)lvi.lParam;
ListView_GetItemText(hwndList, hdr->iItem, 1, buf, SIZEOF(buf));
- SetWindowText(GetDlgItem(hwndDlg, IDC_PLUGININFOFRAME), sel ? buf : _T(""));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGININFOFRAME), sel ? buf : _T(""));
- SetWindowTextA(GetDlgItem(hwndDlg, IDC_PLUGINAUTHOR), sel ? dat->author : "");
- SetWindowTextA(GetDlgItem(hwndDlg, IDC_PLUGINEMAIL), sel ? dat->authorEmail : "");
+ SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINAUTHOR), sel ? dat->author : "");
+ SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINEMAIL), sel ? dat->authorEmail : "");
{
TCHAR* p = Langpack_PcharToTchar(dat->description);
- SetWindowText(GetDlgItem(hwndDlg, IDC_PLUGINLONGINFO), sel ? p : _T(""));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINLONGINFO), sel ? p : _T(""));
mir_free(p);
}
- SetWindowTextA(GetDlgItem(hwndDlg, IDC_PLUGINCPYR), sel ? dat->copyright : "");
- SetWindowTextA(GetDlgItem(hwndDlg, IDC_PLUGINURL), sel ? dat->homepage : "");
+ SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINCPYR), sel ? dat->copyright : "");
+ SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINURL), sel ? dat->homepage : "");
if (equalUUID(miid_last, dat->uuid))
- SetWindowText(GetDlgItem(hwndDlg, IDC_PLUGINPID), sel ? TranslateT("<none>") : _T(""));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINPID), sel ? TranslateT("<none>") : _T(""));
else {
char szUID[128];
uuidToString(dat->uuid, szUID, sizeof(szUID));
- SetWindowTextA(GetDlgItem(hwndDlg, IDC_PLUGINPID), sel ? szUID : "");
+ SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINPID), sel ? szUID : "");
} } } }
if (hdr->hdr.code == PSN_APPLY) {
@@ -384,7 +384,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar char buf[512];
char *p = &buf[7];
lstrcpyA(buf, "mailto:");
- if (GetWindowTextA(GetDlgItem(hwndDlg, LOWORD(wParam)), p, SIZEOF(buf) - 7))
+ if (GetWindowTextA( GetDlgItem(hwndDlg, LOWORD(wParam)), p, SIZEOF(buf) - 7))
CallService(MS_UTILS_OPENURL, 0, (LPARAM) (LOWORD(wParam) == IDC_PLUGINEMAIL ? buf : p));
break;
}
@@ -395,7 +395,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar break;
case WM_DESTROY:
- RemoveAllItems(GetDlgItem(hwndDlg, IDC_PLUGLIST));
+ RemoveAllItems( GetDlgItem(hwndDlg, IDC_PLUGLIST));
break;
}
return FALSE;
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index f60567f59d..2faccf8d24 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -86,7 +86,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam }
}
SendDlgItemMessage(hwndDlg, IDC_PROTOTYPECOMBO, CB_SETCURSEL, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg, IDOK), cnt != 0);
+ EnableWindow( GetDlgItem(hwndDlg, IDOK), cnt != 0);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
AccFormDlgParam* param = (AccFormDlgParam*)lParam;
@@ -96,7 +96,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam else {
TCHAR str[200];
if (param->action == PRAC_CHANGED) { // update
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROTOTYPECOMBO), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_PROTOTYPECOMBO), FALSE);
mir_sntprintf(str, SIZEOF(str), _T("%s: %s"), TranslateT("Editing account"), param->pa->tszAccountName);
}
else mir_sntprintf(str, SIZEOF(str), _T("%s: %s"), TranslateT("Upgrading account"), param->pa->tszAccountName);
@@ -106,7 +106,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam SetDlgItemTextA(hwndDlg, IDC_ACCINTERNALNAME, param->pa->szModuleName);
SendDlgItemMessageA(hwndDlg, IDC_PROTOTYPECOMBO, CB_SELECTSTRING, -1, (LPARAM)param->pa->szProtoName);
- EnableWindow(GetDlgItem(hwndDlg, IDC_ACCINTERNALNAME), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ACCINTERNALNAME), FALSE);
}
SendDlgItemMessage(hwndDlg, IDC_ACCINTERNALNAME, EM_LIMITTEXT, 40, 0);
}
@@ -239,7 +239,7 @@ struct TAccListData static void sttClickButton(HWND hwndDlg, int idcButton)
{
- if (IsWindowEnabled(GetDlgItem(hwndDlg, idcButton)))
+ if (IsWindowEnabled( GetDlgItem(hwndDlg, idcButton)))
PostMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(idcButton, BN_CLICKED), (LPARAM)GetDlgItem(hwndDlg, idcButton));
}
@@ -412,10 +412,10 @@ static void sttUpdateAccountInfo(HWND hwndDlg, struct TAccMgrData *dat) PROTOACCOUNT *pa = (PROTOACCOUNT *)ListBox_GetItemData(hwndList, curSel);
if (pa) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_UPGRADE), pa->bOldProto || pa->bDynDisabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT), !pa->bOldProto && !pa->bDynDisabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_OPTIONS), pa->ppro != 0);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_UPGRADE), pa->bOldProto || pa->bDynDisabled);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_EDIT), !pa->bOldProto && !pa->bDynDisabled);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_REMOVE), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_OPTIONS), pa->ppro != 0);
if (dat->iSelected >= 0) {
PROTOACCOUNT *pa_old = (PROTOACCOUNT *)ListBox_GetItemData(hwndList, dat->iSelected);
@@ -424,12 +424,12 @@ static void sttUpdateAccountInfo(HWND hwndDlg, struct TAccMgrData *dat) }
if (pa->hwndAccMgrUI) {
- ShowWindow(GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_HIDE);
ShowWindow(pa->hwndAccMgrUI, SW_SHOW);
}
else if ( !pa->ppro) {
- ShowWindow(GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_SHOW);
- SetWindowText(GetDlgItem(hwndDlg, IDC_TXT_INFO), TranslateT("Account is disabled. Please activate it to access options."));
+ ShowWindow( GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_SHOW);
+ SetWindowText( GetDlgItem(hwndDlg, IDC_TXT_INFO), TranslateT("Account is disabled. Please activate it to access options."));
}
else {
mir_snprintf(svc, SIZEOF(svc), "%s%s", pa->szModuleName, PS_CREATEACCMGRUI);
@@ -437,28 +437,28 @@ static void sttUpdateAccountInfo(HWND hwndDlg, struct TAccMgrData *dat) if (hwnd && (hwnd != (HWND)CALLSERVICE_NOTFOUND)) {
RECT rc;
- ShowWindow(GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_HIDE);
- GetWindowRect(GetDlgItem(hwndDlg, IDC_TXT_INFO), &rc);
+ GetWindowRect( GetDlgItem(hwndDlg, IDC_TXT_INFO), &rc);
MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rc, 2);
SetWindowPos(hwnd, hwndList, rc.left, rc.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW);
pa->hwndAccMgrUI = hwnd;
}
else {
- ShowWindow(GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_SHOW);
- SetWindowText(GetDlgItem(hwndDlg, IDC_TXT_INFO), TranslateT(legacyMsg));
+ ShowWindow( GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_SHOW);
+ SetWindowText( GetDlgItem(hwndDlg, IDC_TXT_INFO), TranslateT(legacyMsg));
} }
return;
} }
- EnableWindow(GetDlgItem(hwndDlg, IDC_UPGRADE), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_OPTIONS), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_UPGRADE), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_EDIT), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_REMOVE), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_OPTIONS), FALSE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_SHOW);
- SetWindowText(GetDlgItem(hwndDlg, IDC_TXT_INFO), TranslateT(welcomeMsg));
+ ShowWindow( GetDlgItem(hwndDlg, IDC_TXT_INFO), SW_SHOW);
+ SetWindowText( GetDlgItem(hwndDlg, IDC_TXT_INFO), TranslateT(welcomeMsg));
}
INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
@@ -480,10 +480,10 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM Button_SetIcon_IcoLib(hwndDlg, IDC_OPTIONS, SKINICON_OTHER_OPTIONS, LPGEN("Configure..."));
Button_SetIcon_IcoLib(hwndDlg, IDC_UPGRADE, SKINICON_OTHER_ACCMGR, LPGEN("Upgrade account"));
- EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_OPTIONS), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_UPGRADE), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_EDIT), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_REMOVE), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_OPTIONS), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_UPGRADE), FALSE);
{
LOGFONT lf;
@@ -517,7 +517,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM }
dat->iSelected = -1;
- sttSubclassAccList(GetDlgItem(hwndDlg, IDC_ACCLIST), TRUE);
+ sttSubclassAccList( GetDlgItem(hwndDlg, IDC_ACCLIST), TRUE);
SendMessage(hwndDlg, WM_MY_REFRESH, 0, 0);
Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, "AccMgr", "");
@@ -861,7 +861,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM ListBox_SetCurSel(hList, -1);
sttUpdateAccountInfo(hwndDlg, dat);
EnableWindow(hList, FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ADD), FALSE);
ListBox_SetItemData(hList, idx, 0);
@@ -876,7 +876,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM SendMessage(hwndDlg, WM_MY_REFRESH, 0, 0);
EnableWindow(hList, TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), TRUE);
+ EnableWindow( GetDlgItem(hwndDlg, IDC_ADD), TRUE);
} } }
break;
@@ -1010,7 +1010,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM Button_FreeIcon_IcoLib(hwndDlg, IDC_OPTIONS);
Button_FreeIcon_IcoLib(hwndDlg, IDC_UPGRADE);
Utils_SaveWindowPosition(hwndDlg, NULL, "AccMgr", "");
- sttSubclassAccList(GetDlgItem(hwndDlg, IDC_ACCLIST), FALSE);
+ sttSubclassAccList( GetDlgItem(hwndDlg, IDC_ACCLIST), FALSE);
DeleteObject(dat->hfntTitle);
DeleteObject(dat->hfntText);
mir_free(dat);
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp index f23e777604..fb932ed7b7 100644 --- a/src/modules/skin/hotkey_opts.cpp +++ b/src/modules/skin/hotkey_opts.cpp @@ -407,11 +407,11 @@ static void sttOptionsStartEdit(HWND hwndDlg, HWND hwndHotkey) SendDlgItemMessage(hwndDlg, IDC_HOTKEY, HKM_SETHOTKEY, MAKELONG(LOBYTE(item->OptHotkey), HIBYTE(item->OptHotkey)), 0);
SetWindowPos(hwndHotkey, HWND_BOTTOM, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
- SetWindowPos(GetDlgItem(hwndDlg, IDC_HOTKEY), HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, SWP_SHOWWINDOW);
- RedrawWindow(GetDlgItem(hwndDlg, IDC_HOTKEY), NULL, NULL, RDW_INVALIDATE);
+ SetWindowPos( GetDlgItem(hwndDlg, IDC_HOTKEY), HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, SWP_SHOWWINDOW);
+ RedrawWindow( GetDlgItem(hwndDlg, IDC_HOTKEY), NULL, NULL, RDW_INVALIDATE);
- SetFocus(GetDlgItem(hwndDlg, IDC_HOTKEY));
- RedrawWindow(GetDlgItem(hwndDlg, IDC_HOTKEY), NULL, NULL, RDW_INVALIDATE);
+ SetFocus( GetDlgItem(hwndDlg, IDC_HOTKEY));
+ RedrawWindow( GetDlgItem(hwndDlg, IDC_HOTKEY), NULL, NULL, RDW_INVALIDATE);
}
}
@@ -437,7 +437,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, TranslateDialogDefault(hwndDlg);
- HotkeyEditCreate(GetDlgItem(hwndDlg, IDC_HOTKEY));
+ HotkeyEditCreate( GetDlgItem(hwndDlg, IDC_HOTKEY));
{
HIMAGELIST hIml = ImageList_Create(16, 16, ILC_MASK + (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16), 3, 1);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_WINDOWS);
@@ -612,7 +612,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, THotkeyItem *item;
WORD wHotkey = (WORD)SendDlgItemMessage(hwndDlg, IDC_HOTKEY, HKM_GETHOTKEY, 0, 0);
- ShowWindow(GetDlgItem(hwndDlg, IDC_HOTKEY), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_HOTKEY), SW_HIDE);
SetFocus(hwndHotkey);
if ( !wHotkey || (wHotkey == VK_ESCAPE) || (HIWORD(wParam) != 0))
break;
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp index 59326aaa97..e9aa29ed9c 100644 --- a/src/modules/skin/sounds.cpp +++ b/src/modules/skin/sounds.cpp @@ -199,29 +199,29 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break;
case DM_HIDEPANE:
- ShowWindow(GetDlgItem(hwndDlg, IDC_SGROUP), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_NAME), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_NAMEVAL), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_SLOC), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_LOCATION), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_CHANGE), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_PREVIEW), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_GETMORE), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_SGROUP), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_NAME), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_NAMEVAL), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_SLOC), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_LOCATION), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_CHANGE), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_PREVIEW), SW_HIDE);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_GETMORE), SW_HIDE);
break;
case DM_SHOWPANE:
- ShowWindow(GetDlgItem(hwndDlg, IDC_SGROUP), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_NAME), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_NAMEVAL), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_SLOC), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_LOCATION), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_CHANGE), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_PREVIEW), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_GETMORE), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_SGROUP), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_NAME), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_NAMEVAL), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_SLOC), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_LOCATION), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_CHANGE), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_PREVIEW), SW_SHOW);
+ ShowWindow( GetDlgItem(hwndDlg, IDC_GETMORE), SW_SHOW);
break;
case DM_CHECKENABLED:
- EnableWindow(GetDlgItem(hwndDlg, IDC_SOUNDTREE), IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS));
+ EnableWindow( GetDlgItem(hwndDlg, IDC_SOUNDTREE), IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS));
if ( !IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS))
SendMessage(hwndDlg, DM_HIDEPANE, 0, 0);
else if (TreeView_GetSelection(hwndTree) && TreeView_GetParent(hwndTree, TreeView_GetSelection(hwndTree)))
diff --git a/src/modules/visibility/visibility.cpp b/src/modules/visibility/visibility.cpp index 0de68fe01a..751a02d3cc 100644 --- a/src/modules/visibility/visibility.cpp +++ b/src/modules/visibility/visibility.cpp @@ -147,7 +147,7 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP SendDlgItemMessage(hwndDlg, IDC_INVISIBLEICON, STM_SETICON, (WPARAM)hInvisibleIcon, 0);
}
- ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
+ ResetListOptions( GetDlgItem(hwndDlg, IDC_LIST));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRACOLUMNS, 2, 0);
{ CLCINFOITEM cii = {0};
@@ -157,11 +157,11 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP hItemAll = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
}
- SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetAllContactIcons( GetDlgItem(hwndDlg, IDC_LIST));
+ SetListGroupIcons( GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
return TRUE;
case WM_SETFOCUS:
- SetFocus(GetDlgItem(hwndDlg, IDC_LIST));
+ SetFocus( GetDlgItem(hwndDlg, IDC_LIST));
break;
case WM_NOTIFY:
switch(((LPNMHDR)lParam)->idFrom) {
@@ -170,13 +170,13 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP {
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
- SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
+ SetAllContactIcons( GetDlgItem(hwndDlg, IDC_LIST));
//fall through
case CLN_CONTACTMOVED:
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetListGroupIcons( GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
break;
case CLN_OPTIONSCHANGED:
- ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
+ ResetListOptions( GetDlgItem(hwndDlg, IDC_LIST));
break;
case NM_CLICK:
{ HANDLE hItem;
@@ -214,20 +214,20 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(nm->iColumn?0:1, 0));
}
else if (itemType == CLCIT_INFO) { // All Contacts
- SetAllChildIcons(GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn, iImage);
+ SetAllChildIcons( GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn, iImage);
if (iImage)
- SetAllChildIcons(GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn?0:1, 0);
+ SetAllChildIcons( GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn?0:1, 0);
}
else if (itemType == CLCIT_GROUP) { // A group
hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItem) {
- SetAllChildIcons(GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn, iImage);
+ SetAllChildIcons( GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn, iImage);
if (iImage)
- SetAllChildIcons(GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn?0:1, 0);
+ SetAllChildIcons( GetDlgItem(hwndDlg, IDC_LIST), hItem, nm->iColumn?0:1, 0);
}
}
// Update the all/none icons
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
+ SetListGroupIcons( GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
// Activate Apply button
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
|