// Author: Julian Smart
// Modified by:
// Created: 04/01/98
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#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__)
#if !defined(__GNUWIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
#include <direct.h>
- #ifndef __MWERKS__
- #include <dos.h>
- #endif
+ #include <dos.h>
#endif //GNUWIN32
#if defined(__CYGWIN__)
!regKey.QueryValue(wxT("Name"), hostName) )
return false;
- wxStrlcpy(buf, hostName.wx_str(), maxSize);
+ wxStrlcpy(buf, hostName.t_str(), maxSize);
#else // !__WXWINCE__
DWORD nSize = maxSize;
if ( !::GetComputerName(buf, &nSize) )
envstr += '=';
if ( value )
envstr += value;
- _tputenv(envstr.t_str());
+ if ( _tputenv(envstr.t_str()) != 0 )
+ return false;
#else // other compiler
if ( !::SetEnvironmentVariable(var.t_str(), value) )
{
return ::GetCurrentProcessId();
}
-// Emit a beeeeeep
-void wxBell()
-{
- ::MessageBeep((UINT)-1); // default sound
-}
-
bool wxIsDebuggerRunning()
{
#if wxUSE_DYNLIB_CLASS
wxLoadUserResource(const void **outData,
size_t *outLen,
const wxString& resourceName,
- const wxString& resourceType,
+ const wxChar* resourceType,
WXHINSTANCE instance)
{
wxCHECK_MSG( outData && outLen, false, "output pointers can't be NULL" );
HRSRC hResource = ::FindResource(instance,
- resourceName.wx_str(),
- resourceType.wx_str());
+ resourceName.t_str(),
+ resourceType);
if ( !hResource )
return false;
char *
wxLoadUserResource(const wxString& resourceName,
- const wxString& resourceType,
+ const wxChar* resourceType,
int* pLen,
WXHINSTANCE instance)
{
#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)
{