summaryrefslogtreecommitdiff
path: root/plugins/BossKeyPlus
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-17 19:28:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-17 19:28:10 +0000
commite179723cf685f24e2137c3c56b90f3e093253372 (patch)
treee807b0cb1e441ec57a8e4aa4de132094738c1819 /plugins/BossKeyPlus
parent9368e7a011c5d170f2bce119d6f3ae8bedbb32bb (diff)
MHeaderbarCtrl -> static text
git-svn-id: http://svn.miranda-ng.org/main/trunk@12894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BossKeyPlus')
-rw-r--r--plugins/BossKeyPlus/res/BossKey.rc2
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp13
2 files changed, 5 insertions, 10 deletions
diff --git a/plugins/BossKeyPlus/res/BossKey.rc b/plugins/BossKeyPlus/res/BossKey.rc
index 0e69fd1380..3f40658480 100644
--- a/plugins/BossKeyPlus/res/BossKey.rc
+++ b/plugins/BossKeyPlus/res/BossKey.rc
@@ -55,7 +55,7 @@ STYLE DS_ABSALIGN | DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS
EXSTYLE WS_EX_TOPMOST
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,188,25
+ CONTROL "Miranda NG is locked.\nEnter password to unlock it.",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,188,25
LTEXT "Password:",-1,6,35,34,8
EDITTEXT IDC_EDIT1,48,33,113,13,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "",-1,"Static",SS_ETCHEDHORZ,0,52,190,1
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index ffe9b3709f..9d29063eee 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -77,6 +77,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
{
static DWORD dwOldIcon = 0;
HICON hIcon = 0;
+ UINT uid;
switch (uMsg){
case WM_INITDIALOG:
@@ -94,7 +95,6 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
SetWindowPos(hDlg, 0, 0, 0, rect.right, rect.bottom + GetSystemMetrics(SM_CYCAPTION), SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER);
}
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_SETICON, 0, (LPARAM)hIcon);
- SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Miranda NG is locked.\nEnter password to unlock it."));
TranslateDialogDefault(hDlg);
oldLangID = 0;
@@ -115,20 +115,16 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
return (INT_PTR)GetSysColorBrush(COLOR_HIGHLIGHT);
case WM_COMMAND:
- {
- UINT uid = LOWORD(wParam);
+ uid = LOWORD(wParam);
if (uid == IDOK){
char password[MAXPASSLEN + 1] = { 0 };
int passlen = GetDlgItemTextA(hDlg, IDC_EDIT1, password, SIZEOF(password));
-
- if (passlen == 0)
- {
+ if (passlen == 0) {
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Miranda NG is locked.\nEnter password to unlock it."));
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0);
break;
}
- else if (mir_strcmp(password, g_password))
- {
+ else if (mir_strcmp(password, g_password)) {
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Password is not correct!\nPlease, enter correct password."));
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0);
SetDlgItemText(hDlg, IDC_EDIT1, _T(""));
@@ -138,7 +134,6 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
}
else if (uid == IDCANCEL)
EndDialog(hDlg, IDCANCEL);
- }
case WM_TIMER:
LanguageChanged(hDlg);