// typedefs
// ----------------------------------------------------------------------------
-#if defined(__WXMSW__) || defined (__WXPM__)
+#if (defined(__WXMSW__) && !defined(__WXMICROWIN__)) || defined (__WXPM__)
class WXDLLEXPORT wxApp;
typedef wxApp* (*wxAppInitializerFunction)();
#else
// wxCALLBACK should be used for the functions which are called back by
// Windows (such as compare function for wxListCtrl)
-#if defined(__WIN32__)
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
#define wxCALLBACK wxSTDCALL
#else
// no stdcall under Unix nor Win16
} LOGPALETTE;
#endif //__WXPM__
-#if defined(__GNUWIN32__) || defined(__WXWINE__)
+#if defined(__GNUWIN32__) || defined(__WXWINE__) || defined(__WXMICROWIN__)
typedef int (*WXFARPROC)();
#elif defined(__WIN32__)
typedef int (__stdcall *WXFARPROC)();
(void)Create(size, family, style, weight, underlined, face, encoding);
}
- wxFont(const wxNativeFontInfo& info)
+ wxFont(const wxNativeFontInfo& info, WXHFONT hFont = 0)
{
Init();
- Create(info);
+ Create(info, hFont);
}
wxFont(const wxString& fontDesc);
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
- bool Create(const wxNativeFontInfo& info);
+ bool Create(const wxNativeFontInfo& info, WXHFONT hFont = 0);
virtual ~wxFont();
--- /dev/null
+/*
+/////////////////////////////////////////////////////////////////////////////
+// Name: microwin.h
+// Purpose: Extra implementation for MicroWindows
+// Author: Julian Smart
+// Created: 2001-05-31
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+*/
+
+#ifndef _WX_MICROWIN_H_
+#define _WX_MICROWIN_H_
+
+#ifdef __GNUG__
+#pragma interface "microwin.h"
+#endif
+
+
+/* Implemented by microwin.cpp */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+BOOL SetCursorPos(int x, int y);
+
+HCURSOR SetCursor(HCURSOR hCursor);
+
+/* Implemented with wrong number of args by MicroWindows */
+/* so we need to use a different name */
+int GetScrollPosWX (HWND hWnd, int iSBar);
+
+BOOL ScrollWindow(HWND, int xAmount, int yAmount,
+ CONST RECT* lpRect, CONST RECT* lpClipRect);
+
+HWND WindowFromPoint(POINT pt);
+SHORT GetKeyState(int nVirtKey);
+HWND SetParent(HWND hWndChild, HWND hWndNewParent);
+VOID DragAcceptFiles(HWND, BOOL);
+BOOL IsDialogMessage(HWND hWnd, MSG* msg);
+DWORD GetMessagePos(VOID);
+BOOL IsIconic(HWND hWnd);
+int SetMapMode(HDC hDC, int mode);
+int GetMapMode(HDC hDC);
+HCURSOR LoadCursor(HINSTANCE hInst, int cursor);
+DWORD GetModuleFileName(HINSTANCE hInst, LPSTR name, DWORD sz);
+VOID DestroyIcon(HICON hIcon);
+COLORREF GetTextColor(HDC hdc);
+COLORREF GetBkColor(HDC hdc);
+HPALETTE SelectPalette(HDC hdc, HPALETTE hPalette, BOOL b);
+BOOL IntersectClipRect(HDC hdc, int x, int y,
+ int w, int h);
+BOOL GetClipBox(HDC hdc, RECT* rect);
+BOOL DrawIconEx(HDC hdc, int x, int y, HICON hIcon, int w, int h, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
+BOOL SetViewportExtEx(HDC hdc, int x, int y, LPSIZE lpSize);
+BOOL SetViewportOrgEx(HDC hdc, int x, int y, LPPOINT lpPoint);
+BOOL SetWindowExtEx(HDC hdc, int x, int y, LPSIZE lpSize);
+BOOL SetWindowOrgEx(HDC hdc, int x, int y, LPPOINT lpSize);
+BOOL ExtFloodFill(HDC hdc, int x, int y, COLORREF col, UINT flags);
+int SetPolyFillMode(HDC hdc, int mode);
+BOOL RoundRect(HDC hdc, int left, int top, int right, int bottom, int r1, int r2);
+BOOL MaskBlt(HDC hdc, int x, int y, int w, int h,
+ HDC hDCSource, int xSrc, int ySrc, HBITMAP hBitmapMask, int xMask, int yMask, DWORD rop);
+UINT RealizePalette(HDC hDC);
+BOOL SetBrushOrgEx(HDC hdc, int xOrigin, int yOrigin, LPPOINT lpPoint);
+int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj);
+
+/* For some reason these aren't defined in the headers */
+BOOL EnableScrollBar (HWND hWnd, int iSBar, BOOL bEnable) ;
+BOOL GetScrollPos (HWND hWnd, int iSBar, int* pPos);
+BOOL GetScrollRange (HWND hWnd, int iSBar, int* pMinPos, int* pMaxPos);
+BOOL SetScrollPos (HWND hWnd, int iSBar, int iNewPos);
+BOOL SetScrollRange (HWND hWnd, int iSBar, int iMinPos, int iMaxPos);
+BOOL SetScrollInfo (HWND hWnd, int iSBar,
+ LPCSCROLLINFO lpsi, BOOL fRedraw);
+BOOL GetScrollInfo(HWND hWnd, int iSBar, LPSCROLLINFO lpsi);
+BOOL ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow);
+
+#ifdef __cplusplus
+}
+#endif
+
+/*
+ * Key State Masks for Mouse Messages
+ */
+#ifndef MK_LBUTTON
+#define MK_LBUTTON 0x0001
+#define MK_RBUTTON 0x0002
+#define MK_SHIFT 0x0004
+#define MK_CONTROL 0x0008
+#define MK_MBUTTON 0x0010
+#endif
+
+/*
+ * DrawIcon flags
+ */
+
+#ifndef DI_MASK
+#define DI_MASK 0x0001
+#define DI_IMAGE 0x0002
+#define DI_NORMAL 0x0003
+#define DI_COMPAT 0x0004
+#define DI_DEFAULTSIZE 0x0008
+#endif
+
+/* TODO: May have to fake these message */
+#ifndef WM_INITDIALOG
+#define WM_INITDIALOG 0x0110
+#endif
+#ifndef WM_QUERYENDSESSION
+#define WM_QUERYENDSESSION 0x0011
+#endif
+#ifndef WM_ENDSESSION
+#define WM_ENDSESSION 0x0016
+#endif
+#ifndef WM_SETCURSOR
+#define WM_SETCURSOR 0x0020
+#endif
+#ifndef WM_GETMINMAXINFO
+#define WM_GETMINMAXINFO 0x0024
+typedef struct tagMINMAXINFO {
+ POINT ptReserved;
+ POINT ptMaxSize;
+ POINT ptMaxPosition;
+ POINT ptMinTrackSize;
+ POINT ptMaxTrackSize;
+} MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
+
+#endif
+#ifndef WM_SYSCOMMAND
+#define WM_SYSCOMMAND 0x0112
+#endif
+#ifndef WM_SYSCOLORCHANGE
+#define WM_SYSCOLORCHANGE 0x0015
+#endif
+#ifndef WM_QUERYNEWPALETTE
+#define WM_QUERYNEWPALETTE 0x030F
+#endif
+#ifndef WM_PALETTEISCHANGING
+#define WM_PALETTEISCHANGING 0x0310
+#endif
+#ifndef WM_PALETTECHANGED
+#define WM_PALETTECHANGED 0x0311
+#endif
+#ifndef WM_NOTIFY
+#define WM_NOTIFY 0x004E
+#endif
+#ifndef WM_DROPFILES
+#define WM_DROPFILES 0x0233
+#endif
+
+#ifndef PALETTERGB
+#define PALETTERGB RGB
+#endif
+
+#ifndef MM_TEXT
+#define MM_TEXT 1
+#define MM_LOMETRIC 2
+#define MM_HIMETRIC 3
+#define MM_LOENGLISH 4
+#define MM_HIENGLISH 5
+#define MM_TWIPS 6
+#define MM_ISOTROPIC 7
+#define MM_ANISOTROPIC 8
+#endif
+
+#ifndef SC_MAXIMIZE
+#define SC_MINIMIZE 0xF020
+#define SC_MAXIMIZE 0xF030
+#endif
+
+// TODO: all of them
+#ifndef IDC_ARROW
+#define IDC_ARROW 1
+#endif
+
+/*
+ * Standard Cursor IDs
+ */
+#ifndef MAKEINTRESOURCE
+#define MAKEINTRESOURCE(r) r
+#endif
+
+#ifndef IDC_ARROW
+#define IDC_ARROW MAKEINTRESOURCE(32512)
+#define IDC_IBEAM MAKEINTRESOURCE(32513)
+#define IDC_WAIT MAKEINTRESOURCE(32514)
+#define IDC_CROSS MAKEINTRESOURCE(32515)
+#define IDC_UPARROW MAKEINTRESOURCE(32516)
+#define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */
+#define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */
+#define IDC_SIZENWSE MAKEINTRESOURCE(32642)
+#define IDC_SIZENESW MAKEINTRESOURCE(32643)
+#define IDC_SIZEWE MAKEINTRESOURCE(32644)
+#define IDC_SIZENS MAKEINTRESOURCE(32645)
+#define IDC_SIZEALL MAKEINTRESOURCE(32646)
+#define IDC_NO MAKEINTRESOURCE(32648) /* not in win3.1 */
+#if(WINVER >= 0x0500)
+#define IDC_HAND MAKEINTRESOURCE(32649)
+#endif /* WINVER >= 0x0500 */
+#define IDC_APPSTARTING MAKEINTRESOURCE(32650) /* not in win3.1 */
+#if(WINVER >= 0x0400)
+#define IDC_HELP MAKEINTRESOURCE(32651)
+#endif /* WINVER >= 0x0400 */
+#endif
+
+/* ExtFloodFill style flags */
+#define FLOODFILLBORDER 0
+#define FLOODFILLSURFACE 1
+
+/* PolyFill() Modes */
+#define ALTERNATE 1
+#define WINDING 2
+#define POLYFILL_LAST 2
+
+/* Quaternary raster codes */
+#define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore))
+
+/* Device Parameters for GetDeviceCaps() */
+#define DRIVERVERSION 0 /* Device driver version */
+#define TECHNOLOGY 2 /* Device classification */
+#define HORZSIZE 4 /* Horizontal size in millimeters */
+#define VERTSIZE 6 /* Vertical size in millimeters */
+
+/* Ternary raster operations */
+#define DSTINVERT (DWORD)0x00550009 /* dest = (NOT dest) */
+#define WHITENESS (DWORD)0x00FF0062 /* dest = WHITE */
+#define SRCERASE (DWORD)0x00440328 /* dest = source AND (NOT dest ) */
+#define MERGEPAINT (DWORD)0x00BB0226 /* dest = (NOT source) OR dest */
+#define SRCPAINT (DWORD)0x00EE0086 /* dest = source OR dest */
+#define NOTSRCCOPY (DWORD)0x00330008 /* dest = (NOT source) */
+
+#endif /* _WX_MICROWIN_H_ */
#include <windows.h>
+#ifdef __WXMICROWIN__
+/* Extra prototypes and symbols not defined by MicroWindows */
+#include "wx/msw/microwin.h"
+#endif
+
// undefine conflicting symbols which were defined in windows.h
#include "wx/msw/winundef.h"
// ---------------------------------------------------------------------------
// a wrapper macro for ZeroMemory()
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
#define wxZeroMemory(obj) ::ZeroMemory(&obj, sizeof(obj))
#else
#define wxZeroMemory(obj) memset((void*) & obj, 0, sizeof(obj))
--- /dev/null
+##############################################################################
+# Microwindows template Makefile
+# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
+##############################################################################
+
+TOP=/home/julians/microwindows/microwin/src
+CONFIG = $(TOP)/config
+WXDIR = ../..
+OBJSUFF = o
+SRCSUFF = cpp
+WXLIB=$(WXDIR)/lib/libwx.a
+AROPTIONS = ruv
+RANLIB = ranlib
+RM = rm -f
+
+ZLIBLIB = $(WXDIR)/lib/libzlib.a
+PNGLIB = $(WXDIR)/lib/libpng.a
+JPEGLIB = $(WXDIR)/lib/libjpeg.a
+TIFFLIB = $(WXDIR)/lib/libtiff.a
+
+include $(CONFIG)
+
+######################## Additional Flags section ############################
+
+# Directories list for header files
+INCLUDEDIRS += -I$(WXDIR)/include
+# Defines for preprocessor
+DEFINES += -DMWIN -D__WXMICROWIN__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__
+
+# Compilation flags for C files OTHER than include directories
+CFLAGS +=
+# Preprocessor flags OTHER than defines
+CPPFLAGS +=
+# Linking flags
+#LDFLAGS += -lwx -L$(WXDIR)/lib
+LDFLAGS += $(WXLIB)
+
+############################# targets section ################################
+
+# If you want to create a library with the objects files, define the name here
+LIBNAME =
+
+# If we put it below OBJS=, Makefile.rules includes .depend
+# and it continually looks for .c files to satisfy .o.cpp
+# dependency. What's going on there?
+include $(TOP)/Makefile.rules
+
+# List of objects to compile
+OBJS = minimal.o
+MTESTOBJS = mtest.o
+
+all: minimal
+
+######################### Makefile.rules section #############################
+
+
+
+######################## Tools targets section ###############################
+
+minimal: $(OBJS) $(MWINLIBS) $(WXLIB) $(TOP)/config
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(WXLIB) $(MWINLIBS) -lm
+
+mtest: $(MTESTOBJS) $(MWINLIBS) $(TOP)/config
+ $(CC) $(CFLAGS) $(LDFLAGS) $(MTESTOBJS) -o $@ $(MWINLIBS)
+
+#.SUFFIXES: .cpp .cxx .c
+
+#.c.o:
+# $(CC) -c $(CFLAGS) $(CFLAGS) -o $@ $*.c
+
+.cxx.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cxx
+
+.cpp.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cpp
+
+#$(COMMDIR)/appcmn.o: $(COMMDIR)/appcmn.cpp
+# $(CC) -c $(CPPFLAGS) -o $@ $*.cpp
+
+#appcmn.o: $(COMMDIR)/appcmn.cpp
+# $(CC) $(CPPFLAGS) -c -o $@ $<
+
+cleanwx:
+ -$(RM) *.o
+ -$(RM) minimal
+
+wx:
+ @pushd $(WXDIR)/src/microwin; make all; popd
bool
wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
{
-#if defined(__WIN32__)
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
// CopyFile() copies file attributes and modification time too, so use it
// instead of our code if available
//
// Get a temporary filename, opening and closing the file.
wxChar *wxGetTempFileName(const wxString& prefix, wxChar *buf)
{
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
#ifndef __WIN32__
wxChar tmp[144];
// On non-Windows platform, probably just return the empty string.
wxString wxGetOSDirectory()
{
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
wxChar buf[256];
GetWindowsDirectory(buf, 256);
return wxString(buf);
// This table is generated by misc/languages/genlang.py
// When making changes, please put them into misc/languages/langtabl.txt
-#ifndef __WIN32__
+#if !defined(__WIN32__) || defined(__WXMICROWIN__)
#define SETWINLANG(info,lang,sublang)
// - perhaps common encodings to objects ("UTF8" -> wxConvUTF8)
// - move wxEncodingConverter meat in here
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
#include "wx/msw/registry.h"
// this should work if M$ Internet Exploiter is installed
static long CharsetToCodepage(const wxChar *name)
};
#endif
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
class CP_CharSet : public wxCharacterSet
{
public:
cset = NULL;
}
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
cset = new CP_CharSet(name); // may take NULL
if (cset->usable())
return cset;
}
#endif // __VMS__
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
#ifndef __GNUWIN32__
#ifndef __MWERKS__
{
// set colours
SetForegroundColour(*wxBLACK);
- SetBackgroundColour(wxColour(255, 255, 231));
+
+#ifdef __WXMSW__
+ wxColour bkCol(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_INFOBK));
+#else
+ wxColour bkCol(wxColour(255, 255, 225));
+#endif
+ SetBackgroundColour(bkCol);
+
// set position and size
int x, y;
wxGetMousePosition(&x, &y);
{
// set colours
SetForegroundColour(*wxBLACK);
- SetBackgroundColour(wxColour(255, 255, 231));
+#ifdef __WXMSW__
+ wxColour bkCol(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_INFOBK));
+#else
+ wxColour bkCol(wxColour(255, 255, 225));
+#endif
+ SetBackgroundColour(bkCol);
m_creationTime = wxGetLocalTime();
}
#include <string.h>
#include <ctype.h>
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__) || defined(__WXMICROWIN__)) && !defined(__CYGWIN10__))
#include <commctrl.h>
#endif
+#ifndef __WXMICROWIN__
#include "wx/msw/msvcrt.h"
+#endif
// ----------------------------------------------------------------------------
// conditional compilation
extern wxChar *wxBuffer;
extern wxList *wxWinHandleList;
extern wxList WXDLLEXPORT wxPendingDelete;
+#ifndef __WXMICROWIN__
extern void wxSetKeyboardHook(bool doIt);
+#endif
MSG s_currentMsg;
wxApp *wxTheApp = NULL;
wxBitmap::InitStandardHandlers();
-#if defined(__WIN95__)
+#if defined(__WIN95__) && !defined(__WXMICROWIN__)
InitCommonControls();
-
#endif // __WIN95__
#if wxUSE_OLE || wxUSE_DRAG_AND_DROP || wxUSE_DATAOBJ
RegisterWindowClasses();
+#ifndef __WXMICROWIN__
// Create the brush for disabling bitmap buttons
LOGBRUSH lb;
::DeleteObject( (HGDIOBJ)lb.lbHatch );
}
//else: wxWindows resources are probably not linked in
+#endif
#if wxUSE_PENWINDOWS
wxRegisterPenWin();
if (wxDummyChar) wxDummyChar++;
#endif
+#ifndef __WXMICROWIN__
wxSetKeyboardHook(TRUE);
+#endif
wxModule::RegisterModules();
if (!wxModule::InitializeModules())
//// WINDOWS-SPECIFIC CLEANUP
+#ifndef __WXMICROWIN__
wxSetKeyboardHook(FALSE);
+#endif
#if wxUSE_PENWINDOWS
wxCleanUpPenWin();
// do check for memory leaks on program exit
// (another useful flag is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free
// deallocated memory which may be used to simulate low-memory condition)
+#ifndef __WXMICROWIN__
wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+#endif
+
#ifdef __MWERKS__
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
// This seems to be necessary since there are 'rogue'
/* static */
int wxApp::GetComCtl32Version()
{
+#ifdef __WXMICROWIN__
+ return 0;
+#else
// cache the result
static int s_verComCtl32 = -1;
}
return s_verComCtl32;
+#endif
}
void wxExit()
#include "wx/msw/private.h"
#include "wx/log.h"
+#if !defined(__WXMICROWIN__)
#include "wx/msw/dib.h"
+#endif
+
#include "wx/image.h"
#include "wx/xpmdecod.h"
bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon)
{
+#ifndef __WXMICROWIN__
// it may be either HICON or HCURSOR
HICON hicon = (HICON)icon.GetHandle();
#endif // WXWIN_COMPATIBILITY_2
return TRUE;
+#else
+ return FALSE;
+#endif
}
#endif // Win32
{
Init();
+#ifndef __WXMICROWIN__
wxBitmapRefData *refData = new wxBitmapRefData;
m_refData = refData;
}
SetHBITMAP((WXHBITMAP)hbmp);
+#endif
}
// Create from XPM data
bool wxBitmap::Create(int w, int h, int d)
{
+#ifndef __WXMICROWIN__
UnRef();
m_refData = new wxBitmapRefData;
#if WXWIN_COMPATIBILITY_2
GetBitmapData()->m_ok = hbmp != 0;
#endif // WXWIN_COMPATIBILITY_2
-
return Ok();
+#else
+ return FALSE;
+#endif
}
// ----------------------------------------------------------------------------
wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
{
+#ifndef __WXMICROWIN__
wxCHECK_MSG( Ok() &&
(rect.x >= 0) && (rect.y >= 0) &&
(rect.x+rect.width <= GetWidth()) &&
DeleteDC(dcSrc);
return ret;
+#else
+ return wxBitmap();
+#endif
}
// ----------------------------------------------------------------------------
// Contributed by Frederic Villeneuve <frederic.villeneuve@natinst.com>
wxBitmap wxBitmap::GetBitmapForDC(wxDC& dc) const
{
+#ifdef __WXMICROWIN__
+ return wxBitmap();
+#else
wxMemoryDC memDC;
wxBitmap tmpBitmap(GetWidth(), GetHeight(), dc.GetDepth());
HPALETTE hPal = (HPALETTE) NULL;
wxFreeDIB(lpDib);
return tmpBitmap;
+#endif
}
// ----------------------------------------------------------------------------
// Create a mask from a mono bitmap (copies the bitmap).
bool wxMask::Create(const wxBitmap& bitmap)
{
+#ifndef __WXMICROWIN__
wxCHECK_MSG( bitmap.Ok() && bitmap.GetDepth() == 1, FALSE,
_T("can't create mask from invalid or not monochrome bitmap") );
SelectObject(destDC, 0);
DeleteDC(destDC);
return TRUE;
+#else
+ return FALSE;
+#endif
}
// Create a mask from a bitmap and a palette index indicating
// the transparent area
bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
{
+#ifndef __WXMICROWIN__
wxCHECK_MSG( bitmap.Ok(), FALSE, _T("invalid bitmap in wxMask::Create") );
if ( m_maskBitmap )
::DeleteDC(destDC);
return ok;
+#else
+ return FALSE;
+#endif
}
// ----------------------------------------------------------------------------
// DIB functions
// ----------------------------------------------------------------------------
+#ifndef __WXMICROWIN__
bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel,
HPALETTE hPal, LPBITMAPINFO* lpDIBHeader)
{
{
free(lpDIBHeader);
}
+#endif
// ----------------------------------------------------------------------------
// other helper functions
extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)
{
+#ifndef __WXMICROWIN__
wxCHECK_MSG( hbmpMask, 0, _T("invalid bitmap in wxInvertMask") );
// get width/height from the bitmap if not given
::DeleteDC(hdcDst);
return hbmpInvMask;
+#else
+ return 0;
+#endif
}
// - could choose white always for a quick solution
break;
***/
+#ifndef __WXMICROWIN__
case wxBDIAGONAL_HATCH:
M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateHatchBrush(HS_BDIAGONAL,ms_colour) ;
break ;
else
M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateSolidBrush(ms_colour) ;
break ;
+#endif
case wxSOLID:
default:
M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateSolidBrush(ms_colour) ;
#include "wx/module.h"
#include "wx/msw/private.h"
+#ifndef __WXMICROWIN__
#include "wx/msw/dib.h"
+#endif
#if wxUSE_RESOURCE_LOADING_IN_MSW
#include "wx/msw/curico.h"
{
if ( m_hCursor )
{
+#ifndef __WXMICROWIN__
if ( m_destroyCursor )
::DestroyCursor((HCURSOR)m_hCursor);
+#endif
m_hCursor = 0;
}
long flags,
int hotSpotX, int hotSpotY)
{
+#ifdef __WXMICROWIN__
+ m_refData = NULL;
+#else
wxCursorRefData *refData = new wxCursorRefData;
m_refData = refData;
#if WXWIN_COMPATIBILITY_2
refData->SetOk();
#endif // WXWIN_COMPATIBILITY_2
+
+#endif
}
// Cursors by stock number
wxCursor::wxCursor(int cursor_type)
{
+#ifdef __WXMICROWIN__
+ m_refData = NULL;
+#else
wxCursorRefData *refData = new wxCursorRefData;
m_refData = refData;
refData->m_hCursor = (WXHCURSOR) LoadCursor((HINSTANCE) NULL, IDC_ARROW);
break;
}
+#endif
}
wxCursor::~wxCursor()
{
if ( cursor.Ok() )
{
+#ifndef __WXMICROWIN__
::SetCursor(GetHcursorOf(cursor));
+#endif
if ( gs_globalCursor )
*gs_globalCursor = cursor;
bool wxDC::CanGetTextExtent() const
{
+#ifdef __WXMICROWIN__
+ // TODO Extend MicroWindows' GetDeviceCaps function
+ return TRUE;
+#else
// What sort of display is it?
int technology = ::GetDeviceCaps(GetHdc(), TECHNOLOGY);
return (technology == DT_RASDISPLAY) || (technology == DT_RASPRINTER);
+#endif
}
int wxDC::GetDepth() const
wxCoord x2 = x1 + width,
y2 = y1 + height;
-#if defined(__WIN32__) && !defined(__SC__)
+#if defined(__WIN32__) && !defined(__SC__) && !defined(__WXMICROWIN__)
RECT rect;
rect.left = x1;
rect.top = y1;
{
DoDrawText(text, x, y);
}
+#ifndef __WXMICROWIN__
else
{
// NB: don't take DEFAULT_GUI_FONT because it's not TrueType and so
CalcBoundingBox(x, y);
CalcBoundingBox(x + h*sin(rad), y + h*cos(rad));
}
+#endif
}
// ---------------------------------------------------------------------------
processed = !Close();
break;
+#ifndef __WXMICROWIN__
case WM_SETCURSOR:
// we want to override the busy cursor for modal dialogs:
// typically, wxBeginBusyCursor() is called and then a modal dialog
rc = FALSE;
}
break;
+#endif
}
if ( !processed )
Init(size, family, style, weight, underlined, faceName, encoding);
}
- wxFontRefData(const wxNativeFontInfo& info)
+ wxFontRefData(const wxNativeFontInfo& info, WXHFONT hFont = 0)
{
- Init(info);
+ Init(info, hFont);
}
virtual ~wxFontRefData();
const wxString& faceName,
wxFontEncoding encoding);
- void Init(const wxNativeFontInfo& info);
+ void Init(const wxNativeFontInfo& info, WXHFONT hFont = 0);
// If TRUE, the pointer to the actual font is temporary and SHOULD NOT BE
// DELETED by destructor
m_nativeFontInfoOk = FALSE;
}
-void wxFontRefData::Init(const wxNativeFontInfo& info)
+void wxFontRefData::Init(const wxNativeFontInfo& info, WXHFONT hFont)
{
// extract family from pitch-and-family
int lfFamily = info.lf.lfPitchAndFamily;
m_fontId = 0;
m_temporary = FALSE;
- m_hFont = 0;
+ // hFont may be zero, or it be passed in case we really want to
+ // use the exact font created in the underlying system
+ // (for example where we can't guarantee conversion from HFONT
+ // to LOGFONT back to HFONT)
+ m_hFont = hFont;
m_nativeFontInfoOk = TRUE;
m_nativeFontInfo = info;
wxTheFontList->Append(this);
}
-bool wxFont::Create(const wxNativeFontInfo& info)
+bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont)
{
UnRef();
- m_refData = new wxFontRefData(info);
+ m_refData = new wxFontRefData(info, hFont);
RealizeResource();
// private functions
// ----------------------------------------------------------------------------
+#ifndef __WXMICROWIN__
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
DWORD dwStyle, LONG lParam);
+#endif
// ============================================================================
// implementation
void wxFontEnumeratorHelper::DoEnumerate()
{
+#ifndef __WXMICROWIN__
HDC hDC = ::GetDC(NULL);
#ifdef __WIN32__
#endif // Win32/16
::ReleaseDC(NULL, hDC);
+#endif
}
bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
// Windows callbacks
// ----------------------------------------------------------------------------
+#ifndef __WXMICROWIN__
int CALLBACK wxFontEnumeratorProc(LPLOGFONT lplf, LPTEXTMETRIC lptm,
DWORD dwStyle, LONG lParam)
{
return fontEnum->OnFont(lplf, lptm);
}
+#endif
#endif // wxUSE_FONTMAP
info->charset = ANSI_CHARSET;
break;
-#if !defined(__WIN16__)
+#if !defined(__WIN16__) && !defined(__WXMICROWIN__)
case wxFONTENCODING_CP1250:
info->charset = EASTEUROPE_CHARSET;
break;
fontEncoding = wxFONTENCODING_CP1252;
break;
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
case EASTEUROPE_CHARSET:
fontEncoding = wxFONTENCODING_CP1250;
break;
bool wxFrameMSW::IsIconized() const
{
+#ifdef __WXMICROWIN__
+ // TODO
+ return FALSE;
+#else
((wxFrameMSW *)this)->m_iconized = (::IsIconic(GetHwnd()) != 0);
return m_iconized;
+#endif
}
// Is it maximized?
bool wxFrameMSW::IsMaximized() const
{
+#ifdef __WXMICROWIN__
+ // TODO
+ return FALSE;
+#else
return (::IsZoomed(GetHwnd()) != 0);
+#endif
}
void wxFrameMSW::SetIcon(const wxIcon& icon)
{
wxFrameBase::SetIcon(icon);
-#if defined(__WIN95__)
+#if defined(__WIN95__) && !defined(__WXMICROWIN__)
if ( m_icon.Ok() )
{
SendMessage(GetHwnd(), WM_SETICON,
void wxFrameMSW::InternalSetMenuBar()
{
+#ifndef __WXMICROWIN__
if ( !::SetMenu(GetHwnd(), (HMENU)m_hMenu) )
{
wxLogLastError(wxT("SetMenu"));
}
+#endif
}
#endif // wxUSE_MENUS_NATIVE
}
#endif // wxUSE_TOOLBAR
+#ifndef __WXMICROWIN__
if (style & wxFULLSCREEN_NOMENUBAR)
SetMenu((HWND)GetHWND(), (HMENU) NULL);
+#endif
#if wxUSE_STATUSBAR
wxStatusBar *theStatusBar = GetStatusBar();
}
#endif // wxUSE_STATUSBAR
+#ifndef __WXMICROWIN__
if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && (m_hMenu != 0))
SetMenu((HWND)GetHWND(), (HMENU)m_hMenu);
+#endif
Maximize(m_fsIsMaximized);
SetWindowLong((HWND)GetHWND(),GWL_STYLE, m_fsOldWindowStyle);
RECT rect;
if ( GetUpdateRect(GetHwnd(), &rect, FALSE) )
{
+#ifndef __WXMICROWIN__
if ( m_iconized )
{
HICON hIcon = m_icon.Ok() ? GetHiconOf(m_icon)
return TRUE;
}
else
+ #endif
{
return wxWindow::HandlePaint();
}
bool wxFrameMSW::HandleSize(int x, int y, WXUINT id)
{
bool processed = FALSE;
+#ifndef __WXMICROWIN__
switch ( id )
{
m_iconized = TRUE;
break;
}
+#endif
if ( !m_iconized )
{
// menu was removed from screen
item = -1;
}
+#ifndef __WXMICROWIN__
else if ( !(flags & MF_POPUP) && !(flags & MF_SEPARATOR) )
{
item = nItem;
}
+#endif
else
{
#if wxUSE_STATUSBAR
}
break;
+#ifndef __WXMICROWIN__
case WM_MENUSELECT:
{
WXWORD item, flags;
processed = HandleMenuSelect(item, flags, hmenu);
}
break;
+#endif
case WM_PAINT:
processed = HandlePaint();
break;
+#ifndef __WXMICROWIN__
case WM_QUERYDRAGICON:
{
HICON hIcon = m_icon.Ok() ? GetHiconOf(m_icon)
processed = rc != 0;
}
break;
+#endif
case WM_SIZE:
processed = HandleSize(LOWORD(lParam), HIWORD(lParam), wParam);
#include "wx/app.h"
+#ifndef __WXMICROWIN__
#include "wx/msw/dib.h"
+#endif
+
#include "wx/msw/bitmap.h"
#include "wx/msw/gdiimage.h"
#include "wx/bitmap.h"
// private classes
// ----------------------------------------------------------------------------
+#ifndef __WXMICROWIN__
+
// all image handlers are declared/defined in this file because the outside
// world doesn't have to know about them (but only about wxBITMAP_TYPE_XXX ids)
// ----------------------------------------------------------------------------
static wxSize GetHiconSize(HICON hicon);
+#endif
+ // __MICROWIN__
// ============================================================================
// implementation
void wxGDIImage::InitStandardHandlers()
{
+#ifndef __WXMICROWIN__
AddHandler(new wxBMPResourceHandler);
AddHandler(new wxBMPFileHandler);
AddHandler(new wxICOResourceHandler);
AddHandler(new wxICOFileHandler);
+#endif
}
+#ifndef __WXMICROWIN__
+
// ----------------------------------------------------------------------------
// wxBitmap handlers
// ----------------------------------------------------------------------------
return size;
}
+#endif
+ // __WXMICROWIN__
{
if ( m_hIcon )
{
+#ifndef __WXMICROWIN__
::DestroyIcon((HICON) m_hIcon);
+#endif
m_hIcon = 0;
}
void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
{
+#ifndef __WXMICROWIN__
#ifdef __WIN32__
wxMask *mask = bmp.GetMask();
if ( !mask )
// wxFAIL_MSG("Bitmap to icon conversion (including use of XPMs for icons) not implemented");
#endif // Win32/16
+#endif
}
void wxIcon::CreateIconFromXpm(const char **data)
#if !defined(_WINDLL)
-#if defined(__TWIN32__) || defined(__WXWINE__)
+#if defined(__TWIN32__) || defined(__WXWINE__) || defined(__WXMICROWIN__)
#define HINSTANCE HANDLE
extern "C"
--- /dev/null
+##############################################################################
+# Microwindows template Makefile
+# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
+##############################################################################
+
+TOP=/home/julians/microwindows/microwin/src
+CONFIG = $(TOP)/config
+WXDIR = ../..
+OBJSUFF = o
+SRCSUFF = cpp
+WXLIB=$(WXDIR)/lib/libwx.a
+AROPTIONS = ruv
+RANLIB = ranlib
+RM = rm -f
+
+GENDIR = $(WXDIR)/src/generic
+COMMDIR = $(WXDIR)/src/common
+HTMLDIR = $(WXDIR)/src/html
+ZLIBDIR = $(WXDIR)/src/zlib
+PNGDIR = $(WXDIR)/src/png
+JPEGDIR = $(WXDIR)/src/jpeg
+TIFFDIR = $(WXDIR)/src/tiff
+OLEDIR = $(WXDIR)/src/msw/ole
+MICROWINDIR = $(WXDIR)/src/msw
+UNIXDIR = $(WXDIR)/src/unix
+UNIVDIR = $(WXDIR)/src/univ
+
+ZLIBLIB = $(WXDIR)/lib/libzlib.a
+PNGLIB = $(WXDIR)/lib/libpng.a
+JPEGLIB = $(WXDIR)/lib/libjpeg.a
+TIFFLIB = $(WXDIR)/lib/libtiff.a
+
+GENERICOBJS_ORIG = \
+ $(GENDIR)/busyinfo.$(OBJSUFF) \
+ $(GENDIR)/calctrl.$(OBJSUFF) \
+ $(GENDIR)/choicdgg.$(OBJSUFF) \
+ $(GENDIR)/dirctrlg.$(OBJSUFF) \
+ $(GENDIR)/dragimgg.$(OBJSUFF) \
+ $(GENDIR)/grid.$(OBJSUFF) \
+ $(GENDIR)/gridsel.$(OBJSUFF) \
+ $(GENDIR)/laywin.$(OBJSUFF) \
+ $(GENDIR)/logg.$(OBJSUFF) \
+ $(GENDIR)/numdlgg.$(OBJSUFF) \
+ $(GENDIR)/panelg.$(OBJSUFF) \
+ $(GENDIR)/progdlgg.$(OBJSUFF) \
+ $(GENDIR)/prop.$(OBJSUFF) \
+ $(GENDIR)/propform.$(OBJSUFF) \
+ $(GENDIR)/proplist.$(OBJSUFF) \
+ $(GENDIR)/sashwin.$(OBJSUFF) \
+ $(GENDIR)/scrolwin.$(OBJSUFF) \
+ $(GENDIR)/splash.$(OBJSUFF) \
+ $(GENDIR)/splitter.$(OBJSUFF) \
+ $(GENDIR)/statusbr.$(OBJSUFF) \
+ $(GENDIR)/tbarsmpl.$(OBJSUFF) \
+ $(GENDIR)/textdlgg.$(OBJSUFF) \
+ $(GENDIR)/tipdlg.$(OBJSUFF) \
+ $(GENDIR)/tipwin.$(OBJSUFF) \
+ $(GENDIR)/treectlg.$(OBJSUFF) \
+ $(GENDIR)/treelay.$(OBJSUFF) \
+ $(GENDIR)/wizard.$(OBJSUFF)
+
+GENERICOBJS = \
+ $(GENDIR)/laywin.$(OBJSUFF) \
+ $(GENDIR)/logg.$(OBJSUFF) \
+ $(GENDIR)/panelg.$(OBJSUFF) \
+ $(GENDIR)/sashwin.$(OBJSUFF) \
+ $(GENDIR)/scrolwin.$(OBJSUFF) \
+ $(GENDIR)/splash.$(OBJSUFF) \
+ $(GENDIR)/splitter.$(OBJSUFF) \
+ $(GENDIR)/statusbr.$(OBJSUFF) \
+ $(GENDIR)/tbarsmpl.$(OBJSUFF) \
+ $(GENDIR)/tipwin.$(OBJSUFF)
+
+COMMONOBJS_OTHER=\
+ $(COMMDIR)/choiccmn.$(OBJSUFF) \
+ $(COMMDIR)/ctrlsub.$(OBJSUFF) \
+ $(COMMDIR)/dobjcmn.$(OBJSUFF) \
+ $(COMMDIR)/lboxcmn.$(OBJSUFF) \
+ $(COMMDIR)/textcmn.$(OBJSUFF) \
+
+COMMONOBJS = \
+ $(COMMDIR)/appcmn.$(OBJSUFF) \
+ $(COMMDIR)/clipcmn.$(OBJSUFF) \
+ $(COMMDIR)/cmdline.$(OBJSUFF) \
+ $(COMMDIR)/cmndata.$(OBJSUFF) \
+ $(COMMDIR)/config.$(OBJSUFF) \
+ $(COMMDIR)/cshelp.$(OBJSUFF) \
+ $(COMMDIR)/ctrlcmn.$(OBJSUFF) \
+ $(COMMDIR)/datetime.$(OBJSUFF) \
+ $(COMMDIR)/datstrm.$(OBJSUFF) \
+ $(COMMDIR)/dcbase.$(OBJSUFF) \
+ $(COMMDIR)/dlgcmn.$(OBJSUFF) \
+ $(COMMDIR)/dynarray.$(OBJSUFF) \
+ $(COMMDIR)/dynlib.$(OBJSUFF) \
+ $(COMMDIR)/effects.$(OBJSUFF) \
+ $(COMMDIR)/encconv.$(OBJSUFF) \
+ $(COMMDIR)/event.$(OBJSUFF) \
+ $(COMMDIR)/extended.$(OBJSUFF) \
+ $(COMMDIR)/ffile.$(OBJSUFF) \
+ $(COMMDIR)/file.$(OBJSUFF) \
+ $(COMMDIR)/fileconf.$(OBJSUFF) \
+ $(COMMDIR)/filefn.$(OBJSUFF) \
+ $(COMMDIR)/filename.$(OBJSUFF) \
+ $(COMMDIR)/filesys.$(OBJSUFF) \
+ $(COMMDIR)/fontcmn.$(OBJSUFF) \
+ $(COMMDIR)/fontmap.$(OBJSUFF) \
+ $(COMMDIR)/framecmn.$(OBJSUFF) \
+ $(COMMDIR)/gdicmn.$(OBJSUFF) \
+ $(COMMDIR)/geometry.$(OBJSUFF) \
+ $(COMMDIR)/gifdecod.$(OBJSUFF) \
+ $(COMMDIR)/hash.$(OBJSUFF) \
+ $(COMMDIR)/helpbase.$(OBJSUFF) \
+ $(COMMDIR)/imagall.$(OBJSUFF) \
+ $(COMMDIR)/imagbmp.$(OBJSUFF) \
+ $(COMMDIR)/image.$(OBJSUFF) \
+ $(COMMDIR)/imaggif.$(OBJSUFF) \
+ $(COMMDIR)/imagjpeg.$(OBJSUFF) \
+ $(COMMDIR)/imagpcx.$(OBJSUFF) \
+ $(COMMDIR)/imagpng.$(OBJSUFF) \
+ $(COMMDIR)/imagpnm.$(OBJSUFF) \
+ $(COMMDIR)/imagtiff.$(OBJSUFF) \
+ $(COMMDIR)/imagxpm.$(OBJSUFF) \
+ $(COMMDIR)/intl.$(OBJSUFF) \
+ $(COMMDIR)/layout.$(OBJSUFF) \
+ $(COMMDIR)/list.$(OBJSUFF) \
+ $(COMMDIR)/log.$(OBJSUFF) \
+ $(COMMDIR)/longlong.$(OBJSUFF) \
+ $(COMMDIR)/matrix.$(OBJSUFF) \
+ $(COMMDIR)/memory.$(OBJSUFF) \
+ $(COMMDIR)/menucmn.$(OBJSUFF) \
+ $(COMMDIR)/module.$(OBJSUFF) \
+ $(COMMDIR)/mstream.$(OBJSUFF) \
+ $(COMMDIR)/object.$(OBJSUFF) \
+ $(COMMDIR)/objstrm.$(OBJSUFF) \
+ $(COMMDIR)/paper.$(OBJSUFF) \
+ $(COMMDIR)/prntbase.$(OBJSUFF) \
+ $(COMMDIR)/process.$(OBJSUFF) \
+ $(COMMDIR)/quantize.$(OBJSUFF) \
+ $(COMMDIR)/resource.$(OBJSUFF) \
+ $(COMMDIR)/sizer.$(OBJSUFF) \
+ $(COMMDIR)/strconv.$(OBJSUFF) \
+ $(COMMDIR)/stream.$(OBJSUFF) \
+ $(COMMDIR)/string.$(OBJSUFF) \
+ $(COMMDIR)/tbarbase.$(OBJSUFF) \
+ $(COMMDIR)/textfile.$(OBJSUFF) \
+ $(COMMDIR)/timercmn.$(OBJSUFF) \
+ $(COMMDIR)/tokenzr.$(OBJSUFF) \
+ $(COMMDIR)/treebase.$(OBJSUFF) \
+ $(COMMDIR)/txtstrm.$(OBJSUFF) \
+ $(COMMDIR)/utilscmn.$(OBJSUFF) \
+ $(UNIXDIR)/utilsunx.$(OBJSUFF) \
+ $(COMMDIR)/valgen.$(OBJSUFF) \
+ $(COMMDIR)/validate.$(OBJSUFF) \
+ $(COMMDIR)/valtext.$(OBJSUFF) \
+ $(COMMDIR)/variant.$(OBJSUFF) \
+ $(COMMDIR)/wfstream.$(OBJSUFF) \
+ $(COMMDIR)/wincmn.$(OBJSUFF) \
+ $(COMMDIR)/wxchar.$(OBJSUFF) \
+ $(COMMDIR)/xpmdecod.$(OBJSUFF)
+
+HTMLOBJS = \
+ $(HTMLDIR)/helpctrl.$(OBJSUFF) \
+ $(HTMLDIR)/helpdata.$(OBJSUFF) \
+ $(HTMLDIR)/helpfrm.$(OBJSUFF) \
+ $(HTMLDIR)/htmlcell.$(OBJSUFF) \
+ $(HTMLDIR)/htmlfilt.$(OBJSUFF) \
+ $(HTMLDIR)/htmlpars.$(OBJSUFF) \
+ $(HTMLDIR)/htmltag.$(OBJSUFF) \
+ $(HTMLDIR)/htmlwin.$(OBJSUFF) \
+ $(HTMLDIR)/htmprint.$(OBJSUFF) \
+ $(HTMLDIR)/m_dflist.$(OBJSUFF) \
+ $(HTMLDIR)/m_fonts.$(OBJSUFF) \
+ $(HTMLDIR)/m_hline.$(OBJSUFF) \
+ $(HTMLDIR)/m_image.$(OBJSUFF) \
+ $(HTMLDIR)/m_layout.$(OBJSUFF) \
+ $(HTMLDIR)/m_links.$(OBJSUFF) \
+ $(HTMLDIR)/m_list.$(OBJSUFF) \
+ $(HTMLDIR)/m_meta.$(OBJSUFF) \
+ $(HTMLDIR)/m_pre.$(OBJSUFF) \
+ $(HTMLDIR)/m_tables.$(OBJSUFF) \
+ $(HTMLDIR)/winpars.$(OBJSUFF)
+
+MSWOBJS = \
+ $(MICROWINDIR)/accel.$(OBJSUFF) \
+ $(MICROWINDIR)/app.$(OBJSUFF) \
+ $(MICROWINDIR)/bitmap.$(OBJSUFF) \
+ $(MICROWINDIR)/brush.$(OBJSUFF) \
+ $(MICROWINDIR)/caret.$(OBJSUFF) \
+ $(MICROWINDIR)/clipbrd.$(OBJSUFF) \
+ $(MICROWINDIR)/colour.$(OBJSUFF) \
+ $(MICROWINDIR)/cursor.$(OBJSUFF) \
+ $(MICROWINDIR)/data.$(OBJSUFF) \
+ $(MICROWINDIR)/dc.$(OBJSUFF) \
+ $(MICROWINDIR)/dcclient.$(OBJSUFF) \
+ $(MICROWINDIR)/dcmemory.$(OBJSUFF) \
+ $(MICROWINDIR)/dcprint.$(OBJSUFF) \
+ $(MICROWINDIR)/dcscreen.$(OBJSUFF) \
+ $(MICROWINDIR)/dde.$(OBJSUFF) \
+ $(MICROWINDIR)/dialog.$(OBJSUFF) \
+ $(MICROWINDIR)/dialup.$(OBJSUFF) \
+ $(UNIXDIR)/dir.$(OBJSUFF) \
+ $(MICROWINDIR)/font.$(OBJSUFF) \
+ $(MICROWINDIR)/fontenum.$(OBJSUFF) \
+ $(MICROWINDIR)/fontutil.$(OBJSUFF) \
+ $(MICROWINDIR)/frame.$(OBJSUFF) \
+ $(MICROWINDIR)/gdiimage.$(OBJSUFF) \
+ $(MICROWINDIR)/gdiobj.$(OBJSUFF) \
+ $(MICROWINDIR)/icon.$(OBJSUFF) \
+ $(MICROWINDIR)/main.$(OBJSUFF) \
+ $(MICROWINDIR)/menu.$(OBJSUFF) \
+ $(MICROWINDIR)/menuitem.$(OBJSUFF) \
+ $(MICROWINDIR)/microwin.$(OBJSUFF) \
+ $(MICROWINDIR)/msgdlg.$(OBJSUFF) \
+ $(MICROWINDIR)/palette.$(OBJSUFF) \
+ $(MICROWINDIR)/pen.$(OBJSUFF) \
+ $(MICROWINDIR)/regconf.$(OBJSUFF) \
+ $(MICROWINDIR)/region.$(OBJSUFF) \
+ $(MICROWINDIR)/settings.$(OBJSUFF) \
+ $(MICROWINDIR)/thread.$(OBJSUFF) \
+ $(MICROWINDIR)/timer.$(OBJSUFF) \
+ $(MICROWINDIR)/utils.$(OBJSUFF) \
+ $(MICROWINDIR)/window.$(OBJSUFF)
+
+UNIVOBJS = \
+ $(UNIVDIR)/bmpbuttn.$(OBJSUFF) \
+ $(UNIVDIR)/button.$(OBJSUFF) \
+ $(UNIVDIR)/checkbox.$(OBJSUFF) \
+ $(UNIVDIR)/checklst.$(OBJSUFF) \
+ $(UNIVDIR)/choice.$(OBJSUFF) \
+ $(UNIVDIR)/colordlg.$(OBJSUFF) \
+ $(UNIVDIR)/colschem.$(OBJSUFF) \
+ $(UNIVDIR)/control.$(OBJSUFF) \
+ $(UNIVDIR)/frameuniv.$(OBJSUFF) \
+ $(UNIVDIR)/gauge.$(OBJSUFF) \
+ $(UNIVDIR)/inphand.$(OBJSUFF) \
+ $(UNIVDIR)/listbox.$(OBJSUFF) \
+ $(UNIVDIR)/menu.$(OBJSUFF) \
+ $(UNIVDIR)/notebook.$(OBJSUFF) \
+ $(UNIVDIR)/radiobox.$(OBJSUFF) \
+ $(UNIVDIR)/radiobut.$(OBJSUFF) \
+ $(UNIVDIR)/renderer.$(OBJSUFF) \
+ $(UNIVDIR)/scrarrow.$(OBJSUFF) \
+ $(UNIVDIR)/scrolbar.$(OBJSUFF) \
+ $(UNIVDIR)/scrthumb.$(OBJSUFF) \
+ $(UNIVDIR)/slider.$(OBJSUFF) \
+ $(UNIVDIR)/spinbutt.$(OBJSUFF) \
+ $(UNIVDIR)/spinctrl.$(OBJSUFF) \
+ $(UNIVDIR)/statbmp.$(OBJSUFF) \
+ $(UNIVDIR)/statbox.$(OBJSUFF) \
+ $(UNIVDIR)/statline.$(OBJSUFF) \
+ $(UNIVDIR)/stattext.$(OBJSUFF) \
+ $(UNIVDIR)/textctrl.$(OBJSUFF) \
+ $(UNIVDIR)/theme.$(OBJSUFF) \
+ $(UNIVDIR)/winuniv.$(OBJSUFF) \
+ $(UNIVDIR)/themes/gtk.$(OBJSUFF) \
+ $(UNIVDIR)/themes/win32.$(OBJSUFF)
+
+include $(CONFIG)
+
+######################## Additional Flags section ############################
+
+# Directories list for header files
+INCLUDEDIRS += -I$(WXDIR)/include
+# Defines for preprocessor
+DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__
+
+# Compilation flags for C files OTHER than include directories
+CFLAGS +=
+# Preprocessor flags OTHER than defines
+CPPFLAGS +=
+# Linking flags
+LDFLAGS +=
+
+############################# targets section ################################
+
+# If you want to create a library with the objects files, define the name here
+LIBNAME =
+
+# If we put it below OBJS=, Makefile.rules includes .depend
+# and it continually looks for .c files to satisfy .o.cpp
+# dependency. What's going on there?
+include $(TOP)/Makefile.rules
+
+# List of objects to compile
+OBJS = $(COMMONOBJS) $(MSWOBJS) $(GENERICOBJS)
+
+all: $(WXLIB)
+
+######################### Makefile.rules section #############################
+
+
+
+######################## Tools targets section ###############################
+
+#ntest: $(OBJS) $(NANOXCLIENTLIBS) $(TOP)/config
+# $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS)
+
+$(WXLIB): $(OBJS)
+ ar $(AROPTIONS) $@ $(OBJS)
+ $(RANLIB) $@
+
+#.SUFFIXES: .cpp .cxx .c
+
+#.c.o:
+# $(CC) -c $(CFLAGS) $(CFLAGS) -o $@ $*.c
+
+.cxx.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cxx
+
+.cpp.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cpp
+
+#$(COMMDIR)/appcmn.o: $(COMMDIR)/appcmn.cpp
+# $(CC) -c $(CPPFLAGS) -o $@ $*.cpp
+
+#appcmn.o: $(COMMDIR)/appcmn.cpp
+# $(CC) $(CPPFLAGS) -c -o $@ $<
+
+cleanwx:
+ -$(RM) *.o
+ -$(RM) *.bak
+ -$(RM) core
+ -$(RM) ../common/y_tab.c
+ -$(RM) ../common/lex_yy.c
+ -$(RM) ../common/*.o
+ -$(RM) ../common/*.bak
+ -$(RM) ../generic/*.o
+ -$(RM) ../generic/*.bak
+ -$(RM) ../html/*.o
+ -$(RM) ../zlib/*.o
+ -$(RM) ../zlib/*.bak
+ -$(RM) ../png/*.o
+ -$(RM) ../png/*.bak
+ -$(RM) ../jpeg/*.o
+ -$(RM) ../jpeg/*.bak
+ -$(RM) ../tiff/*.o
+ -$(RM) ../tiff/*.bak
{
UnRef();
-#ifdef __WXWINE__
+#if defined(__WXWINE__) || defined(__WXMICROWIN__)
return (FALSE);
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
{
+#ifdef __WXMICROWIN__
+ return FALSE;
+#else
if ( !m_refData )
return FALSE;
return ::GetNearestPaletteIndex((HPALETTE) M_PALETTEDATA->m_hPalette, PALETTERGB(red, green, blue));
+#endif
}
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
{
+#ifdef __WXMICROWIN__
+ return FALSE;
+#else
if ( !m_refData )
return FALSE;
return TRUE;
} else
return FALSE;
+#endif
}
void wxPalette::SetHPALETTE(WXHPALETTE pal)
// Join style, Cap style, Pen Stippling only on Win32.
// Currently no time to find equivalent on Win3.1, sorry
// [if such equiv exist!!]
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
if (M_PENDATA->m_join==wxJOIN_ROUND &&
M_PENDATA->m_cap==wxCAP_ROUND &&
M_PENDATA->m_style!=wxUSER_DASH &&
int cstyle;
switch (wx_style)
{
+#if !defined(__WXMICROWIN__)
case wxDOT:
cstyle = PS_DOT;
break;
case wxTRANSPARENT:
cstyle = PS_NULL;
break;
+#endif
case wxUSER_DASH:
+#if !defined(__WXMICROWIN__)
#ifdef __WIN32__
// Win32s doesn't have PS_USERSTYLE
if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95)
cstyle = PS_DOT; // We must make a choice... This is mine!
#else
cstyle = PS_DASH;
+#endif
#endif
break;
case wxSOLID:
wxRegionRefData(const wxRegionRefData& data)
{
-#if defined(__WIN32__)
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
DWORD noBytes = ::GetRegionData(data.m_region, 0, NULL);
RGNDATA *rgnData = (RGNDATA*) new char[noBytes];
::GetRegionData(data.m_region, noBytes, rgnData);
#include "wx/window.h"
#include "wx/msw/private.h"
#include "wx/module.h"
+#include "wx/fontutil.h"
// ----------------------------------------------------------------------------
// private classes
}
}
-wxFont wxSystemSettings::GetSystemFont(int index)
+wxFont wxCreateFontFromStockObject(int index)
{
- // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're
- // called fairly often - this is why we cache this particular font
- bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT;
- if ( isDefaultRequested && gs_fontDefault )
- {
- return *gs_fontDefault;
- }
-
wxFont font;
HFONT hFont = (HFONT) ::GetStockObject(index);
LOGFONT lf;
if ( ::GetObject(hFont, sizeof(LOGFONT), &lf) != 0 )
{
- font = wxCreateFontFromLogFont(&lf);
+ wxNativeFontInfo info;
+ info.lf = lf;
+ // Under MicroWindows we pass the HFONT as well
+ // because it's hard to convert HFONT -> LOGFONT -> HFONT
+ // It's OK to delete stock objects, the delete will be ignored.
+#ifdef __WXMICROWIN__
+ font.Create(info, (WXHFONT) hFont);
+#else
+ font.Create(info);
+#endif
}
else
{
{
wxFAIL_MSG( _T("stock font not found") );
}
+ return font;
+}
+
+wxFont wxSystemSettings::GetSystemFont(int index)
+{
+ // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're
+ // called fairly often - this is why we cache this particular font
+ bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT;
+ if ( isDefaultRequested && gs_fontDefault )
+ {
+ return *gs_fontDefault;
+ }
+
+ wxFont font = wxCreateFontFromStockObject(index);
if ( isDefaultRequested )
{
// Get a system metric, e.g. scrollbar size
int wxSystemSettings::GetSystemMetric(int index)
{
+#ifdef __WXMICROWIN__
+ // TODO: probably use wxUniv themes functionality
+ return 0;
+#else
switch ( index)
{
#ifdef __WIN32__
default:
return 0;
}
+#endif
+ // __WXMICROWIN__
}
// Option functions (arbitrary name/value mapping)
wxCHECK_MSG( m_milli > 0, FALSE, wxT("invalid value for timer timeour") );
wxTimerList.DeleteObject(this);
+
+#ifdef __WXMICROWIN__
+ m_id = SetTimer(NULL, (UINT)(m_id ? m_id : 1),
+ (UINT)milliseconds, (TIMERPROC) wxTimerProc);
+#else
TIMERPROC wxTimerProcInst = (TIMERPROC)
MakeProcInstance((FARPROC)wxTimerProc, wxGetInstance());
m_id = SetTimer(NULL, (UINT)(m_id ? m_id : 1),
(UINT)milliseconds, wxTimerProcInst);
+#endif
+
if ( m_id > 0 )
{
wxTimerList.Append(m_id, this);
// #include "wx/msw/private.h" which itself includes <windows.h>, as this
// one in turn includes <winsock.h> unless we define WIN32_LEAN_AND_MEAN.
//
-#if defined(__WIN32__) && !defined(__TWIN32__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
+#if defined(__WIN32__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
extern "C" {
#include <winsock.h> // we use socket functions in wxGetFullHostName()
}
#include "wx/timer.h"
-#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
+#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
#include <direct.h>
#ifndef __MWERKS__
#include <lm.h>
#endif // USE_NET_API
-#if defined(__WIN32__) && !defined(__WXWINE__)
+#if defined(__WIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__)
#include <io.h>
#ifndef __GNUWIN32__
static const wxChar eUSERNAME[] = wxT("UserName");
// these are only used under Win16
-#ifndef __WIN32__
+#if !defined(__WIN32__) && !defined(__WXMICROWIN__)
static const wxChar eHOSTNAME[] = wxT("HostName");
static const wxChar eUSERID[] = wxT("UserId");
#endif // !Win32
+#ifndef __WXMICROWIN__
+
// ============================================================================
// implementation
// ============================================================================
// Get hostname only (without domain name)
bool wxGetHostName(wxChar *buf, int maxSize)
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)
DWORD nSize = maxSize;
if ( !::GetComputerName(buf, &nSize) )
{
// get full hostname (with domain name if possible)
bool wxGetFullHostName(wxChar *buf, int maxSize)
{
-#if defined(__WIN32__) && !defined(__TWIN32__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
+#if defined(__WIN32__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
// TODO should use GetComputerNameEx() when available
WSADATA wsa;
if ( WSAStartup(MAKEWORD(1, 1), &wsa) == 0 )
// Get user ID e.g. jacs
bool wxGetUserId(wxChar *buf, int maxSize)
{
-#if defined(__WIN32__) && !defined(__win32s__) && !defined(__TWIN32__)
+#if defined(__WIN32__) && !defined(__win32s__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)
DWORD nSize = maxSize;
if ( ::GetUserName(buf, &nSize) == 0 )
{
bool wxDirExists(const wxString& dir)
{
-#if defined(__WIN32__)
+#ifdef __WXMICROWIN__
+ return wxPathExist(dir);
+#elif defined(__WIN32__)
DWORD attribs = GetFileAttributes(dir);
return ((attribs != (DWORD)-1) && (attribs & FILE_ATTRIBUTE_DIRECTORY));
#else // Win16
}
#endif // wxUSE_GUI/!wxUSE_GUI
+#endif
+ // __WXMICROWIN__
// ----------------------------------------------------------------------------
// deprecated (in favour of wxLog) log functions
#if wxUSE_GUI
// Output a debug mess., in a system dependent fashion.
+#ifndef __WXMICROWIN__
void wxDebugMsg(const wxChar *fmt ...)
{
va_list ap;
wxSprintf(wxBuffer, wxT("%s: %s"), WXSTRINGCAST title, WXSTRINGCAST msg);
FatalAppExit(0, (LPCTSTR)wxBuffer);
}
+#endif // __WXMICROWIN__
// ----------------------------------------------------------------------------
// functions to work with .INI files
if ( gs_wxBusyCursorCount++ == 0 )
{
gs_wxBusyCursor = (HCURSOR)cursor->GetHCURSOR();
+#ifndef __WXMICROWIN__
gs_wxBusyCursorOld = ::SetCursor(gs_wxBusyCursor);
+#endif
}
//else: nothing to do, already set
}
if ( --gs_wxBusyCursorCount == 0 )
{
+#ifndef __WXMICROWIN__
::SetCursor(gs_wxBusyCursorOld);
-
+#endif
gs_wxBusyCursorOld = 0;
}
}
// MSW only: get user-defined resource from the .res file.
// Returns NULL or newly-allocated memory, so use delete[] to clean up.
+#ifndef __WXMICROWIN__
wxChar *wxLoadUserResource(const wxString& resourceName, const wxString& resourceType)
{
HRSRC hResource = ::FindResource(wxGetInstance(), resourceName, resourceType);
return s;
}
+#endif
// ----------------------------------------------------------------------------
// get display info
// Return TRUE if we have a colour display
bool wxColourDisplay()
{
+#ifdef __WXMICROWIN__
+ // MICROWIN_TODO
+ return TRUE;
+#else
// this function is called from wxDC ctor so it is called a *lot* of times
// hence we optimize it a bit but doign the check only once
//
}
return s_isColour != 0;
+#endif
}
// Returns depth of screen
// Get size of display
void wxDisplaySize(int *width, int *height)
{
+#ifdef __WXMICROWIN__
+ // MICROWIN_TODO
+ *width = 0; * height = 0;
+#else
ScreenHDC dc;
if ( width ) *width = GetDeviceCaps(dc, HORZRES);
if ( height ) *height = GetDeviceCaps(dc, VERTRES);
+#endif
}
void wxDisplaySizeMM(int *width, int *height)
{
+#ifdef __WXMICROWIN__
+ // MICROWIN_TODO
+ *width = 0; * height = 0;
+#else
ScreenHDC dc;
if ( width ) *width = GetDeviceCaps(dc, HORZSIZE);
if ( height ) *height = GetDeviceCaps(dc, VERTSIZE);
+#endif
}
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
{
-#ifdef __WIN16__
+#if defined(__WIN16__) || defined(__WXMICROWIN__)
*x = 0; *y = 0;
wxDisplaySize(width, height);
#else
wxString WXDLLEXPORT wxGetWindowClass(WXHWND hWnd)
{
+#ifdef __WXMICROWIN__
+ // MICROWIN_TODO
+ return wxEmptyString;
+#else
wxString str;
int len = 256; // some starting value
}
return str;
+#endif
}
WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
}
#endif
+#ifdef __WXMICROWIN__
+int wxGetOsVersion(int *majorVsn, int *minorVsn)
+{
+ // MICROWIN_TODO
+ if (majorVsn) *majorVsn = 0;
+ if (minorVsn) *minorVsn = 0;
+ return wxUNIX;
+}
+#endif
#include <ctype.h>
-#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
+#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
#include <direct.h>
#ifndef __MWERKS__
#include <dos.h>
#include <sys/stat.h>
#endif
-#if defined(__WIN32__) && !defined(__WXWINE__)
+#if defined(__WIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__)
#include <io.h>
#ifndef __GNUWIN32__
#include <string.h>
-#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
+#if (!defined(__GNUWIN32_OLD__) && !defined(__WXMICROWIN__)) || defined(__CYGWIN10__)
#include <shellapi.h>
#include <mmsystem.h>
#endif
#include <windowsx.h>
#endif
-#if (!defined(__GNUWIN32_OLD__) && !defined(__TWIN32__)) || defined(__CYGWIN10__)
+#if (!defined(__GNUWIN32_OLD__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)) || defined(__CYGWIN10__)
#ifdef __WIN95__
#include <commctrl.h>
#endif
-#else // broken compiler
+#elif !defined(__WXMICROWIN__) // broken compiler
#ifndef __TWIN32__
#include "wx/msw/gnuwin32/extra.h"
#endif
HWND hWnd = GetHwnd();
if ( hWnd )
{
+#ifdef __WXMICROWIN__
+ return ::GetScrollPosWX(hWnd, wOrient);
+#else
return ::GetScrollPos(hWnd, wOrient);
+#endif
}
else
return 0;
void wxWindowMSW::UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd)
{
+#ifndef __WXMICROWIN__
*nCtlColor = CTLCOLOR_BTN;
*hwnd = (WXHWND)lParam;
*hdc = (WXHDC)wParam;
+#endif
}
void wxWindowMSW::UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam,
wParam);
break;
+#ifdef MM_JOY1MOVE // __WXMICROWIN__
case MM_JOY1MOVE:
case MM_JOY2MOVE:
case MM_JOY1ZMOVE:
GET_Y_LPARAM(lParam),
wParam);
break;
+#endif
case WM_SYSCOMMAND:
processed = HandleSysCommand(wParam, lParam);
#endif // Win95
// for these messages we must return TRUE if process the message
+#ifdef WM_DRAWITEM // __WXMICROWIN__
case WM_DRAWITEM:
case WM_MEASUREITEM:
{
rc.result = TRUE;
}
break;
-
+#endif
case WM_GETDLGCODE:
if ( m_lDlgCode )
{
break;
// CTLCOLOR messages are sent by children to query the parent for their
- // colors
+ // colors#ifndef __WXMICROWIN__
+#ifndef __WXMICROWIN__
#ifdef __WIN32__
case WM_CTLCOLORMSGBOX:
case WM_CTLCOLOREDIT:
lParam);
}
break;
+#endif
// the return value for this message is ignored
case WM_SYSCOLORCHANGE:
}
break;
-#ifdef __WIN32__
+#if defined(__WIN32__) && defined(WM_HELP)
case WM_HELP:
{
HELPINFO* info = (HELPINFO*) lParam;
if ( dialog_template )
{
+#ifndef __WXMICROWIN__
// for the dialogs without wxDIALOG_NO_PARENT style, use the top level
// app window as parent - this avoids creating modal dialogs without
// parent
{
wxLogLastError(wxT("MoveWindow"));
}
+#endif
+ // __WXMICROWIN__
+
}
else // creating a normal window, not a dialog
{
// FIXME: VZ: I'm not sure at all that the order of processing is correct
bool wxWindowMSW::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{
+#ifndef __WXMICROWIN__
LPNMHDR hdr = (LPNMHDR)lParam;
HWND hWnd = hdr->hwndFrom;
wxWindow *win = wxFindWinFromHandle((WXHWND)hWnd);
// finally try this window too (catches toolbar case)
return MSWOnNotify(idCtrl, lParam, result);
+#else
+ return FALSE;
+#endif
}
bool wxWindowMSW::MSWOnNotify(int WXUNUSED(idCtrl),
bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
{
+#ifndef __WXMICROWIN__
HDROP hFilesInfo = (HDROP) wParam;
POINT dropPoint;
DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint);
delete[] files;
return rc;
+#else
+ return FALSE;
+#endif
}
bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd),
short nHitTest,
int WXUNUSED(mouseMsg))
{
+#ifndef __WXMICROWIN__
// the logic is as follows:
// -1. don't set cursor for non client area, including but not limited to
// the title bar, scrollbars, &c
// cursor set, stop here
return TRUE;
}
-
+#endif
// pass up the window chain
return FALSE;
}
WXWPARAM wParam,
WXLPARAM lParam)
{
+#ifndef __WXMICROWIN__
WXHBRUSH hBrush = 0;
if ( nCtlColor == CTLCOLOR_DLG )
*brush = hBrush;
return hBrush != 0;
+#else
+ return FALSE;
+#endif
}
// Define for each class of dialog and control
return win;
}
+#ifndef __WXMICROWIN__
+
// Windows keyboard hook. Allows interception of e.g. F1, ESCAPE
// in active frames and dialogs, regardless of where the focus is.
static HHOOK wxTheKeyboardHook = 0;
return (int)CallNextHookEx(wxTheKeyboardHook, nCode, wParam, lParam);
}
+#endif
#ifdef __WXDEBUG__
const char *wxGetMessageName(int message)