From 518e10779e770eac62fcedc96e750e538fa395ba Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 13 Dec 2014 10:34:55 +0000 Subject: Minor warnings fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@11364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_form.cpp | 43 ++++++++++++++++------------------- 1 file changed, 19 insertions(+), 24 deletions(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 7afa2152b4..45a71c3210 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -718,25 +718,23 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, switch (msg) { case WM_INITDIALOG: - { - HXML n; - LONG frameExStyle; - // lParam is (JABBER_FORM_INFO *) TranslateDialogDefault(hwndDlg); ShowWindow(GetDlgItem(hwndDlg, IDC_FRAME_TEXT), SW_HIDE); jfi = (JABBER_FORM_INFO*)lParam; if (jfi != NULL) { + HXML n; + LONG frameExStyle; // Set dialog title - if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , "title")) != NULL && xmlGetText(n) != NULL) + if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , _T("title"))) != NULL && xmlGetText(n) != NULL) SetWindowText(hwndDlg, xmlGetText(n)); else if (jfi->defTitle != NULL) SetWindowText(hwndDlg, TranslateTS(jfi->defTitle)); // Set instruction field - if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , "instructions")) != NULL && xmlGetText(n) != NULL) + if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , _T("instructions"))) != NULL && xmlGetText(n) != NULL) JabberFormSetInstruction(hwndDlg, xmlGetText(n)); else { - if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode, "title")) != NULL && xmlGetText(n) != NULL) + if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode, _T("title"))) != NULL && xmlGetText(n) != NULL) JabberFormSetInstruction(hwndDlg, xmlGetText(n)); else if (jfi->defTitle != NULL) JabberFormSetInstruction(hwndDlg, TranslateTS(jfi->defTitle)); @@ -752,26 +750,23 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, jfi->frameHeight = rect.bottom - rect.top; JabberFormCreateUI(GetDlgItem(hwndDlg, IDC_FRAME), jfi->xNode, &(jfi->formHeight)); } - } - - if (jfi->formHeight > jfi->frameHeight) { - HWND hwndScroll; - hwndScroll = GetDlgItem(hwndDlg, IDC_VSCROLL); - EnableWindow(hwndScroll, TRUE); - SetScrollRange(hwndScroll, SB_CTL, 0, jfi->formHeight - jfi->frameHeight, FALSE); - jfi->curPos = 0; - } + if (jfi->formHeight > jfi->frameHeight) { + HWND hwndScroll = GetDlgItem(hwndDlg, IDC_VSCROLL); + EnableWindow(hwndScroll, TRUE); + SetScrollRange(hwndScroll, SB_CTL, 0, jfi->formHeight - jfi->frameHeight, FALSE); + jfi->curPos = 0; + } - // Enable WS_EX_CONTROLPARENT on IDC_FRAME (so tab stop goes through all its children) - frameExStyle = GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE); - frameExStyle |= WS_EX_CONTROLPARENT; - SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE, frameExStyle); + // Enable WS_EX_CONTROLPARENT on IDC_FRAME (so tab stop goes through all its children) + frameExStyle = GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE); + frameExStyle |= WS_EX_CONTROLPARENT; + SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE, frameExStyle); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) jfi); - if (jfi->pfnSubmit != NULL) - EnableWindow(GetDlgItem(hwndDlg, IDC_SUBMIT), TRUE); - } + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) jfi); + if (jfi->pfnSubmit != NULL) + EnableWindow(GetDlgItem(hwndDlg, IDC_SUBMIT), TRUE); + } return TRUE; case WM_CTLCOLORSTATIC: -- cgit v1.2.3