1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: private.h
|
1999-05-13 21:21:04 +00:00
|
|
|
// Purpose: Private declarations: as this header is only included by
|
|
|
|
// wxWindows itself, it may contain identifiers which don't start
|
|
|
|
// with "wx".
|
1998-05-20 14:12:05 +00:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
1998-10-14 23:53:24 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 23:52:45 +00:00
|
|
|
#ifndef _WX_PRIVATE_H_
|
|
|
|
#define _WX_PRIVATE_H_
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
1999-05-19 00:53:27 +00:00
|
|
|
// undefine conflicting symbols which were defined in windows.h
|
|
|
|
#include "wx/msw/winundef.h"
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
class WXDLLEXPORT wxFont;
|
1999-06-13 22:54:04 +00:00
|
|
|
class WXDLLEXPORT wxWindow;
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-05-19 00:53:27 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// private constants
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Conversion
|
|
|
|
static const double METRIC_CONVERSION_CONSTANT = 0.0393700787;
|
|
|
|
|
|
|
|
// Scaling factors for various unit conversions
|
|
|
|
static const double mm2inches = (METRIC_CONVERSION_CONSTANT);
|
|
|
|
static const double inches2mm = (1/METRIC_CONVERSION_CONSTANT);
|
|
|
|
|
|
|
|
static const double mm2twips = (METRIC_CONVERSION_CONSTANT*1440);
|
|
|
|
static const double twips2mm = (1/(METRIC_CONVERSION_CONSTANT*1440));
|
|
|
|
|
|
|
|
static const double mm2pt = (METRIC_CONVERSION_CONSTANT*72);
|
|
|
|
static const double pt2mm = (1/(METRIC_CONVERSION_CONSTANT*72));
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// standard icons from the resources
|
|
|
|
// ---------------------------------------------------------------------------
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-27 22:57:06 +00:00
|
|
|
#if wxUSE_GUI
|
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
WXDLLEXPORT_DATA(extern HICON) wxSTD_FRAME_ICON;
|
|
|
|
WXDLLEXPORT_DATA(extern HICON) wxSTD_MDIPARENTFRAME_ICON;
|
|
|
|
WXDLLEXPORT_DATA(extern HICON) wxSTD_MDICHILDFRAME_ICON;
|
|
|
|
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_FRAME_ICON;
|
|
|
|
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON;
|
|
|
|
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON;
|
|
|
|
WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
|
|
|
|
|
1999-11-27 22:57:06 +00:00
|
|
|
#endif // wxUSE_GUI
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
1999-11-06 00:43:31 +00:00
|
|
|
// define things missing from some compilers' headers
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
1999-06-08 20:56:50 +00:00
|
|
|
|
2001-02-08 11:19:25 +00:00
|
|
|
#if defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS
|
1999-11-07 18:34:36 +00:00
|
|
|
#ifndef ZeroMemory
|
1999-11-06 00:43:31 +00:00
|
|
|
inline void ZeroMemory(void *buf, size_t len) { memset(buf, 0, len); }
|
1999-11-07 18:34:36 +00:00
|
|
|
#endif
|
1999-11-06 00:43:31 +00:00
|
|
|
#endif // old mingw32
|
|
|
|
|
|
|
|
// this defines a CASTWNDPROC macro which casts a pointer to the type of a
|
|
|
|
// window proc
|
1998-12-28 12:35:49 +00:00
|
|
|
|
2001-06-08 15:04:00 +00:00
|
|
|
#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
|
2000-07-15 19:51:35 +00:00
|
|
|
#define CASTWNDPROC (long unsigned)
|
2000-02-11 13:29:43 +00:00
|
|
|
#else
|
2000-07-15 19:51:35 +00:00
|
|
|
#if defined(STRICT) || defined(__GNUC__)
|
|
|
|
typedef WNDPROC WndProcCast;
|
|
|
|
#else
|
|
|
|
typedef FARPROC WndProcCast;
|
|
|
|
#endif
|
|
|
|
#define CASTWNDPROC (WndProcCast)
|
|
|
|
#endif // __GNUWIN32_OLD__
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// some stuff for old Windows versions (FIXME: what does it do here??)
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
1998-10-14 23:53:24 +00:00
|
|
|
#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not
|
1999-05-13 21:21:04 +00:00
|
|
|
#define APIENTRY FAR PASCAL
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
1998-10-14 23:53:24 +00:00
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
#ifdef __WIN32__
|
1999-05-13 21:21:04 +00:00
|
|
|
#define _EXPORT
|
1998-05-20 14:12:05 +00:00
|
|
|
#else
|
1999-05-13 21:21:04 +00:00
|
|
|
#define _EXPORT _export
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __WIN32__
|
|
|
|
typedef signed short int SHORT;
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
1998-10-14 23:53:24 +00:00
|
|
|
|
|
|
|
#if !defined(__WIN32__) // 3.x uses FARPROC for dialogs
|
1999-06-14 07:12:16 +00:00
|
|
|
#ifndef STRICT
|
1999-05-13 21:21:04 +00:00
|
|
|
#define DLGPROC FARPROC
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
1999-06-14 07:12:16 +00:00
|
|
|
#endif
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1998-09-25 13:28:52 +00:00
|
|
|
#if wxUSE_PENWIN
|
1999-05-10 00:42:57 +00:00
|
|
|
WXDLLEXPORT void wxRegisterPenWin();
|
|
|
|
WXDLLEXPORT void wxCleanUpPenWin();
|
|
|
|
WXDLLEXPORT void wxEnablePenAppHooks (bool hook);
|
|
|
|
#endif // wxUSE_PENWIN
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1998-09-25 13:28:52 +00:00
|
|
|
#if wxUSE_ITSY_BITSY
|
1999-05-13 21:21:04 +00:00
|
|
|
#define IBS_HORZCAPTION 0x4000L
|
|
|
|
#define IBS_VERTCAPTION 0x8000L
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
UINT WINAPI ibGetCaptionSize( HWND hWnd ) ;
|
|
|
|
UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) ;
|
|
|
|
LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ;
|
|
|
|
VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
|
|
|
|
#endif // wxUSE_ITSY_BITSY
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-02-02 12:37:14 +00:00
|
|
|
#if wxUSE_CTL3D
|
1999-05-13 21:21:04 +00:00
|
|
|
#include "wx/msw/ctl3d/ctl3d.h"
|
|
|
|
#endif // wxUSE_CTL3D
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Decide what window classes we're going to use
|
|
|
|
* for this combination of CTl3D/FAFA settings
|
|
|
|
*/
|
1998-10-14 23:53:24 +00:00
|
|
|
|
1999-10-08 14:35:56 +00:00
|
|
|
#define STATIC_CLASS wxT("STATIC")
|
1998-05-20 14:12:05 +00:00
|
|
|
#define STATIC_FLAGS (SS_LEFT|WS_CHILD|WS_VISIBLE)
|
1999-10-08 14:35:56 +00:00
|
|
|
#define CHECK_CLASS wxT("BUTTON")
|
1998-05-20 14:12:05 +00:00
|
|
|
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP|WS_CHILD)
|
|
|
|
#define CHECK_IS_FAFA FALSE
|
1999-10-08 14:35:56 +00:00
|
|
|
#define RADIO_CLASS wxT("BUTTON")
|
1998-05-20 14:12:05 +00:00
|
|
|
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_CHILD|WS_VISIBLE)
|
|
|
|
#define RADIO_SIZE 20
|
|
|
|
#define RADIO_IS_FAFA FALSE
|
|
|
|
#define PURE_WINDOWS
|
1999-10-08 14:35:56 +00:00
|
|
|
#define GROUP_CLASS wxT("BUTTON")
|
1998-05-20 14:12:05 +00:00
|
|
|
#define GROUP_FLAGS (BS_GROUPBOX|WS_CHILD|WS_VISIBLE)
|
|
|
|
|
|
|
|
/*
|
|
|
|
#define BITCHECK_FLAGS (FB_BITMAP|FC_BUTTONDRAW|FC_DEFAULT|WS_VISIBLE)
|
|
|
|
#define BITRADIO_FLAGS (FC_BUTTONDRAW|FB_BITMAP|FC_RADIO|WS_CHILD|WS_VISIBLE)
|
|
|
|
*/
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// misc macros
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
#define MEANING_CHARACTER '0'
|
2000-01-03 18:51:22 +00:00
|
|
|
#define DEFAULT_ITEM_WIDTH 100
|
1998-05-20 14:12:05 +00:00
|
|
|
#define DEFAULT_ITEM_HEIGHT 80
|
1998-09-20 21:13:46 +00:00
|
|
|
|
|
|
|
// Scale font to get edit control height
|
2000-07-15 19:51:35 +00:00
|
|
|
//#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (3*(cy)/2)
|
|
|
|
#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (cy+8)
|
1998-05-20 14:12:05 +00:00
|
|
|
|
|
|
|
// Generic subclass proc, for panel item moving/sizing and intercept
|
|
|
|
// EDIT control VK_RETURN messages
|
|
|
|
extern LONG APIENTRY _EXPORT
|
|
|
|
wxSubclassedGenericControlProc(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// constants which might miss from some compilers' headers
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#if !defined(__WIN32__) && !defined(WS_EX_CLIENTEDGE)
|
|
|
|
#define WS_EX_CLIENTEDGE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__WIN32__) && !defined(WS_EX_CLIENTEDGE)
|
|
|
|
#define WS_EX_CLIENTEDGE 0x00000200L
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ENDSESSION_LOGOFF
|
|
|
|
#define ENDSESSION_LOGOFF 0x80000000
|
|
|
|
#endif
|
|
|
|
|
1999-11-06 00:43:31 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// useful macros and functions
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// a wrapper macro for ZeroMemory()
|
1999-11-06 17:12:10 +00:00
|
|
|
#ifdef __WIN32__
|
1999-11-06 00:43:31 +00:00
|
|
|
#define wxZeroMemory(obj) ::ZeroMemory(&obj, sizeof(obj))
|
1999-11-06 17:12:10 +00:00
|
|
|
#else
|
|
|
|
#define wxZeroMemory(obj) memset((void*) & obj, 0, sizeof(obj))
|
|
|
|
#endif
|
1999-11-06 00:43:31 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
#if wxUSE_GUI
|
|
|
|
|
1999-11-07 18:34:36 +00:00
|
|
|
#include <wx/gdicmn.h>
|
|
|
|
|
1999-11-06 00:43:31 +00:00
|
|
|
// make conversion from wxColour and COLORREF a bit less painful
|
|
|
|
inline COLORREF wxColourToRGB(const wxColour& c)
|
|
|
|
{
|
|
|
|
return RGB(c.Red(), c.Green(), c.Blue());
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void wxRGBToColour(wxColour& c, COLORREF rgb)
|
|
|
|
{
|
|
|
|
c.Set(GetRValue(rgb), GetGValue(rgb), GetBValue(rgb));
|
|
|
|
}
|
|
|
|
|
2000-02-05 01:57:38 +00:00
|
|
|
// copy Windows RECT to our wxRect
|
|
|
|
inline void wxCopyRECTToRect(const RECT& r, wxRect& rect)
|
|
|
|
{
|
|
|
|
rect.y = r.top;
|
|
|
|
rect.x = r.left;
|
|
|
|
rect.width = r.right - r.left;
|
|
|
|
rect.height = r.bottom - r.top;
|
|
|
|
}
|
|
|
|
|
2000-01-13 23:39:48 +00:00
|
|
|
// translations between HIMETRIC units (which OLE likes) and pixels (which are
|
|
|
|
// liked by all the others) - implemented in msw/utilsexc.cpp
|
|
|
|
extern void HIMETRICToPixel(LONG *x, LONG *y);
|
|
|
|
extern void PixelToHIMETRIC(LONG *x, LONG *y);
|
|
|
|
|
2000-01-21 21:38:51 +00:00
|
|
|
// Windows convention of the mask is opposed to the wxWindows one, so we need
|
|
|
|
// to invert the mask each time we pass one/get one to/from Windows
|
|
|
|
extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w = 0, int h = 0);
|
|
|
|
|
2000-01-23 23:23:46 +00:00
|
|
|
// get (x, y) from DWORD - notice that HI/LOWORD can *not* be used because they
|
|
|
|
// will fail on system with multiple monitors where the coords may be negative
|
|
|
|
//
|
|
|
|
// these macros are standard now (Win98) but some older headers don't have them
|
|
|
|
#ifndef GET_X_LPARAM
|
|
|
|
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
|
|
|
|
#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
|
|
|
|
#endif // GET_X_LPARAM
|
|
|
|
|
2000-03-02 00:58:11 +00:00
|
|
|
// get the current state of SHIFT/CTRL keys
|
2000-03-04 22:54:41 +00:00
|
|
|
inline bool wxIsShiftDown()
|
2000-03-02 00:58:11 +00:00
|
|
|
{
|
|
|
|
return (::GetKeyState(VK_SHIFT) & 0x100) != 0;
|
|
|
|
}
|
|
|
|
|
2000-03-04 22:54:41 +00:00
|
|
|
inline bool wxIsCtrlDown()
|
2000-03-02 00:58:11 +00:00
|
|
|
{
|
|
|
|
return (::GetKeyState(VK_CONTROL) & 0x100) != 0;
|
|
|
|
}
|
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// small helper classes
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// create an instance of this class and use it as the HDC for screen, will
|
|
|
|
// automatically release the DC going out of scope
|
|
|
|
class ScreenHDC
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ScreenHDC() { m_hdc = GetDC(NULL); }
|
|
|
|
~ScreenHDC() { ReleaseDC(NULL, m_hdc); }
|
|
|
|
operator HDC() const { return m_hdc; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
HDC m_hdc;
|
|
|
|
};
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
1999-05-19 00:53:27 +00:00
|
|
|
// macros to make casting between WXFOO and FOO a bit easier: the GetFoo()
|
1999-06-28 21:39:49 +00:00
|
|
|
// returns Foo cast to the Windows type for oruselves, while GetFooOf() takes
|
|
|
|
// an argument which should be a pointer or reference to the object of the
|
|
|
|
// corresponding class (this depends on the macro)
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#define GetHwnd() ((HWND)GetHWND())
|
1999-06-28 21:39:49 +00:00
|
|
|
#define GetHwndOf(win) ((HWND)((win)->GetHWND()))
|
|
|
|
// old name
|
|
|
|
#define GetWinHwnd GetHwndOf
|
1999-05-13 21:21:04 +00:00
|
|
|
|
|
|
|
#define GetHdc() ((HDC)GetHDC())
|
1999-06-28 21:39:49 +00:00
|
|
|
#define GetHdcOf(dc) ((HDC)(dc).GetHDC())
|
1999-05-13 21:21:04 +00:00
|
|
|
|
1999-11-06 00:43:31 +00:00
|
|
|
#define GetHbitmap() ((HBITMAP)GetHBITMAP())
|
|
|
|
#define GetHbitmapOf(bmp) ((HBITMAP)(bmp).GetHBITMAP())
|
|
|
|
|
1999-05-19 00:53:27 +00:00
|
|
|
#define GetHicon() ((HICON)GetHICON())
|
1999-06-28 21:39:49 +00:00
|
|
|
#define GetHiconOf(icon) ((HICON)(icon).GetHICON())
|
1999-05-19 00:53:27 +00:00
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
#define GetHaccel() ((HACCEL)GetHACCEL())
|
1999-06-28 21:39:49 +00:00
|
|
|
#define GetHaccelOf(table) ((HACCEL)((table).GetHACCEL()))
|
|
|
|
|
|
|
|
#define GetHmenu() ((HMENU)GetHMenu())
|
|
|
|
#define GetHmenuOf(menu) ((HMENU)menu->GetHMenu())
|
1999-05-13 21:21:04 +00:00
|
|
|
|
2000-02-25 23:49:41 +00:00
|
|
|
#define GetHcursor() ((HCURSOR)GetHCURSOR())
|
|
|
|
#define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR())
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
#define GetHfont() ((HFONT)GetHFONT())
|
|
|
|
#define GetHfontOf(font) ((HFONT)(font).GetHFONT())
|
|
|
|
|
|
|
|
#endif // wxUSE_GUI
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
// ---------------------------------------------------------------------------
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-04-19 18:04:57 +00:00
|
|
|
WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
|
1999-11-27 22:57:06 +00:00
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance;
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// global functions
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
1999-09-17 22:24:28 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
1999-11-27 22:57:06 +00:00
|
|
|
WXDLLEXPORT HINSTANCE wxGetInstance();
|
1999-09-17 22:24:28 +00:00
|
|
|
}
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
WXDLLEXPORT void wxSetInstance(HINSTANCE hInst);
|
|
|
|
|
1999-11-27 22:57:06 +00:00
|
|
|
#if wxUSE_GUI
|
|
|
|
|
2000-02-25 23:49:41 +00:00
|
|
|
// cursor stuff
|
|
|
|
extern HCURSOR wxGetCurrentBusyCursor(); // from msw/utils.cpp
|
|
|
|
extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp
|
|
|
|
|
1999-05-13 21:21:04 +00:00
|
|
|
WXDLLEXPORT wxWindow* wxFindWinFromHandle(WXHWND hWnd);
|
|
|
|
|
1999-11-19 21:01:20 +00:00
|
|
|
WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font);
|
1999-11-06 00:43:31 +00:00
|
|
|
WXDLLEXPORT void wxFillLogFont(LOGFONT *logFont, const wxFont *font);
|
|
|
|
WXDLLEXPORT wxFont wxCreateFontFromLogFont(const LOGFONT *logFont);
|
2000-07-15 19:51:35 +00:00
|
|
|
WXDLLEXPORT wxFontEncoding wxGetFontEncFromCharSet(int charset);
|
1999-05-13 21:21:04 +00:00
|
|
|
|
|
|
|
WXDLLEXPORT void wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos);
|
|
|
|
WXDLLEXPORT void wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos);
|
|
|
|
|
|
|
|
// Find maximum size of window/rectangle
|
|
|
|
WXDLLEXPORT extern void wxFindMaxSize(WXHWND hwnd, RECT *rect);
|
|
|
|
|
1998-11-22 22:32:53 +00:00
|
|
|
WXDLLEXPORT wxWindow* wxFindControlFromHandle(WXHWND hWnd);
|
|
|
|
WXDLLEXPORT void wxAddControlHandle(WXHWND hWnd, wxWindow *item);
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1998-09-20 21:13:46 +00:00
|
|
|
// Safely get the window text (i.e. without using fixed size buffer)
|
1998-11-22 22:32:53 +00:00
|
|
|
WXDLLEXPORT extern wxString wxGetWindowText(WXHWND hWnd);
|
1998-09-20 21:13:46 +00:00
|
|
|
|
1999-05-10 00:42:57 +00:00
|
|
|
// get the window class name
|
|
|
|
WXDLLEXPORT extern wxString wxGetWindowClass(WXHWND hWnd);
|
|
|
|
|
1999-05-19 00:53:27 +00:00
|
|
|
// get the window id (should be unsigned, hence this is not wxWindowID which
|
|
|
|
// is, for mainly historical reasons, signed)
|
|
|
|
WXDLLEXPORT extern WXWORD wxGetWindowId(WXHWND hWnd);
|
1999-05-10 00:42:57 +00:00
|
|
|
|
1998-10-14 23:53:24 +00:00
|
|
|
// Does this window style specify any border?
|
1998-11-22 22:32:53 +00:00
|
|
|
inline bool wxStyleHasBorder(long style)
|
1998-10-14 23:53:24 +00:00
|
|
|
{
|
|
|
|
return (style & (wxSIMPLE_BORDER | wxRAISED_BORDER |
|
|
|
|
wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0;
|
|
|
|
}
|
|
|
|
|
2000-01-23 23:23:46 +00:00
|
|
|
// find the window for HWND which is part of some wxWindow, returns just the
|
|
|
|
// corresponding wxWindow for HWND which just is one
|
|
|
|
//
|
|
|
|
// may return NULL
|
|
|
|
extern wxWindow *wxGetWindowFromHWND(WXHWND hwnd);
|
|
|
|
|
1999-11-27 22:57:06 +00:00
|
|
|
#endif // wxUSE_GUI
|
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
1998-08-07 23:52:45 +00:00
|
|
|
// _WX_PRIVATE_H_
|