Files
wxWidgets/src/msw/nativewin.cpp
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

89 lines
2.6 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: src/msw/nativewin.cpp
// Purpose: wxNativeWindow implementation
// Author: Vadim Zeitlin
// Created: 2008-03-05
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#endif // WX_PRECOMP
#include "wx/nativewin.h"
#include "wx/msw/private.h"
// ============================================================================
// implementation
// ============================================================================
bool wxNativeContainerWindow::Create(wxNativeContainerWindowHandle hwnd)
{
if ( !::IsWindow(hwnd) )
{
// strictly speaking, the fact that IsWindow() returns true doesn't
// mean that the window handle is valid -- it could be being deleted
// right now, for example
//
// but if it returns false, the handle is definitely invalid
return false;
}
// make this HWND really a wxWindow
SubclassWin(hwnd);
// inherit the other attributes we can from the native HWND
AdoptAttributesFromHWND();
return true;
}
bool wxNativeContainerWindow::IsShown() const
{
return (IsWindowVisible(static_cast<HWND>(m_hWnd)) != 0);
}
void wxNativeContainerWindow::OnNativeDestroyed()
{
// don't use Close() or even Destroy() here, we really don't want to keep
// an object using a no more existing HWND around for longer than necessary
delete this;
}
WXLRESULT wxNativeContainerWindow::MSWWindowProc(WXUINT nMsg,
WXWPARAM wParam,
WXLPARAM lParam)
{
if ( nMsg == WM_DESTROY )
{
OnNativeDestroyed();
return 0;
}
return wxTopLevelWindow::MSWWindowProc(nMsg, wParam, lParam);
}
wxNativeContainerWindow::~wxNativeContainerWindow()
{
// prevent the base class dtor from destroying the window, it doesn't
// belong to us so we should leave it alive
DissociateHandle();
}