diff options
-rw-r--r-- | include/m_gui.h | 2 | ||||
-rw-r--r-- | libs/win32/mir_core.lib | bin | 455180 -> 455456 bytes | |||
-rw-r--r-- | libs/win64/mir_core.lib | bin | 459846 -> 460128 bytes | |||
-rw-r--r-- | plugins/CrashDumper/src/ui.cpp | 14 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/findwindow.cpp | 54 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/main_window.cpp | 104 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/watchedvars.cpp | 66 | ||||
-rw-r--r-- | plugins/Import/src/wizard.cpp | 9 | ||||
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 13 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 19 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_bookmarks.cpp | 10 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_console.cpp | 12 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_disco.cpp | 10 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_privacy.cpp | 11 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_roster.cpp | 14 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_xstatus.cpp | 12 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 9 | ||||
-rw-r--r-- | src/mir_core/src/CDlgBase.cpp | 9 | ||||
-rw-r--r-- | src/mir_core/src/mir_core.def | 1 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 1 |
21 files changed, 144 insertions, 227 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index 4fa9f8c667..d611778a74 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -402,6 +402,7 @@ public: __forceinline HWND GetHwnd() const { return m_hwnd; }
__forceinline void Hide() { Show(SW_HIDE); }
__forceinline bool IsInitialized() const { return m_initialized; }
+ __forceinline void SetMinSize(int x, int y) { m_iMinWidth = x, m_iMinHeight = y; }
__forceinline void SetParent(HWND hwnd) { m_hwndParent = hwnd; }
__forceinline CCtrlBase* operator[](int iControlId) { return FindControl(iControlId); }
@@ -466,6 +467,7 @@ private: bool VerifyControls(bool (CCtrlBase::*fn)());
CTimer* FindTimer(int idEvent);
+ int m_iMinWidth = -1, m_iMinHeight = -1;
static BOOL CALLBACK GlobalFieldEnum(HWND hwnd, LPARAM lParam);
static INT_PTR CALLBACK GlobalDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib Binary files differindex c1ded084ad..4e7b6831d7 100644 --- a/libs/win32/mir_core.lib +++ b/libs/win32/mir_core.lib diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib Binary files differindex 9c13f2f0a9..f8e6b076ae 100644 --- a/libs/win64/mir_core.lib +++ b/libs/win64/mir_core.lib diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index 50c7dd944c..cde5a7bf2f 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -33,6 +33,8 @@ public: m_btnCopyFile(this, IDC_FILEVER),
m_redtViewVersionInfo(this, IDC_VIEWVERSIONINFO)
{
+ SetMinSize(400, 300);
+
m_flags = flags;
m_forceResizable = true;
@@ -76,18 +78,6 @@ public: return true;
}
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
- {
- if (msg == WM_GETMINMAXINFO) {
- LPMINMAXINFO mmi = (LPMINMAXINFO)lParam;
- mmi->ptMinTrackSize.x = 400; // The minimum width in points
- mmi->ptMinTrackSize.y = 300; // The minimum height in points
- return 0;
- }
-
- return CDlgBase::DlgProc(msg, wParam, lParam);
- }
-
int Resizer(UTILRESIZECONTROL * urc) override
{
switch (urc->wId) {
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 8f80063be5..2d21dac0c9 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -35,7 +35,8 @@ static int lastColumn = -1; #define F_DELETED 0x400
-typedef struct {
+typedef struct
+{
HWND hwnd; // hwnd to item list
wchar_t* search; // text to find
wchar_t* replace; // text to replace
@@ -43,19 +44,18 @@ typedef struct { } FindInfo;
-ColumnsSettings csResultList[] = {
+ColumnsSettings csResultList[] =
+{
{ LPGENW("Result"), 0, "Search0width", 100 },
{ LPGENW("Contact"), 1, "Search1width", 100 },
{ LPGENW("Module"), 2, "Search2width", 100 },
{ LPGENW("Setting"), 3, "Search3width", 100 },
{ LPGENW("Value"), 4, "Search4width", 150 },
- {nullptr}
+ { nullptr }
};
-
void __cdecl FindSettings(LPVOID di);
-
int FindDialogResize(HWND, LPARAM, UTILRESIZECONTROL *urc)
{
switch (urc->wId) {
@@ -68,9 +68,10 @@ int FindDialogResize(HWND, LPARAM, UTILRESIZECONTROL *urc) }
}
-
INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ HWND hwndResults = GetDlgItem(hwnd, IDC_LIST);
+
switch (msg) {
case WM_INITDIALOG:
SendDlgItemMessage(hwnd, IDC_SBAR, SB_SETTEXT, 0, (LPARAM)TranslateT("Enter a string to search the database for"));
@@ -83,8 +84,8 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP SetWindowLongPtr(GetDlgItem(hwnd, IDC_SEARCH), GWLP_USERDATA, 0);
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_APPWINDOW); // taskbar icon
TranslateDialogDefault(hwnd);
- ListView_SetExtendedListViewStyle(GetDlgItem(hwnd, IDC_LIST), 32 | LVS_EX_LABELTIP); // LVS_EX_GRIDLINES
- loadListSettings(GetDlgItem(hwnd, IDC_LIST), csResultList);
+ ListView_SetExtendedListViewStyle(hwndResults, 32 | LVS_EX_LABELTIP); // LVS_EX_GRIDLINES
+ loadListSettings(hwndResults, csResultList);
Utils_RestoreWindowPositionNoMove(hwnd, NULL, MODULENAME, "Search_");
return TRUE;
@@ -115,7 +116,7 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (!fi)
break;
- fi->hwnd = GetDlgItem(hwnd, IDC_LIST);
+ fi->hwnd = hwndResults;
fi->options = (IsDlgButtonChecked(hwnd, IDC_CASESENSITIVE) ? F_CASE : 0) |
(IsDlgButtonChecked(hwnd, IDC_EXACT) ? F_EXACT : 0) |
(IsDlgButtonChecked(hwnd, IDC_MODNAME) ? F_MODNAME : 0) |
@@ -153,13 +154,14 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP break;
}
break;
+
case WM_GETMINMAXINFO:
- {
- MINMAXINFO *mmi = (MINMAXINFO*)lParam;
- mmi->ptMinTrackSize.x = 610;
- mmi->ptMinTrackSize.y = 300;
- }
- return 0;
+ {
+ MINMAXINFO *mmi = (MINMAXINFO*)lParam;
+ mmi->ptMinTrackSize.x = 610;
+ mmi->ptMinTrackSize.y = 300;
+ }
+ return 0;
case WM_SIZE:
Utils_ResizeDialog(hwnd, g_plugin.getInst(), MAKEINTRESOURCEA(IDD_FIND), FindDialogResize);
@@ -169,19 +171,15 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (LOWORD(wParam) != IDC_LIST) break;
switch (((NMHDR*)lParam)->code) {
case NM_DBLCLK:
- {
LVHITTESTINFO hti;
LVITEM lvi;
- HWND hwndResults = GetDlgItem(hwnd, IDC_LIST);
hti.pt = ((NMLISTVIEW*)lParam)->ptAction;
if (ListView_SubItemHitTest(hwndResults, &hti) > -1) {
- if (hti.flags&LVHT_ONITEM)
- {
+ if (hti.flags & LVHT_ONITEM) {
lvi.mask = LVIF_PARAM;
lvi.iItem = hti.iItem;
lvi.iSubItem = 0;
- if (ListView_GetItem(hwndResults, &lvi))
- {
+ if (ListView_GetItem(hwndResults, &lvi)) {
ItemInfo ii = { 0 };
ii.hContact = (MCONTACT)lvi.lParam;
ListView_GetItemTextA(hwndResults, hti.iItem, 2, ii.module, _countof(ii.module));
@@ -196,24 +194,22 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP }
}
break;
- }
case LVN_COLUMNCLICK:
- {
LPNMLISTVIEW lv = (LPNMLISTVIEW)lParam;
ColumnsSortParams params;
- params.hList = GetDlgItem(hwnd, IDC_LIST);
+ params.hList = hwndResults;
params.column = lv->iSubItem;
params.last = lastColumn;
ListView_SortItemsEx(params.hList, ColumnsCompare, (LPARAM)¶ms);
lastColumn = (params.column == lastColumn) ? -1 : params.column;
break;
- }
} // switch
break;
+
case WM_DESTROY:
- ListView_DeleteAllItems(GetDlgItem(hwnd, IDC_LIST));
- saveListSettings(GetDlgItem(hwnd, IDC_LIST), csResultList);
+ ListView_DeleteAllItems(hwndResults);
+ saveListSettings(hwndResults, csResultList);
Utils_SaveWindowPosition(hwnd, NULL, MODULENAME, "Search_");
break;
}
@@ -221,7 +217,8 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP }
-void newFindWindow() {
+void newFindWindow()
+{
CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_FIND), hwnd2mainWindow, FindWindowDlgProc);
}
@@ -564,7 +561,6 @@ void __cdecl FindSettings(LPVOID param) ItemFound(fi->hwnd, hContact, newModule, nullptr, nullptr, flag);
}
-
} // for(module)
}
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp index fbef13920e..2318e21397 100644 --- a/plugins/DbEditorPP/src/main_window.cpp +++ b/plugins/DbEditorPP/src/main_window.cpp @@ -60,12 +60,12 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, return HTCLIENT;
case WM_SETCURSOR:
- {
- RECT rc;
- GetClientRect(hwnd, &rc);
- SetCursor(rc.right > rc.bottom ? LoadCursor(nullptr, IDC_SIZENS) : LoadCursor(nullptr, IDC_SIZEWE));
- }
- return TRUE;
+ {
+ RECT rc;
+ GetClientRect(hwnd, &rc);
+ SetCursor(rc.right > rc.bottom ? LoadCursor(nullptr, IDC_SIZENS) : LoadCursor(nullptr, IDC_SIZEWE));
+ }
+ return TRUE;
case WM_LBUTTONDOWN:
SetCapture(hwnd);
@@ -91,18 +91,18 @@ LRESULT CALLBACK ModuleTreeSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR {
switch (msg) {
case WM_RBUTTONDOWN:
- {
- TVHITTESTINFO hti;
- hti.pt.x = (short)LOWORD(GetMessagePos());
- hti.pt.y = (short)HIWORD(GetMessagePos());
- ScreenToClient(hwnd, &hti.pt);
-
- if (TreeView_HitTest(hwnd, &hti)) {
- if (hti.flags&TVHT_ONITEM)
- TreeView_SelectItem(hwnd, hti.hItem);
+ {
+ TVHITTESTINFO hti;
+ hti.pt.x = (short)LOWORD(GetMessagePos());
+ hti.pt.y = (short)HIWORD(GetMessagePos());
+ ScreenToClient(hwnd, &hti.pt);
+
+ if (TreeView_HitTest(hwnd, &hti)) {
+ if (hti.flags&TVHT_ONITEM)
+ TreeView_SelectItem(hwnd, hti.hItem);
+ }
}
- }
- break;
+ break;
case WM_CHAR:
if (GetKeyState(VK_CONTROL) & 0x8000 && wParam == 6)
@@ -265,38 +265,38 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return TRUE;
case GC_SPLITTERMOVED:
- {
- int splitterPos = GetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA);
-
- RECT rc2;
- GetWindowRect(hwnd, &rc2);
-
- if ((HWND)lParam == GetDlgItem(hwnd, IDC_SPLITTER)) {
- RECT rc;
- GetClientRect(hwnd, &rc);
- POINT pt = { (LONG)wParam, 0 };
- ScreenToClient(hwnd, &pt);
-
- splitterPos = rc.left + pt.x + 1;
- if (splitterPos < 150)
- splitterPos = 150;
- if (splitterPos > rc2.right - rc2.left - 150)
- splitterPos = rc2.right - rc2.left - 150;
- SetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA, splitterPos);
- g_plugin.setWord("Splitter", (WORD)splitterPos);
+ {
+ int splitterPos = GetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA);
+
+ RECT rc2;
+ GetWindowRect(hwnd, &rc2);
+
+ if ((HWND)lParam == GetDlgItem(hwnd, IDC_SPLITTER)) {
+ RECT rc;
+ GetClientRect(hwnd, &rc);
+ POINT pt = { (LONG)wParam, 0 };
+ ScreenToClient(hwnd, &pt);
+
+ splitterPos = rc.left + pt.x + 1;
+ if (splitterPos < 150)
+ splitterPos = 150;
+ if (splitterPos > rc2.right - rc2.left - 150)
+ splitterPos = rc2.right - rc2.left - 150;
+ SetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA, splitterPos);
+ g_plugin.setWord("Splitter", (WORD)splitterPos);
+ }
+ PostMessage(hwnd, WM_SIZE, 0, 0);
}
- PostMessage(hwnd, WM_SIZE, 0, 0);
- }
- break;
+ break;
case WM_GETMINMAXINFO:
- {
- MINMAXINFO *mmi = (MINMAXINFO *)lParam;
- int splitterPos = GetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA);
- mmi->ptMinTrackSize.x = splitterPos + 150;
- mmi->ptMinTrackSize.y = 300;
- }
- return 0;
+ {
+ MINMAXINFO *mmi = (MINMAXINFO *)lParam;
+ int splitterPos = GetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA);
+ mmi->ptMinTrackSize.x = splitterPos + 150;
+ mmi->ptMinTrackSize.y = 300;
+ }
+ return 0;
case WM_MOVE:
case WM_SIZE:
@@ -490,12 +490,12 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_DWORD_HEX, MF_BYCOMMAND | ((g_Hex & HEX_DWORD) ? MF_CHECKED : MF_UNCHECKED));
break;
case MENU_SAVE_POSITION:
- {
- BOOL save = !g_plugin.getByte("RestoreOnOpen", 1);
- CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_SAVE_POSITION, MF_BYCOMMAND | (save ? MF_CHECKED : MF_UNCHECKED));
- g_plugin.setByte("RestoreOnOpen", (byte)save);
- }
- break;
+ {
+ BOOL save = !g_plugin.getByte("RestoreOnOpen", 1);
+ CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_SAVE_POSITION, MF_BYCOMMAND | (save ? MF_CHECKED : MF_UNCHECKED));
+ g_plugin.setByte("RestoreOnOpen", (byte)save);
+ }
+ break;
case MENU_INLINE_EDIT:
g_Inline = !g_Inline;
CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_INLINE_EDIT, MF_BYCOMMAND | (g_Inline ? MF_CHECKED : MF_UNCHECKED));
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index f24dad1745..7cd8ef85b5 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -17,7 +17,8 @@ ColumnsSettings csWatchList[] = { -int WatchedArrayIndex(MCONTACT hContact, const char *module, const char *setting, int strict) {
+int WatchedArrayIndex(MCONTACT hContact, const char *module, const char *setting, int strict)
+{
for (int i = 0; i < WatchListArray.count; i++) {
if (hContact == WatchListArray.item[i].hContact)
if (!mir_strcmp(module, WatchListArray.item[i].module))
@@ -31,8 +32,7 @@ int WatchedArrayIndex(MCONTACT hContact, const char *module, const char *setting int addSettingToWatchList(MCONTACT hContact, const char *module, const char *setting)
{
- if (WatchListArray.count == WatchListArray.size)
- {
+ if (WatchListArray.count == WatchListArray.size) {
WatchListArray.size += 32;
WatchListArray.item = (struct DBsetting*)mir_realloc(WatchListArray.item, sizeof(struct DBsetting)*WatchListArray.size);
}
@@ -94,8 +94,7 @@ void addwatchtolist(HWND hwnd, struct DBsetting *lParam) dummy.hContact = lParam->hContact;
dummy.module = lParam->module;
- for (ModSetLinkLinkItem *setting = settinglist.first; setting; setting = setting->next)
- {
+ for (ModSetLinkLinkItem *setting = settinglist.first; setting; setting = setting->next) {
dummy.setting = setting->name;
addwatchtolist(hwnd, &dummy);
@@ -125,11 +124,11 @@ void addwatchtolist(HWND hwnd, struct DBsetting *lParam) switch (dbv->type) {
case DBVT_BLOB:
- {
- ptrA str(StringFromBlob(dbv->pbVal, dbv->cpbVal));
- ListView_SetItemTextA(hwnd, index, 3, str);
- break;
- }
+ {
+ ptrA str(StringFromBlob(dbv->pbVal, dbv->cpbVal));
+ ListView_SetItemTextA(hwnd, index, 3, str);
+ break;
+ }
case DBVT_BYTE:
mir_snwprintf(data, L"0x%02X (%s)", dbv->bVal, _ultow(dbv->bVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
@@ -149,18 +148,18 @@ void addwatchtolist(HWND hwnd, struct DBsetting *lParam) break;
case DBVT_WCHAR:
- {
- ptrW str(mir_wstrdup(dbv->pwszVal));
- ListView_SetItemText(hwnd, index, 3, str);
- break;
- }
+ {
+ ptrW str(mir_wstrdup(dbv->pwszVal));
+ ListView_SetItemText(hwnd, index, 3, str);
+ break;
+ }
case DBVT_UTF8:
- {
- ptrW str(mir_utf8decodeW(dbv->pszVal));
- ListView_SetItemText(hwnd, index, 3, str);
- break;
- }
+ {
+ ptrW str(mir_utf8decodeW(dbv->pszVal));
+ ListView_SetItemText(hwnd, index, 3, str);
+ break;
+ }
case DBVT_DELETED:
if (IsResidentSetting(lParam->module, lParam->setting))
ListView_SetItemText(hwnd, index, 3, TranslateT("*** resident ***"));
@@ -192,8 +191,7 @@ void PopulateWatchedWindow() void freeAllWatches()
{
ListView_DeleteAllItems(GetDlgItem(hwnd2watchedVarsWindow, IDC_VARS));
- for (int i = 0; i < WatchListArray.count; i++)
- {
+ for (int i = 0; i < WatchListArray.count; i++) {
freeWatchListItem(i);
}
mir_free(WatchListArray.item);
@@ -204,8 +202,7 @@ void freeAllWatches() int WatchDialogResize(HWND, LPARAM, UTILRESIZECONTROL *urc)
{
- switch (urc->wId)
- {
+ switch (urc->wId) {
case IDC_VARS:
urc->rcItem.top = 0;
urc->rcItem.bottom = urc->dlgNewSize.cy;
@@ -256,12 +253,12 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) // for the resize
case WM_GETMINMAXINFO:
- {
- MINMAXINFO *mmi = (MINMAXINFO*)lParam;
- mmi->ptMinTrackSize.x = 500;
- mmi->ptMinTrackSize.y = 300;
- }
- return 0;
+ {
+ MINMAXINFO *mmi = (MINMAXINFO*)lParam;
+ mmi->ptMinTrackSize.x = 500;
+ mmi->ptMinTrackSize.y = 300;
+ }
+ return 0;
case WM_SIZE:
Utils_ResizeDialog(hwnd, g_plugin.getInst(), MAKEINTRESOURCEA(IDD_WATCH_DIAG), WatchDialogResize);
@@ -292,15 +289,12 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
HWND hwndVars = GetDlgItem(hwnd, IDC_VARS);
hti.pt = ((NMLISTVIEW*)lParam)->ptAction;
- if (ListView_SubItemHitTest(hwndVars, &hti) > -1)
- {
- if (hti.flags&LVHT_ONITEM)
- {
+ if (ListView_SubItemHitTest(hwndVars, &hti) > -1) {
+ if (hti.flags&LVHT_ONITEM) {
lvi.mask = LVIF_PARAM;
lvi.iItem = hti.iItem;
lvi.iSubItem = 0;
- if (ListView_GetItem(hwndVars, &lvi))
- {
+ if (ListView_GetItem(hwndVars, &lvi)) {
ItemInfo ii;
ii.hContact = (MCONTACT)lvi.lParam;
ListView_GetItemTextA(hwndVars, hti.iItem, 1, ii.module, _countof(ii.module));
diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp index 6efdeeb125..5ca204bd72 100644 --- a/plugins/Import/src/wizard.cpp +++ b/plugins/Import/src/wizard.cpp @@ -115,6 +115,7 @@ public: CDlgBase(g_plugin, IDD_WIZARD),
m_pFirstPage(pPage)
{
+ SetMinSize(330, 286);
m_autoClose = CLOSE_ON_CANCEL;
}
@@ -221,14 +222,6 @@ public: SetDlgItemText(m_hwnd, IDCANCEL, (wchar_t*)lParam);
break;
- case WM_GETMINMAXINFO:
- {
- LPMINMAXINFO lpMMI = (LPMINMAXINFO)lParam;
- lpMMI->ptMinTrackSize.x = 330;
- lpMMI->ptMinTrackSize.y = 286;
- }
- return 1;
-
case WM_COMMAND:
SendMessage(hwndPage, WM_COMMAND, wParam, lParam);
break;
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index 9b31e2e3bc..9ceec71ae4 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -227,6 +227,8 @@ bool CChatRoomDlg::OnInitDialog() m_pParent->iSplitterX = rc.right - rc.left;
}
+ SetMinSize(350, m_minLogBoxHeight + TOOLBAR_HEIGHT + m_minEditBoxHeight + 5);
+
m_message.SendMsg(EM_SUBCLASSED, 0, 0);
m_message.SendMsg(EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS | ENM_KEYEVENTS | ENM_CHANGE | ENM_REQUESTRESIZE);
@@ -1032,17 +1034,6 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) SetFocus(m_message.GetHwnd());
break;
- case WM_GETMINMAXINFO:
- {
- MINMAXINFO *mmi = (MINMAXINFO*)lParam;
- mmi->ptMinTrackSize.x = m_pParent->iSplitterX + 43;
- if (mmi->ptMinTrackSize.x < 350)
- mmi->ptMinTrackSize.x = 350;
-
- mmi->ptMinTrackSize.y = m_minLogBoxHeight + TOOLBAR_HEIGHT + m_minEditBoxHeight + 5;
- }
- break;
-
case WM_LBUTTONDBLCLK:
if (LOWORD(lParam) < 30)
ScrollToBottom();
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index ab2d569f71..ddc1f27bda 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -229,9 +229,6 @@ bool CSrmmWindow::OnInitDialog() DWORD dwExStyle = GetWindowLongPtr(m_log.GetHwnd(), GWL_EXSTYLE);
SetWindowLongPtr(m_log.GetHwnd(), GWL_EXSTYLE, (m_bUseRtl) ? dwExStyle | WS_EX_LEFTSCROLLBAR :dwExStyle & ~WS_EX_LEFTSCROLLBAR);
- m_toolbarSize.cy = TOOLBAR_HEIGHT;
- m_toolbarSize.cx = 0;
-
RECT rc;
GetWindowRect(m_message.GetHwnd(), &rc);
m_minLogBoxHeight = m_minEditBoxHeight = rc.bottom - rc.top;
@@ -240,6 +237,8 @@ bool CSrmmWindow::OnInitDialog() if (m_pParent->iSplitterY == -1)
m_pParent->iSplitterY = m_minEditBoxHeight;
+ SetMinSize(BOTTOM_RIGHT_AVATAR_HEIGHT, m_minLogBoxHeight + TOOLBAR_HEIGHT + m_minEditBoxHeight + max(INFO_BAR_HEIGHT, BOTTOM_RIGHT_AVATAR_HEIGHT - TOOLBAR_HEIGHT) + 5);
+
if (m_wszInitialText) {
m_message.SetText(m_wszInitialText);
mir_free(m_wszInitialText);
@@ -839,7 +838,7 @@ void CSrmmWindow::MessageDialogResize(int w, int h) {
ParentWindowData *pdat = m_pParent;
bool bToolbar = (pdat->flags2 & SMF2_SHOWTOOLBAR) != 0;
- int hSplitterPos = pdat->iSplitterY, toolbarHeight = (bToolbar) ? m_toolbarSize.cy : 0;
+ int hSplitterPos = pdat->iSplitterY, toolbarHeight = (bToolbar) ? TOOLBAR_HEIGHT : 0;
int hSplitterMinTop = toolbarHeight + m_minLogBoxHeight, hSplitterMinBottom = m_minEditBoxHeight;
int infobarInnerHeight = INFO_BAR_INNER_HEIGHT;
int infobarHeight = INFO_BAR_HEIGHT;
@@ -881,8 +880,8 @@ void CSrmmWindow::MessageDialogResize(int w, int h) if (avatarWidth > BOTTOM_RIGHT_AVATAR_HEIGHT && avatarWidth > w / 4)
avatarWidth = w / 4;
- if ((toolbarWidth - avatarWidth - 2) < m_toolbarSize.cx)
- avatarWidth = toolbarWidth - m_toolbarSize.cx - 2;
+ if ((toolbarWidth - avatarWidth - 2) < 0)
+ avatarWidth = toolbarWidth - 2;
toolbarWidth -= avatarWidth + 2;
messageEditWidth -= avatarWidth + 1;
@@ -1353,14 +1352,6 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) m_pParent = (ParentWindowData *)GetWindowLongPtr(m_hwndParent, GWLP_USERDATA);
return TRUE;
- case WM_GETMINMAXINFO:
- {
- MINMAXINFO *mmi = (MINMAXINFO *)lParam;
- mmi->ptMinTrackSize.x = m_toolbarSize.cx + BOTTOM_RIGHT_AVATAR_HEIGHT;
- mmi->ptMinTrackSize.y = m_minLogBoxHeight + m_toolbarSize.cy + m_minEditBoxHeight + max(INFO_BAR_HEIGHT, BOTTOM_RIGHT_AVATAR_HEIGHT - m_toolbarSize.cy) + 5;
- }
- return 0;
-
case WM_SIZE:
if (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED) {
RECT rc;
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 41bf0a6e3e..88189fb316 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -117,7 +117,6 @@ class CSrmmWindow : public CScriverWindow bool m_bIncoming, m_bShowTyping;
MEVENT m_hDbEventFirst, m_hDbEventLast, m_hDbUnreadEventFirst;
- SIZE m_toolbarSize;
int m_iWindowWasCascaded;
int m_nTypeSecs, m_nTypeMode, m_nLastTyping;
int m_iShowUnread;
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index b3d8e0e791..1f950169c9 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -176,6 +176,8 @@ public: m_btnRemove(this, IDC_REMOVE, SKINICON_OTHER_DELETE, LPGEN("Remove")),
m_lvBookmarks(this, IDC_BM_LIST)
{
+ SetMinSize(451, 320);
+
m_lvBookmarks.OnItemActivate = Callback(this, &CJabberDlgBookmarks::lvBookmarks_OnDoubleClick);
m_btnAdd.OnClick = Callback(this, &CJabberDlgBookmarks::btnAdd_OnClick);
m_btnEdit.OnClick = Callback(this, &CJabberDlgBookmarks::btnEdit_OnClick);
@@ -235,14 +237,6 @@ public: INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
- case WM_GETMINMAXINFO:
- {
- LPMINMAXINFO lpmmi = (LPMINMAXINFO)lParam;
- lpmmi->ptMinTrackSize.x = 451;
- lpmmi->ptMinTrackSize.y = 320;
- return 0;
- }
-
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index 6c1de0b61a..a4c2a4467c 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -315,7 +315,9 @@ class CJabberDlgConsole : public CJabberDlgBase public:
CJabberDlgConsole(CJabberProto *proto):
CJabberDlgBase(proto, IDD_CONSOLE)
- {}
+ {
+ SetMinSize(300, 400);
+ }
bool OnInitDialog() override
{
@@ -437,14 +439,6 @@ public: INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
- case WM_GETMINMAXINFO:
- {
- LPMINMAXINFO lpmmi = (LPMINMAXINFO)lParam;
- lpmmi->ptMinTrackSize.x = 300;
- lpmmi->ptMinTrackSize.y = 400;
- return 0;
- }
-
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index c299941589..baba3a7fce 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -506,6 +506,8 @@ public: m_lstDiscoTree(this, IDC_TREE_DISCO),
m_filter(this, IDC_FILTER)
{
+ SetMinSize(538, 374);
+
m_btnViewAsTree.OnClick = Callback(this, &CJabberDlgDiscovery::btnViewAsTree_OnClick);
m_btnViewAsList.OnClick = Callback(this, &CJabberDlgDiscovery::btnViewAsList_OnClick);
m_btnGoHome.OnClick = Callback(this, &CJabberDlgDiscovery::btnGoHome_OnClick);
@@ -819,14 +821,6 @@ public: return result;
switch (msg) {
- case WM_GETMINMAXINFO:
- {
- LPMINMAXINFO lpmmi = (LPMINMAXINFO)lParam;
- lpmmi->ptMinTrackSize.x = 538;
- lpmmi->ptMinTrackSize.y = 374;
- return 0;
- }
-
case WM_JABBER_TRANSPORT_REFRESH:
if (m_proto->m_nSDBrowseMode == SD_BROWSE_MYAGENTS) {
SetDlgItemText(m_hwnd, IDC_COMBO_JID, _T(SD_FAKEJID_MYAGENTS));
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 14508b7c92..5ffedcbbd1 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -1288,6 +1288,8 @@ public: m_clcClist(this, IDC_CLIST),
m_edtNewJid(this, IDC_NEWJID)
{
+ SetMinSize(550, 390);
+
m_btnSimple.OnClick = Callback(this, &CJabberDlgPrivacyLists::btnSimple_OnClick);
m_btnAdvanced.OnClick = Callback(this, &CJabberDlgPrivacyLists::btnAdvanced_OnClick);
m_btnAddJid.OnClick = Callback(this, &CJabberDlgPrivacyLists::btnAddJid_OnClick);
@@ -1499,7 +1501,6 @@ public: UI_MESSAGE_MAP(CJabberDlgPrivacyLists, CSuper);
UI_MESSAGE(WM_MEASUREITEM, OnWmMeasureItem);
UI_MESSAGE(WM_DRAWITEM, OnWmDrawItem);
- UI_MESSAGE(WM_GETMINMAXINFO, OnWmGetMinMaxInfo);
UI_MESSAGE_MAP_END();
BOOL OnWmMeasureItem(UINT, WPARAM, LPARAM lParam)
@@ -1572,14 +1573,6 @@ public: return TRUE;
}
- BOOL OnWmGetMinMaxInfo(UINT, WPARAM, LPARAM lParam)
- {
- LPMINMAXINFO lpmmi = (LPMINMAXINFO)lParam;
- lpmmi->ptMinTrackSize.x = 550;
- lpmmi->ptMinTrackSize.y = 390;
- return 0;
- }
-
void btnSimple_OnClick(CCtrlButton*)
{
CheckDlgButton(m_hwnd, IDC_BTN_SIMPLE, BST_CHECKED);
diff --git a/protocols/JabberG/src/jabber_roster.cpp b/protocols/JabberG/src/jabber_roster.cpp index c248722229..e0e8697ede 100644 --- a/protocols/JabberG/src/jabber_roster.cpp +++ b/protocols/JabberG/src/jabber_roster.cpp @@ -228,6 +228,8 @@ public: btnUpload(this, IDC_UPLOAD), btnDownload(this, IDC_DOWNLOAD) { + SetMinSize(550, 390); + btnExport.OnClick = Callback(this, &CRosterEditorDlg::onClick_Export); btnImport.OnClick = Callback(this, &CRosterEditorDlg::onClick_Import); btnUpload.OnClick = Callback(this, &CRosterEditorDlg::onClick_Upload); @@ -541,18 +543,6 @@ public: OnChangeStatus(); } - - INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override - { - if (msg == WM_GETMINMAXINFO) { - LPMINMAXINFO lpmmi = (LPMINMAXINFO)lParam; - lpmmi->ptMinTrackSize.x = 550; - lpmmi->ptMinTrackSize.y = 390; - return 0; - } - - return CSuper::DlgProc(msg, wParam, lParam); - } }; INT_PTR __cdecl CJabberProto::OnMenuHandleRosterControl(WPARAM, LPARAM) diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index af69115cf2..b48211d200 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -139,12 +139,10 @@ protected: UI_MESSAGE_MAP(CJabberDlgPepSimple, CSuper);
UI_MESSAGE(WM_MEASUREITEM, OnWmMeasureItem);
UI_MESSAGE(WM_DRAWITEM, OnWmDrawItem);
- UI_MESSAGE(WM_GETMINMAXINFO, OnWmGetMinMaxInfo);
UI_MESSAGE_MAP_END();
BOOL OnWmMeasureItem(UINT msg, WPARAM wParam, LPARAM lParam);
BOOL OnWmDrawItem(UINT msg, WPARAM wParam, LPARAM lParam);
- BOOL OnWmGetMinMaxInfo(UINT msg, WPARAM wParam, LPARAM lParam);
private:
struct CStatusMode
@@ -187,6 +185,8 @@ CJabberDlgPepSimple::CJabberDlgPepSimple(CJabberProto *proto, wchar_t *title) : m_bOkClicked(false),
m_title(title)
{
+ SetMinSize(200, 200);
+
m_btnOk.OnClick = Callback(this, &CJabberDlgPepSimple::btnOk_OnClick);
m_cbModes.OnChange = Callback(this, &CJabberDlgPepSimple::cbModes_OnChange);
m_cbModes.OnDropdown =
@@ -365,14 +365,6 @@ BOOL CJabberDlgPepSimple::OnWmDrawItem(UINT, WPARAM, LPARAM lParam) return TRUE;
}
-BOOL CJabberDlgPepSimple::OnWmGetMinMaxInfo(UINT, WPARAM, LPARAM lParam)
-{
- LPMINMAXINFO lpmmi = (LPMINMAXINFO)lParam;
- lpmmi->ptMinTrackSize.x = 200;
- lpmmi->ptMinTrackSize.y = 200;
- return 0;
-}
-
///////////////////////////////////////////////////////////////////////////////
// CPepService base class
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index a5f12c1c1b..3641d583a1 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -142,6 +142,7 @@ CTabbedWindow::CTabbedWindow() : CDlgBase(g_plugin, IDD_CONTAINER), m_tab(this, IDC_TAB) { + SetMinSize(450, 350); } bool CTabbedWindow::OnInitDialog() @@ -523,14 +524,6 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) } break; - case WM_GETMINMAXINFO: - { - MINMAXINFO *mmi = (MINMAXINFO*)lParam; - mmi->ptMinTrackSize.x = 450; - mmi->ptMinTrackSize.y = 350; - } - return 0; - case WM_DRAWITEM: { LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index 0ab32341ef..2c91c6a742 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -224,6 +224,15 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) } break; + case WM_GETMINMAXINFO: + if (m_iMinHeight != -1 && m_iMinWidth != -1) { + MINMAXINFO *lpmmi = (MINMAXINFO*)lParam; + lpmmi->ptMinTrackSize.y = m_iMinHeight; + lpmmi->ptMinTrackSize.x = m_iMinWidth; + return 0; + } + break; + case WM_MEASUREITEM: { MEASUREITEMSTRUCT *param = (MEASUREITEMSTRUCT *)lParam; diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 687ddc287a..5adff0f533 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -1433,3 +1433,4 @@ XmlGetChildText @1645 ?GetTime@CCtrlDate@@QAEXPAU_SYSTEMTIME@@@Z @1649 NONAME
?OnNotify@CCtrlDate@@EAEHHPAUtagNMHDR@@@Z @1650 NONAME
?SetTime@CCtrlDate@@QAEXPAU_SYSTEMTIME@@@Z @1651 NONAME
+?SetMinSize@CDlgBase@@QAEXHH@Z @1652 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index faa7e58b4d..4ff6e8e65f 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -1433,3 +1433,4 @@ XmlGetChildText @1645 ?GetTime@CCtrlDate@@QEAAXPEAU_SYSTEMTIME@@@Z @1649 NONAME
?OnNotify@CCtrlDate@@EEAAHHPEAUtagNMHDR@@@Z @1650 NONAME
?SetTime@CCtrlDate@@QEAAXPEAU_SYSTEMTIME@@@Z @1651 NONAME
+?SetMinSize@CDlgBase@@QEAAXHH@Z @1652 NONAME
|