projects
/
wxWidgets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0470b38
)
fix for using an invalid HWND in IsEditable
author
Vadim Zeitlin
<vadim@wxwidgets.org>
Sun, 10 Mar 2002 14:46:25 +0000
(14:46 +0000)
committer
Vadim Zeitlin
<vadim@wxwidgets.org>
Sun, 10 Mar 2002 14:46:25 +0000
(14:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14541
c3d73ce0
-8a6f-49c7-b76d-
6d57e0e08775
src/msw/textctrl.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/msw/textctrl.cpp
b/src/msw/textctrl.cpp
index 12716ffeb5165b8e13154da8b699a7e2f0b35aaa..e9bbcc1ad55477c6292036242fb3d027aa7c6ae7 100644
(file)
--- a/
src/msw/textctrl.cpp
+++ b/
src/msw/textctrl.cpp
@@
-844,6
+844,12
@@
void wxTextCtrl::GetSelection(long* from, long* to) const
bool wxTextCtrl::IsEditable() const
{
+ // strangely enough, we may be called before the control is created: our
+ // own Create() calls MSWGetStyle() which calls AcceptsFocus() which calls
+ // us
+ if ( !m_hWnd )
+ return TRUE;
+
long style = ::GetWindowLong(GetHwnd(), GWL_STYLE);
return (style & ES_READONLY) == 0;