X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5de76427c87d8289f5c343cef16e9375056fc49f..a43a4f9d4d4a7f107e81bc7de0c1eea729593ee2:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 6fb4b4af7f..de33833bea 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __PRIVATEH__ -#define __PRIVATEH__ +#ifndef _WX_PRIVATE_H_ +#define _WX_PRIVATE_H_ #include "wx/defs.h" @@ -20,10 +20,10 @@ class WXDLLEXPORT wxFont ; -void WXDLLEXPORT wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font); -void WXDLLEXPORT wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos); -wxWindow* WXDLLEXPORT wxFindWinFromHandle(WXHWND hWnd); -void WXDLLEXPORT wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos); +WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font); +WXDLLEXPORT void wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos); +WXDLLEXPORT wxWindow* wxFindWinFromHandle(WXHWND hWnd); +WXDLLEXPORT void wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos); WXDLLEXPORT_DATA(extern HICON) wxSTD_FRAME_ICON; WXDLLEXPORT_DATA(extern HICON) wxSTD_MDIPARENTFRAME_ICON; @@ -33,9 +33,9 @@ WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON; WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON; WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; -extern HINSTANCE WXDLLEXPORT wxGetInstance(); -void WXDLLEXPORT wxFillLogFont(LOGFONT *logFont, wxFont *font); -wxFont WXDLLEXPORT wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNew = TRUE); +WXDLLEXPORT HINSTANCE wxGetInstance(); +WXDLLEXPORT void wxFillLogFont(LOGFONT *logFont, wxFont *font); +WXDLLEXPORT wxFont wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNew = TRUE); #ifdef __GNUWIN32__ # define CASTWNDPROC (long unsigned) @@ -52,28 +52,28 @@ wxFont WXDLLEXPORT wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNe # endif #endif -#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not +#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not #define APIENTRY FAR PASCAL #endif - + #ifdef __WIN32__ #define _EXPORT /**/ #else #define _EXPORT _export typedef signed short int SHORT ; #endif - -#if !defined(__WIN32__) // 3.x uses FARPROC for dialogs + +#if !defined(__WIN32__) // 3.x uses FARPROC for dialogs #define DLGPROC FARPROC #endif -#if USE_PENWIN -void WXDLLEXPORT wxRegisterPenWin(void); -void WXDLLEXPORT wxCleanUpPenWin(void); -void WXDLLEXPORT wxEnablePenAppHooks (bool hook); +#if wxUSE_PENWIN +WXDLLEXPORT void wxRegisterPenWin(void); +WXDLLEXPORT void wxCleanUpPenWin(void); +WXDLLEXPORT void wxEnablePenAppHooks (bool hook); #endif -#if USE_ITSY_BITSY +#if wxUSE_ITSY_BITSY #define IBS_HORZCAPTION 0x4000L #define IBS_VERTCAPTION 0x8000L @@ -104,7 +104,7 @@ VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ; * Decide what window classes we're going to use * for this combination of CTl3D/FAFA settings */ - + #define STATIC_CLASS "STATIC" #define STATIC_FLAGS (SS_LEFT|WS_CHILD|WS_VISIBLE) #define CHECK_CLASS "BUTTON" @@ -126,8 +126,9 @@ VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ; #define MEANING_CHARACTER '0' #define DEFAULT_ITEM_WIDTH 200 #define DEFAULT_ITEM_HEIGHT 80 -#define EDIT_CONTROL_FACTOR (15.0/10.0) - // Scale font to get edit control height + +// Scale font to get edit control height +#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (3*(cy)/2) // Generic subclass proc, for panel item moving/sizing and intercept // EDIT control VK_RETURN messages @@ -135,7 +136,7 @@ extern LONG APIENTRY _EXPORT wxSubclassedGenericControlProc(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); // Find maximum size of window/rectangle -extern void WXDLLEXPORT wxFindMaxSize(WXHWND hwnd, RECT *rect); +WXDLLEXPORT extern void wxFindMaxSize(WXHWND hwnd, RECT *rect); // List of scrollbar controls WXDLLEXPORT_DATA(extern wxList) wxScrollBarList; @@ -144,12 +145,31 @@ WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc; WXDLLEXPORT_DATA(extern char*) wxBuffer; WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; -wxWindow* WXDLLEXPORT wxFindControlFromHandle(WXHWND hWnd); -void WXDLLEXPORT wxAddControlHandle(WXHWND hWnd, wxWindow *item); +WXDLLEXPORT wxWindow* wxFindControlFromHandle(WXHWND hWnd); +WXDLLEXPORT void wxAddControlHandle(WXHWND hWnd, wxWindow *item); + +// Safely get the window text (i.e. without using fixed size buffer) +WXDLLEXPORT extern wxString wxGetWindowText(WXHWND hWnd); + +// Does this window style specify any border? +inline bool wxStyleHasBorder(long style) +{ + return (style & (wxSIMPLE_BORDER | wxRAISED_BORDER | + wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0; +} #if !defined(__WIN32__) && !defined(WS_EX_CLIENTEDGE) -#define WS_EX_CLIENTEDGE 0 + #define WS_EX_CLIENTEDGE 0 +#endif + +#if defined(__WIN95__) && defined(__WXDEBUG__) && wxUSE_DBWIN32 +#ifdef OutputDebugString +#undef OutputDebugString +#endif + +#define OutputDebugString OutputDebugStringW95 +extern void OutputDebugStringW95(const char*, ...); #endif #endif - // __PRIVATEH__ + // _WX_PRIVATE_H_