projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the source files non-executable again.
[wxWidgets.git]
/
src
/
msw
/
nativdlg.cpp
diff --git
a/src/msw/nativdlg.cpp
b/src/msw/nativdlg.cpp
index 903c4e9f1932343333d67f0ef25ea384cdc009ec..d5cce1f1e547d7d2922c2dd13bff2f256f11c7a6 100644
(file)
--- a/
src/msw/nativdlg.cpp
+++ b/
src/msw/nativdlg.cpp
@@
-1,12
+1,12
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: nativdlg.cpp
+// Name:
src/msw/
nativdlg.cpp
// Purpose: Native dialog loading code (part of wxWindow)
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Purpose: Native dialog loading code (part of wxWindow)
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWi
dget
s licence
+// Licence: wxWi
ndow
s licence
/////////////////////////////////////////////////////////////////////////////
// ===========================================================================
/////////////////////////////////////////////////////////////////////////////
// ===========================================================================
@@
-17,10
+17,6
@@
// headers
// ---------------------------------------------------------------------------
// headers
// ---------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-34,9
+30,7
@@
#include "wx/wx.h"
#endif
#include "wx/wx.h"
#endif
-#if defined(__WIN95__)
#include "wx/spinbutt.h"
#include "wx/spinbutt.h"
-#endif
#include "wx/msw/private.h"
// ---------------------------------------------------------------------------
#include "wx/msw/private.h"
// ---------------------------------------------------------------------------
@@
-61,7
+55,7
@@
bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id)
(DLGPROC) wxDlgProc);
if ( !m_hWnd )
(DLGPROC) wxDlgProc);
if ( !m_hWnd )
- return
FALSE
;
+ return
false
;
SubclassWin(GetHWND());
SubclassWin(GetHWND());
@@
-84,7
+78,7
@@
bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id)
CreateWindowFromHWND(this, (WXHWND) hWndNext);
}
CreateWindowFromHWND(this, (WXHWND) hWndNext);
}
- return
TRUE
;
+ return
true
;
}
bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
}
bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
@@
-98,7
+92,7
@@
bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
(DLGPROC)wxDlgProc);
if ( !m_hWnd )
(DLGPROC)wxDlgProc);
if ( !m_hWnd )
- return
FALSE
;
+ return
false
;
SubclassWin(GetHWND());
SubclassWin(GetHWND());
@@
-121,7
+115,7
@@
bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
CreateWindowFromHWND(this, (WXHWND) hWndNext);
}
CreateWindowFromHWND(this, (WXHWND) hWndNext);
}
- return
TRUE
;
+ return
true
;
}
// ---------------------------------------------------------------------------
}
// ---------------------------------------------------------------------------
@@
-152,20
+146,14
@@
wxWindow* wxWindow::GetWindowChild(wxWindowID id)
wxWindow* win = GetWindowChild1(id);
if ( !win )
{
wxWindow* win = GetWindowChild1(id);
if ( !win )
{
- HWND hWnd = ::GetDlgItem((HWND) GetHWND(), id);
-
- if (hWnd)
+ HWND hwnd = ::GetDlgItem(GetHwnd(), id);
+ if ( hwnd )
{
{
- wxWindow* child = CreateWindowFromHWND(this, (WXHWND) hWnd);
- if (child)
- {
- child->AddChild(this);
- return child;
- }
+ win = CreateWindowFromHWND(this, (WXHWND) hwnd);
}
}
}
}
- return
NULL
;
+ return
win
;
}
// ---------------------------------------------------------------------------
}
// ---------------------------------------------------------------------------
@@
-174,6
+162,8
@@
wxWindow* wxWindow::GetWindowChild(wxWindowID id)
wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
{
wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
{
+ wxCHECK_MSG( parent, NULL, wxT("must have valid parent for a control") );
+
wxString str(wxGetWindowClass(hWnd));
str.UpperCase();
wxString str(wxGetWindowClass(hWnd));
str.UpperCase();
@@
-271,7
+261,7
@@
wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
win = new wxScrollBar;
}
#endif
win = new wxScrollBar;
}
#endif
-#if
defined(__WIN95__) &&
wxUSE_SPINBTN
+#if wxUSE_SPINBTN
else if (str == wxT("MSCTLS_UPDOWN32"))
{
win = new wxSpinButton;
else if (str == wxT("MSCTLS_UPDOWN32"))
{
win = new wxSpinButton;
@@
-305,7
+295,7
@@
wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
wxLogError(wxT("Please make SS_BITMAP statics into owner-draw buttons."));
}
#endif
wxLogError(wxT("Please make SS_BITMAP statics into owner-draw buttons."));
}
#endif
-#endif /* wxUSE_STATBMP */
+#endif /* wxUSE_STATBMP */
}
#endif
else
}
#endif
else
@@
-318,9
+308,6
@@
wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
if (win)
{
parent->AddChild(win);
if (win)
{
parent->AddChild(win);
- win->SetEventHandler(win);
- win->SetHWND(hWnd);
- win->SetId(id);
win->SubclassWin(hWnd);
win->AdoptAttributesFromHWND();
win->SetupColours();
win->SubclassWin(hWnd);
win->AdoptAttributesFromHWND();
win->SetupColours();
@@
-330,14
+317,14
@@
wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
}
// Make sure the window style (etc.) reflects the HWND style (roughly)
}
// Make sure the window style (etc.) reflects the HWND style (roughly)
-void wxWindow::AdoptAttributesFromHWND(
void
)
+void wxWindow::AdoptAttributesFromHWND()
{
{
- HWND hWnd = (HWND) GetHWND();
- long style = GetWindowLong((HWND) hWnd, GWL_STYLE);
+ SetId(wxGetWindowId(m_hWnd));
+
+ long style = GetWindowLong(GetHwnd(), GWL_STYLE);
if (style & WS_VSCROLL)
m_windowStyle |= wxVSCROLL;
if (style & WS_HSCROLL)
m_windowStyle |= wxHSCROLL;
}
if (style & WS_VSCROLL)
m_windowStyle |= wxVSCROLL;
if (style & WS_HSCROLL)
m_windowStyle |= wxHSCROLL;
}
-