summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/SendScreenshotPlus/res/resource.rc2
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp7
2 files changed, 6 insertions, 3 deletions
diff --git a/plugins/SendScreenshotPlus/res/resource.rc b/plugins/SendScreenshotPlus/res/resource.rc
index 941b74b161..4ac2dd9a20 100644
--- a/plugins/SendScreenshotPlus/res/resource.rc
+++ b/plugins/SendScreenshotPlus/res/resource.rc
@@ -32,7 +32,7 @@ CAPTION "Dialog"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "",STATIC_WHITERECT,0,0,219,72
- LTEXT "",TXT_NAME,11,3,173,16,NOT WS_VISIBLE,WS_EX_TRANSPARENT
+ LTEXT "",TXT_NAME,11,3,173,20,NOT WS_VISIBLE,WS_EX_TRANSPARENT
ICON "",ICO_DLGLOGO,191,3,21,20,NOT WS_VISIBLE
ICON "",ICO_MSGDLG,7,29,21,20
LTEXT "",TXT_MESSAGE,34,37,180,35
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index a8ba2b3227..5cc042b225 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -248,8 +248,8 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
}
// increase width if info text requires more
if((pMsgBox->uType&MB_INFOBAR) && pMsgBox->ptszInfoText && *pMsgBox->ptszInfoText){
- RECT rcico;
- GetClientRect(GetDlgItem(hDlg,ICO_DLGLOGO), &rcico);
+ int multiline=0;
+ RECT rcico; GetClientRect(GetDlgItem(hDlg,ICO_DLGLOGO), &rcico);
rcico.right=rcico.right*100/66; // padding
for(rs=h=pMsgBox->ptszInfoText; ; ++h) {
if (*h=='\n' || !*h) {
@@ -260,8 +260,11 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (!*h)
break;
rs = h + 1;
+ ++multiline;
}
}
+ if(!multiline)
+ SetWindowLongPtr(GetDlgItem(hDlg,TXT_NAME),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hDlg,TXT_NAME),GWL_STYLE)|SS_CENTERIMAGE);
}
ReleaseDC(hDlg, hDC);