#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
// event tables
// ---------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
-
// in wxUniv/MSW this class is abstract because it doesn't have DoPopupMenu()
// method
#ifdef __WXUNIVERSAL__
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;
// Don't yet process menu help events, just windows
if (info->iContextType == HELPINFO_WINDOW)
{
- wxWindow* subjectOfHelp = this;
+ wxWindowMSW* subjectOfHelp = this;
bool eventProcessed = FALSE;
while (subjectOfHelp && !eventProcessed)
{
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 GetEventHandler()->ProcessEvent(event);
}
-#if wxUSE_SPINCTRL
+#if wxUSE_SPINCTRL && !defined(__WXUNIVERSAL__)
else
{
// the text ctrl which is logically part of wxSpinCtrl sends WM_COMMAND
}
-bool wxWindow::HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam)
+bool wxWindowMSW::HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam)
{
#if wxUSE_MOUSEWHEEL
wxMouseEvent event(wxEVT_MOUSEWHEEL);
// spin control text buddy window should be mapped to spin ctrl
// itself so try it too
-#if wxUSE_SPINCTRL
+#if wxUSE_SPINCTRL && !defined(__WXUNIVERSAL__)
if ( !win )
{
win = wxSpinCtrl::GetSpinForTextCtrl((WXHWND)hwnd);
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)