No changes, just extract wxCreateHiddenWindow() declaration in a header.
Add wx/msw/private/hiddenwin.h with wxCreateHiddenWindow() declaration instead of declaring it manually in all the files using it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
31
include/wx/msw/private/hiddenwin.h
Normal file
31
include/wx/msw/private/hiddenwin.h
Normal file
@@ -0,0 +1,31 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/private/hiddenwin.h
|
||||
// Purpose: Helper for creating a hidden window used by wxMSW internally.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-09-16
|
||||
// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSW_PRIVATE_HIDDENWIN_H_
|
||||
#define _WX_MSW_PRIVATE_HIDDENWIN_H_
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
/*
|
||||
Creates a hidden window with supplied window proc registering the class for
|
||||
it if necessary (i.e. the first time only). Caller is responsible for
|
||||
destroying the window and unregistering the class (note that this must be
|
||||
done because wxWidgets may be used as a DLL and so may be loaded/unloaded
|
||||
multiple times into/from the same process so we can't rely on automatic
|
||||
Windows class unregistration).
|
||||
|
||||
pclassname is a pointer to a caller stored classname, which must initially be
|
||||
NULL. classname is the desired wndclass classname. If function successfully
|
||||
registers the class, pclassname will be set to classname.
|
||||
*/
|
||||
extern "C" WXDLLIMPEXP_BASE HWND
|
||||
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
|
||||
|
||||
#endif // _WX_MSW_PRIVATE_HIDDENWIN_H_
|
@@ -40,6 +40,7 @@
|
||||
#include "wx/generic/choicdgg.h"
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/private/hiddenwin.h"
|
||||
#include "wx/dynlib.h"
|
||||
|
||||
wxDEFINE_EVENT( wxEVT_DIALUP_CONNECTED, wxDialUpEvent );
|
||||
@@ -66,10 +67,6 @@ wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent );
|
||||
#define INTERNET_CONNECTION_PROXY 4
|
||||
#endif
|
||||
|
||||
// implemented in utils.cpp
|
||||
extern "C" WXDLLIMPEXP_BASE HWND
|
||||
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
|
||||
|
||||
static const wxChar *
|
||||
wxMSWDIALUP_WNDCLASSNAME = wxT("_wxDialUpManager_Internal_Class");
|
||||
static const wxChar *gs_classForDialUpWindow = NULL;
|
||||
|
@@ -59,11 +59,9 @@ WX_DECLARE_HASH_MAP(int,bool,wxIntegerHash,wxIntegerEqual,SocketHash);
|
||||
# pragma warning(default:4115) /* named type definition in parentheses */
|
||||
#endif
|
||||
|
||||
#define CLASSNAME TEXT("_wxSocket_Internal_Window_Class")
|
||||
#include "wx/msw/private/hiddenwin.h"
|
||||
|
||||
/* implemented in utils.cpp */
|
||||
extern "C" WXDLLIMPEXP_BASE HWND
|
||||
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
|
||||
#define CLASSNAME TEXT("_wxSocket_Internal_Window_Class")
|
||||
|
||||
/* Maximum number of different wxSocket objects at a given time.
|
||||
* This value can be modified at will, but it CANNOT be greater
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#endif
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/private/hiddenwin.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private globals
|
||||
@@ -76,11 +77,6 @@ UINT_PTR GetNewTimerId(wxMSWTimerImpl *t)
|
||||
LRESULT APIENTRY _EXPORT wxTimerWndProc(HWND hWnd, UINT message,
|
||||
WPARAM wParam, LPARAM lParam);
|
||||
|
||||
// implemented in utils.cpp
|
||||
extern "C" WXDLLIMPEXP_BASE HWND
|
||||
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTimerHiddenWindowModule: used to manage the hidden window used for
|
||||
// catching timer messages (we need a module to ensure that the window is
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include "wx/confbase.h" // for wxExpandEnvVars()
|
||||
|
||||
#include "wx/msw/private.h" // includes <windows.h>
|
||||
#include "wx/msw/private/hiddenwin.h"
|
||||
#include "wx/msw/missing.h" // for CHARSET_HANGUL
|
||||
|
||||
#if defined(__CYGWIN__)
|
||||
@@ -1724,18 +1725,6 @@ extern long wxCharsetToCodepage(const char *name)
|
||||
|
||||
#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
|
||||
|
||||
/*
|
||||
Creates a hidden window with supplied window proc registering the class for
|
||||
it if necesssary (i.e. the first time only). Caller is responsible for
|
||||
destroying the window and unregistering the class (note that this must be
|
||||
done because wxWidgets may be used as a DLL and so may be loaded/unloaded
|
||||
multiple times into/from the same process so we cna't rely on automatic
|
||||
Windows class unregistration).
|
||||
|
||||
pclassname is a pointer to a caller stored classname, which must initially be
|
||||
NULL. classname is the desired wndclass classname. If function successfully
|
||||
registers the class, pclassname will be set to classname.
|
||||
*/
|
||||
extern "C" WXDLLIMPEXP_BASE HWND
|
||||
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc)
|
||||
{
|
||||
|
@@ -82,9 +82,7 @@
|
||||
#include "wx/dde.h" // for WX_DDE hack in wxExecute
|
||||
#endif // wxUSE_IPC
|
||||
|
||||
// implemented in utils.cpp
|
||||
extern "C" WXDLLIMPEXP_BASE HWND
|
||||
wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc);
|
||||
#include "wx/msw/private/hiddenwin.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
|
Reference in New Issue
Block a user