got rid of wxWindow::m_lDlgCode - now wxWANTS_CHARS style should work for all windows, even the native controls

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-02-06 00:58:11 +00:00
parent c448540d81
commit 0cf5b09998
7 changed files with 62 additions and 43 deletions

View File

@@ -303,9 +303,6 @@ void wxWindowMSW::Init()
m_hWnd = 0;
// pass WM_GETDLGCODE to DefWindowProc()
m_lDlgCode = 0;
m_xThumbSize = 0;
m_yThumbSize = 0;
m_backgroundTransparent = FALSE;
@@ -415,14 +412,6 @@ bool wxWindowMSW::Create(wxWindow *parent,
{
msflags |= WS_BORDER;
}
// calculate the value to return from WM_GETDLGCODE handler
if ( GetWindowStyleFlag() & wxWANTS_CHARS )
{
// want everything: i.e. all keys and WM_CHAR message
m_lDlgCode = DLGC_WANTARROWS | DLGC_WANTCHARS |
DLGC_WANTTAB | DLGC_WANTMESSAGE;
}
#endif // wxUniversal/!wxUniversal
if ( style & wxPOPUP_WINDOW )
@@ -2369,9 +2358,11 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
#endif // defined(WM_DRAWITEM)
case WM_GETDLGCODE:
if ( m_lDlgCode )
if ( GetWindowStyleFlag() & wxWANTS_CHARS )
{
rc.result = m_lDlgCode;
// want everything: i.e. all keys and WM_CHAR message
rc.result = DLGC_WANTARROWS | DLGC_WANTCHARS |
DLGC_WANTTAB | DLGC_WANTMESSAGE;
processed = TRUE;
}
//else: get the dlg code from the DefWindowProc()