#define __WIN32__
#endif
+#ifdef __WXWINE__
+ #ifndef __WIN32__
+ #define __WIN32__
+ #endif
+ #ifndef __WIN95__
+ #define __WIN95__
+ #endif
+ #ifndef STRICT
+ #define STRICT
+ #endif
+#endif
+
#ifndef __WIN32__
#define __WIN16__
#endif
typedef void * WXMEASUREITEMSTRUCT;
typedef void * WXLPCREATESTRUCT;
-#ifdef __GNUWIN32__
+#if defined(__GNUWIN32__) || defined(__WXWINE__)
typedef int (*WXFARPROC)();
#elif defined(__WIN32__)
typedef int (__stdcall *WXFARPROC)();
WXDLLEXPORT_DATA(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON;
WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT;
-// ---------------------------------------------------------------------------
-// WINE implements the Win32 API
-// ---------------------------------------------------------------------------
-
-#ifdef __WXWINE__
- #ifndef __WIN32__
- #define __WIN32__
- #endif
- #ifndef STRICT
- #define STRICT
- #endif
-#endif
-
// ---------------------------------------------------------------------------
// this defines a CASTWNDPROC macro which casts a pointer to the type of a
// window proc
#include <iostream>
#endif
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__WXWINE__)
#define wxUSE_RICHEDIT 1
#else
#define wxUSE_RICHEDIT 0
#endif
// standard
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <io.h>
#ifndef __SALFORDC__
#include <string.h>
#if wxUSE_IOSTREAMH
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <strstrea.h>
#else
#include <strstream.h>
#include <string.h>
#if wxUSE_IOSTREAMH
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <strstrea.h>
#else
#include <strstream.h>
#include <string.h>
#if wxUSE_IOSTREAMH
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
+#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__WXWINE__)
#include <strstrea.h>
#else
#include <strstream.h>
variant.cpp \
wxchar.cpp \
\
+ config.cpp \
+ date.cpp \
+ datstrm.cpp \
+ dcbase.cpp \
+ docmdi.cpp \
+ docview.cpp \
+ dynlib.cpp \
+ event.cpp \
+ file.cpp \
+ fileconf.cpp \
+ framecmn.cpp \
+ ftp.cpp \
+ gdicmn.cpp \
+ helpbase.cpp \
+ http.cpp \
+ image.cpp \
+ imaggif.cpp \
+ imagjpeg.cpp \
+ imagpng.cpp \
+ intl.cpp \
+ ipcbase.cpp \
+ layout.cpp \
+ log.cpp \
+ longlong.cpp \
+ mimetype.cpp \
+ mstream.cpp \
+ objstrm.cpp \
+ paper.cpp \
+ prntbase.cpp \
+ process.cpp \
+ protocol.cpp \
+ resource.cpp \
+ sckaddr.cpp \
+ sckfile.cpp \
+ sckint.cpp \
+ sckipc.cpp \
+ sckstrm.cpp \
+ serbase.cpp \
+ socket.cpp \
+ stream.cpp \
+ tbarbase.cpp \
+ tbarsmpl.cpp \
+ textfile.cpp \
+ time.cpp \
+ url.cpp \
+ validate.cpp \
+ valtext.cpp \
+ wfstream.cpp \
wincmn.cpp \
+ wxexpr.cpp \
+ zstream.cpp \
+\
+ choicdgg.cpp \
+ gridg.cpp \
+ laywin.cpp \
+ panelg.cpp \
+ printps.cpp \
+ progdlgg.cpp \
+ prop.cpp \
+ propform.cpp \
+ proplist.cpp \
+ sashwin.cpp \
+ scrolwin.cpp \
+ splitter.cpp \
+ statusbr.cpp \
+ tabg.cpp \
+ textdlgg.cpp \
\
accel.cpp \
app.cpp \
button.cpp \
caret.cpp \
checkbox.cpp \
- checklst.cpp \
choice.cpp \
clipbrd.cpp \
colour.cpp \
filedlg.cpp \
font.cpp \
frame.cpp \
- gaugemsw.cpp \
+ gauge95.cpp \
gdiobj.cpp \
icon.cpp \
imaglist.cpp \
listbox.cpp \
- listctrlc.cpp \
main.cpp \
mdi.cpp \
menu.cpp \
menuitem.cpp \
minifram.cpp \
+ msgdlg.cpp \
notebook.cpp \
ownerdrw.cpp \
palette.cpp \
registry.cpp \
scrolbar.cpp \
settings.cpp \
- slidermsw.cpp \
+ slider95.cpp \
spinbutt.cpp \
statbmp.cpp \
statbox.cpp \
stattext.cpp \
- tbarmsw.cpp \
+ tbar95.cpp \
textctrl.cpp \
thread.cpp \
timer.cpp \
tooltip.cpp \
- treectrl.cpp \
utils.cpp \
utilsexc.cpp \
wave.cpp \
extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
// Create from an array
-#if !defined(__WIN16__) && !defined(__TWIN32__)
+#if !defined(__WIN16__) && !defined(__TWIN32__) && !defined(__WXWINE__)
wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
{
// Not available in WIN16
wxCursorRefData::~wxCursorRefData(void)
{
if ( m_hCursor && m_destroyCursor)
+#ifdef __WXWINE__
+ ::DestroyCursor((HCURSOR) m_hCursor);
+#else
::DestroyCursor((HICON) m_hCursor);
+#endif
}
// Cursors
#include <windows.h>
-#if !defined(__WIN32__) || defined(__SALFORDC__)
+#if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__)
#include <commdlg.h>
#endif
#pragma hdrstop
#endif
-#include <windowsx.h>
#include "wx/window.h"
#include "wx/msw/private.h"
#include "wx/dc.h"
#endif
+#include <windowsx.h>
+
+#ifdef __WXWINE__
+ #if defined(GetWindowStyle)
+ #undef GetWindowStyle
+ #endif
+#endif
+
#include "wx/dynarray.h"
#include "wx/log.h"
#endif
#ifndef __TWIN32__
- #ifdef __GNUWIN32__
+ #if defined(__GNUWIN32__)
#include <wx/msw/gnuwin32/extra.h>
#endif
#endif
+#ifdef __WXWINE__
+ #ifndef ListBox_SetItemData
+ #define ListBox_SetItemData(hwndCtl, index, data) \
+ ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data)))
+ #endif
+ #ifndef ListBox_GetHorizontalExtent
+ #define ListBox_GetHorizontalExtent(hwndCtl) \
+ ((int)(DWORD)SendMessage((hwndCtl), LB_GETHORIZONTALEXTENT, 0L, 0L))
+ #endif
+ #ifndef ListBox_GetSelCount
+ #define ListBox_GetSelCount(hwndCtl) \
+ ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELCOUNT, 0L, 0L))
+ #endif
+ #ifndef ListBox_GetSelItems
+ #define ListBox_GetSelItems(hwndCtl, cItems, lpItems) \
+ ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int *)(lpItems)))
+ #endif
+ #ifndef ListBox_GetTextLen
+ #define ListBox_GetTextLen(hwndCtl, index) \
+ ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXTLEN, (WPARAM)(int)(index), 0L))
+ #endif
+ #ifndef ListBox_GetText
+ #define ListBox_GetText(hwndCtl, index, lpszBuffer) \
+ ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpszBuffer)))
+ #endif
+#endif
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
else if ( code == wxLIST_RECT_LABEL )
code2 = LVIR_LABEL;
+#ifdef __WXWINE__
+ bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2 ) != 0);
+#else
bool success = (ListView_GetItemRect((HWND) GetHWND(), (int) item, &rect2, code2) != 0);
+#endif
rect.x = rect2.left;
rect.y = rect2.top;
{
UnRef();
+#ifdef __WXWINE__
+
+ return (FALSE);
+
+#else
+
m_refData = new wxPaletteRefData;
NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) +
M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
LocalFree((HANDLE)npPal);
return TRUE;
+
+#endif
}
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
{
limit = len + 0x8000; // 32Kb
+#if wxUSE_RICHEDIT
if ( m_isRich || limit > 0xffff )
+#else
+ if ( limit > 0xffff )
+#endif
::SendMessage(GetHwnd(), EM_LIMITTEXT, 0, limit);
else
::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
#include <ctype.h>
-#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
+#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
#include <direct.h>
#ifndef __MWERKS__
#include <dir.h>
#endif
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXWINE__)
#include <io.h>
#ifndef __GNUWIN32__
#include <ctype.h>
-#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
+#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__)
#include <direct.h>
#ifndef __MWERKS__
#include <dos.h>
#endif
#endif
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXWINE__)
#include <io.h>
#ifndef __GNUWIN32__