diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-12-13 10:34:55 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-12-13 10:34:55 +0000 |
commit | 518e10779e770eac62fcedc96e750e538fa395ba (patch) | |
tree | 3293ee5f3c2c6c5bffa1cb757dc52519d30352f2 /protocols/JabberG/src | |
parent | b5b57169c2833b9e70cc4cff7cae127c11f02683 (diff) |
Minor warnings fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@11364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_form.cpp | 43 |
1 files changed, 19 insertions, 24 deletions
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:
|