From 28c8e357d9b52584cca400864dbefed69b69f8f6 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Thu, 19 Feb 2015 23:12:55 +0000 Subject: core: WINE fix - handle invalid WNDPROC for edit control TabSRMM: wine fixes for settings, code rewrited SimpleStatusMsg: resourses changed git-svn-id: http://svn.miranda-ng.org/main/trunk@12206 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SimpleStatusMsg/res/resource.rc | 16 ++++++++++------ plugins/SimpleStatusMsg/src/options.cpp | 6 +++--- plugins/SimpleStatusMsg/src/resource.h | 1 + 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'plugins/SimpleStatusMsg') diff --git a/plugins/SimpleStatusMsg/res/resource.rc b/plugins/SimpleStatusMsg/res/resource.rc index 9de2325ca3..8de8c2a3ad 100644 --- a/plugins/SimpleStatusMsg/res/resource.rc +++ b/plugins/SimpleStatusMsg/res/resource.rc @@ -7,7 +7,9 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -17,7 +19,7 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1250) +#pragma code_page(1251) #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -25,18 +27,20 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "..\\src\\resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp index d5b147eaf6..a43ff3519a 100644 --- a/plugins/SimpleStatusMsg/src/options.cpp +++ b/plugins/SimpleStatusMsg/src/options.cpp @@ -102,19 +102,20 @@ struct OptDlgData struct SingleStatusMsg *status_msg; }; -static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { struct OptDlgData *data = (struct OptDlgData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (uMsg) { case WM_INITDIALOG: { - int val, i, index; + int val, i, index; TranslateDialogDefault(hwndDlg); data = (struct OptDlgData *)mir_alloc(sizeof(struct OptDlgData)); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data); + mir_subclassWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), OptEditBoxSubProc); SendDlgItemMessage(hwndDlg, IDC_OPTEDIT1, EM_LIMITTEXT, 1024, 0); SendDlgItemMessage(hwndDlg, IDC_SMAXLENGTH, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_EMAXLENGTH), 0); @@ -254,7 +255,6 @@ static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L } ShowWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), ServiceExists(MS_VARS_FORMATSTRING)); - mir_subclassWindow( GetDlgItem(hwndDlg, IDC_OPTEDIT1), OptEditBoxSubProc); return TRUE; } diff --git a/plugins/SimpleStatusMsg/src/resource.h b/plugins/SimpleStatusMsg/src/resource.h index 6646093446..a7a25c8396 100644 --- a/plugins/SimpleStatusMsg/src/resource.h +++ b/plugins/SimpleStatusMsg/src/resource.h @@ -111,6 +111,7 @@ #define ID__FORTUNEAWAYMSG 40034 #define IDM_VRANDMSG 40035 #define IDM_VRANDDEFMSG 40036 +#define IDC_STATIC -1 // Next default values for new objects // -- cgit v1.2.3