*** empty log message ***

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-10-15 04:07:54 +00:00
parent fb46a9a6c6
commit 11e59d47c0
8 changed files with 157 additions and 84 deletions

View File

@@ -1517,6 +1517,8 @@ typedef long WXLPARAM;
# define WXLPARAM MPARAM # define WXLPARAM MPARAM
# define RECT RECTL # define RECT RECTL
# define LOGFONT FATTRS # define LOGFONT FATTRS
# define LOWORD SHORT1FROMMP
# define HIWORD SHORT2FROMMP
#endif #endif
typedef unsigned long WXCOLORREF; typedef unsigned long WXCOLORREF;
typedef void * WXRGNDATA; typedef void * WXRGNDATA;

View File

@@ -1,21 +1,17 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: print.h // Name: print.h
// Purpose: wxPrinter, wxPrintPreview classes // Purpose: wxPrinter, wxPrintPreview classes
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 10/14/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRINT_H_ #ifndef _WX_PRINT_H_
#define _WX_PRINT_H_ #define _WX_PRINT_H_
#ifdef __GNUG__
#pragma interface "print.h"
#endif
#include "wx/prntbase.h" #include "wx/prntbase.h"
/* /*
@@ -31,8 +27,9 @@ class WXDLLEXPORT wxPrinter: public wxPrinterBase
~wxPrinter(); ~wxPrinter();
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE); virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
virtual bool PrintDialog(wxWindow *parent); virtual wxDC* PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent); virtual bool Setup(wxWindow *parent);
private:
}; };
/* /*

View File

@@ -43,6 +43,8 @@ public:
const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
virtual bool OS2Command(WXUINT param, WXWORD id); virtual bool OS2Command(WXUINT param, WXWORD id);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
int FindString(const wxString& s) const; int FindString(const wxString& s) const;
void SetSelection(int N); void SetSelection(int N);
@@ -52,10 +54,9 @@ public:
void GetSize(int *x, int *y) const; void GetSize(int *x, int *y) const;
void GetPosition(int *x, int *y) const; void GetPosition(int *x, int *y) const;
void SetLabel(const wxString& label);
void SetLabel(int item, const wxString& label); void SetLabel(int item, const wxString& label);
void SetLabel(int item, wxBitmap *bitmap);
wxString GetLabel(int item) const; wxString GetLabel(int item) const;
wxString GetLabel() const;
bool Show(bool show); bool Show(bool show);
void SetFocus(); void SetFocus();
bool Enable(bool enable); bool Enable(bool enable);
@@ -72,6 +73,24 @@ public:
inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; } inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; } inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
// implementation only from now on
// -------------------------------
WXHWND *GetRadioButtons() const { return m_radioButtons; }
bool ContainsHWND(WXHWND hWnd) const;
void SendNotificationEvent();
// get the number of buttons per column/row
int GetNumVer() const;
int GetNumHor() const;
#if WXWIN_COMPATIBILITY
wxRadioBox(wxWindow *parent, wxFunction func, const char *title,
int x = -1, int y = -1, int width = -1, int height = -1,
int n = 0, char **choices = NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL, const char *name = wxRadioBoxNameStr);
#endif // WXWIN_COMPATIBILITY
protected: protected:
void SubclassRadioButton(WXHWND hWndBtn); void SubclassRadioButton(WXHWND hWndBtn);
@@ -87,6 +106,11 @@ protected:
virtual void DoSetSize(int x, int y, virtual void DoSetSize(int x, int y,
int width, int height, int width, int height,
int sizeFlags = wxSIZE_AUTO); int sizeFlags = wxSIZE_AUTO);
private:
virtual void SetLabel(const wxString& label)
{ wxWindowBase::SetLabel(label); }
wxString GetLabel() const
{ return(wxWindowBase::GetLabel()); }
}; };
#endif #endif

View File

@@ -26,7 +26,8 @@ COMTEMPTGT1=$(WXDIR)\lib\wxcom1.lib
COMTEMPTGT2=$(WXDIR)\lib\wxcom2.lib COMTEMPTGT2=$(WXDIR)\lib\wxcom2.lib
GENTEMPTGT=$(WXDIR)\lib\wxgen.lib GENTEMPTGT=$(WXDIR)\lib\wxgen.lib
NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib
OS2TEMPTGT=$(WXDIR)\lib\wxos2.lib OS2TEMPTGT1=$(WXDIR)\lib\wxos21.lib
OS2TEMPTGT2=$(WXDIR)\lib\wxos22.lib
DUMMYOBJ=$D\dummy.obj DUMMYOBJ=$D\dummy.obj
!endif !endif
@@ -344,7 +345,7 @@ OS2OBJS = \
..\os2\$D\radiobut.obj \ ..\os2\$D\radiobut.obj \
..\os2\$D\window.obj ..\os2\$D\window.obj
OS2LIBOBJS = \ OS2LIBOBJS1 = \
accel.obj \ accel.obj \
app.obj \ app.obj \
bitmap.obj \ bitmap.obj \
@@ -389,7 +390,9 @@ OS2LIBOBJS = \
metafile.obj \ metafile.obj \
minifram.obj \ minifram.obj \
msgdlg.obj \ msgdlg.obj \
nativdlg.obj \ nativdlg.obj
OS2LIBOBJS2 = \
notebook.obj \ notebook.obj \
ownerdrw.obj \ ownerdrw.obj \
palette.obj \ palette.obj \
@@ -544,7 +547,7 @@ $(GENLIBOBJS):
copy ..\generic\$D\tipdlg.obj copy ..\generic\$D\tipdlg.obj
copy ..\generic\$D\busyinfo.obj copy ..\generic\$D\busyinfo.obj
$(OS2LIBOBJS): $(OS2LIBOBJS1):
copy ..\os2\$D\accel.obj copy ..\os2\$D\accel.obj
copy ..\os2\$D\app.obj copy ..\os2\$D\app.obj
copy ..\os2\$D\bitmap.obj copy ..\os2\$D\bitmap.obj
@@ -590,9 +593,11 @@ $(OS2LIBOBJS):
copy ..\os2\$D\minifram.obj copy ..\os2\$D\minifram.obj
copy ..\os2\$D\msgdlg.obj copy ..\os2\$D\msgdlg.obj
copy ..\os2\$D\nativdlg.obj copy ..\os2\$D\nativdlg.obj
$(OS2LIBOBJS2):
copy ..\os2\$D\notebook.obj copy ..\os2\$D\notebook.obj
copy ..\os2\$D\ownerdrw.obj copy ..\os2\$D\ownerdrw.obj
copy ..\os2\$D\pallet.obj copy ..\os2\$D\palette.obj
copy ..\os2\$D\pen.obj copy ..\os2\$D\pen.obj
copy ..\os2\$D\pnghand.obj copy ..\os2\$D\pnghand.obj
copy ..\os2\$D\print.obj copy ..\os2\$D\print.obj
@@ -663,9 +668,16 @@ $(WXDIR)\lib\wxnones.lib: $(NONESSENTIALOBJS)
$**; $**;
<< <<
$(WXDIR)\lib\wxos2.lib: $(OS2LIBOBJS) $(WXDIR)\lib\wxos21.lib: $(OS2LIBOBJS1)
touch $(WXDIR)\lib\wxos2.lib touch $(WXDIR)\lib\wxos21.lib
del $(WXDIR)\lib\wxos2.lib del $(WXDIR)\lib\wxos21.lib
ilib $(LIBFLAGS) $@ @<<
$**;
<<
$(WXDIR)\lib\wxos22.lib: $(OS2LIBOBJS2)
touch $(WXDIR)\lib\wxos22.lib
del $(WXDIR)\lib\wxos22.lib
ilib $(LIBFLAGS) $@ @<< ilib $(LIBFLAGS) $@ @<<
$**; $**;
<< <<
@@ -677,7 +689,8 @@ $(WXDIR)\lib\wx.lib: \
$(COMTEMPTGT2) \ $(COMTEMPTGT2) \
$(GENTEMPTGT) \ $(GENTEMPTGT) \
$(NONESTEMPTGT) \ $(NONESTEMPTGT) \
$(OS2TEMPTGT) \ $(OS2TEMPTGT1) \
$(OS2TEMPTGT2) \
$(PERIPH_LIBS) $(PERIPH_LIBS)
touch $(LIBTARGET) touch $(LIBTARGET)
del $(LIBTARGET) del $(LIBTARGET)
@@ -688,7 +701,8 @@ $(WXDIR)\lib\wx.lib: \
del $(COMTEMPTGT2) del $(COMTEMPTGT2)
del $(GENTEMPTGT) del $(GENTEMPTGT)
del $(NONESTEMPTGT) del $(NONESTEMPTGT)
del $(OS2TEMPTGT) del $(OS2TEMPTGT1)
del $(OS2TEMPTGT2)
!else !else

View File

@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: print.cpp // Name: print.cpp
// Purpose: Print framework // Purpose: Print framework
// Author: AUTHOR // Author: David Webster
// Modified by: // Modified by:
// Created: ??/??/98 // Created: 10/14/99
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) David Webster
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -21,8 +21,7 @@
#include "wx/os2/print.h" #include "wx/os2/print.h"
#include "wx/print.h" #include "wx/generic/prntdlgg.h"
#include "wx/generic/printdlg.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase) IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase)
@@ -34,7 +33,7 @@ IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase)
*/ */
wxPrinter::wxPrinter(wxPrintData *data): wxPrinter::wxPrinter(wxPrintData *data):
wxPrinterBase(data) wxPrinterBase((wxPrintDialogData*)data)
{ {
} }
@@ -48,17 +47,25 @@ bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
return FALSE; return FALSE;
} }
bool wxPrinter::PrintDialog(wxWindow *parent) wxDC* wxPrinter::PrintDialog(wxWindow *parent)
{ {
// TODO:
/*
wxPrintDialog dialog(parent, & m_printData); wxPrintDialog dialog(parent, & m_printData);
return (dialog.ShowModal() == wxID_OK); return (dialog.GetPrintDC());
*/
return NULL;
} }
bool wxPrinter::Setup(wxWindow *parent) bool wxPrinter::Setup(wxWindow *parent)
{ {
// TODO:
/*
wxPrintDialog dialog(parent, & m_printData); wxPrintDialog dialog(parent, & m_printData);
dialog.GetPrintData().SetSetupDialog(TRUE); dialog.GetPrintData().SetSetupDialog(TRUE);
return (dialog.ShowModal() == wxID_OK); return (dialog.ShowModal() == wxID_OK);
*/
return FALSE;
} }
/* /*
@@ -79,8 +86,9 @@ bool wxPrintPreview::Print(bool interactive)
{ {
if (!m_printPrintout) if (!m_printPrintout)
return FALSE; return FALSE;
wxPrinter printer(&m_printData); // wxPrinter printer(&m_printData);
return printer.Print(m_previewFrame, m_printPrintout, interactive); // return printer.Print(m_previewFrame, m_printPrintout, interactive);
return FALSE;
} }
void wxPrintPreview::DetermineScaling() void wxPrintPreview::DetermineScaling()

View File

@@ -31,7 +31,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// wnd proc for radio buttons // wnd proc for radio buttons
MRESULT _EXPORT wxRadioBtnWndProc(HWND hWnd, MRESULT wxRadioBtnWndProc(HWND hWnd,
UINT message, UINT message,
MPARAM wParam, MPARAM wParam,
MPARAM lParam); MPARAM lParam);
@@ -173,7 +173,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
m_majorDim = majorDim; m_majorDim = majorDim;
m_noRowsOrCols = majorDim; m_noRowsOrCols = majorDim;
long msStyle = GROUP_FLAGS; long msStyle = 0; // TODO: GROUP_FLAGS;
bool want3D; bool want3D;
WXDWORD exStyle = Determine3DEffects(0, &want3D); WXDWORD exStyle = Determine3DEffects(0, &want3D);
@@ -245,9 +245,9 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
} }
// Create a dummy radio control to end the group. // Create a dummy radio control to end the group.
(void)CreateWindowEx(0, RADIO_CLASS, wxT(""), WS_GROUP | RADIO_FLAGS, // (void)CreateWindowEx(0, RADIO_CLASS, wxT(""), WS_GROUP | RADIO_FLAGS,
0, 0, 0, 0, hwndParent, // 0, 0, 0, 0, hwndParent,
(HMENU)NewControlId(), wxGetInstance(), NULL); // (HMENU)NewControlId(), wxGetInstance(), NULL);
SetSelection(0); SetSelection(0);
@@ -431,7 +431,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
height = heightOld; height = heightOld;
} }
MoveWindow(GetHwnd(), x_offset, y_offset, width, height, TRUE); // TODO: MoveWindow(GetHwnd(), x_offset, y_offset, width, height, TRUE);
x_offset += cx1; x_offset += cx1;
y_offset += cy1; y_offset += cy1;
@@ -497,7 +497,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
void wxRadioBox::GetSize(int *width, int *height) const void wxRadioBox::GetSize(int *width, int *height) const
{ {
RECT rect; RECT rect;
rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; rect.xLeft = -1; rect.xRight = -1; rect.yTop = -1; rect.yBottom = -1;
if (m_hWnd) if (m_hWnd)
wxFindMaxSize(m_hWnd, &rect); wxFindMaxSize(m_hWnd, &rect);
@@ -506,15 +506,15 @@ void wxRadioBox::GetSize(int *width, int *height) const
for (i = 0; i < m_noItems; i++) for (i = 0; i < m_noItems; i++)
wxFindMaxSize(m_radioButtons[i], &rect); wxFindMaxSize(m_radioButtons[i], &rect);
*width = rect.right - rect.left; *width = rect.xRight - rect.xLeft;
*height = rect.bottom - rect.top; *height = rect.yBottom - rect.yTop;
} }
void wxRadioBox::GetPosition(int *x, int *y) const void wxRadioBox::GetPosition(int *x, int *y) const
{ {
wxWindow *parent = GetParent(); wxWindow *parent = GetParent();
RECT rect; RECT rect;
rect.left = -1; rect.right = -1; rect.top = -1; rect.bottom = -1; rect.xLeft = -1; rect.xRight = -1; rect.yTop = -1; rect.yBottom = -1;
int i; int i;
for (i = 0; i < m_noItems; i++) for (i = 0; i < m_noItems; i++)
@@ -525,9 +525,9 @@ void wxRadioBox::GetPosition(int *x, int *y) const
// Since we now have the absolute screen coords, // Since we now have the absolute screen coords,
// if there's a parent we must subtract its top left corner // if there's a parent we must subtract its top left corner
POINT point; POINTL point;
point.x = rect.left; point.x = rect.xLeft;
point.y = rect.top; point.y = rect.yTop;
// TODO: // TODO:
/* /*
if (parent) if (parent)
@@ -568,7 +568,7 @@ bool wxRadioBox::Show(bool show)
if ( !wxControl::Show(show) ) if ( !wxControl::Show(show) )
return FALSE; return FALSE;
int nCmdShow = show ? SW_SHOW : SW_HIDE; int nCmdShow = 0; // TODO: show ? SW_SHOW : SW_HIDE;
for ( int i = 0; i < m_noItems; i++ ) for ( int i = 0; i < m_noItems; i++ )
{ {
// TODO: ::ShowWindow((HWND)m_radioButtons[i], nCmdShow); // TODO: ::ShowWindow((HWND)m_radioButtons[i], nCmdShow);
@@ -696,18 +696,18 @@ void wxRadioBox::SendNotificationEvent()
// window proc for radio buttons // window proc for radio buttons
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
MRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, MRESULT wxRadioBtnWndProc(HWND hwnd,
UINT msg, UINT msg,
MPARAM wParam, MPARAM wParam,
MPARAM lParam) MPARAM lParam)
{ {
bool processed = TRUE; bool processed = TRUE;
if ( msg != WM_KEYDOWN ) // if ( msg != WM_KEYDOWN )
processed = FALSE; // processed = FALSE;
if ( processed ) if ( processed )
{ {
wxRadioBox *radiobox = (wxRadioBox *)::GetWindowLong(hwnd, GWL_USERDATA); wxRadioBox *radiobox = NULL; // TODO: (wxRadioBox *)::GetWindowLong(hwnd, GWL_USERDATA);
wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") ); wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );

View File

@@ -23,7 +23,7 @@
#include "wx/brush.h" #include "wx/brush.h"
#endif #endif
#include "wx/msw/private.h" #include "wx/os2/private.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)

View File

@@ -96,6 +96,11 @@ MRESULT wxWndProc( HWND hWnd
,MPARAM mp1 ,MPARAM mp1
,MPARAM mp2 ,MPARAM mp2
); );
#ifdef __WXDEBUG__
const char *wxGetMessageName(int message);
#endif //__WXDEBUG__
void wxRemoveHandleAssociation(wxWindow *win); void wxRemoveHandleAssociation(wxWindow *win);
void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win); void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
wxWindow *wxFindWinFromHandle(WXHWND hWnd); wxWindow *wxFindWinFromHandle(WXHWND hWnd);
@@ -258,6 +263,11 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
parent->AddChild(this); parent->AddChild(this);
bool want3D;
WXDWORD exStyle = 0; // TODO: Determine3DEffects(WS_EX_CLIENTEDGE, &want3D);
DWORD msflags = 0;
// TODO: PM Specific initialization // TODO: PM Specific initialization
OS2Create(m_windowId, parent, wxCanvasClassName, this, NULL, OS2Create(m_windowId, parent, wxCanvasClassName, this, NULL,
pos.x, pos.y, pos.x, pos.y,
@@ -275,7 +285,7 @@ void wxWindow::SetFocus()
// TODO: // TODO:
} }
wxWindow* wxWindow::FindFocus() wxWindow* wxWindowBase::FindFocus()
{ {
wxWindow* window = NULL; wxWindow* window = NULL;
// TODO: // TODO:
@@ -306,7 +316,7 @@ void wxWindow::Lower()
void wxWindow::SetTitle( const wxString& title) void wxWindow::SetTitle( const wxString& title)
{ {
SetWindowText(GetHwnd(), title.c_str()); // TODO: SetWindowText(GetHwnd(), title.c_str());
} }
wxString wxWindow::GetTitle() const wxString wxWindow::GetTitle() const
@@ -373,6 +383,7 @@ int wxWindow::GetScrollPage(int orient) const
// TODO: // TODO:
return(1); return(1);
} }
#endif // WXWIN_COMPATIBILITY
int wxWindow::GetScrollPos(int orient) const int wxWindow::GetScrollPos(int orient) const
{ {
@@ -831,7 +842,7 @@ void wxWindow::UnpackScroll(WXWPARAM wParam, WXLPARAM lParam,
void wxWindow::UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam, void wxWindow::UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd) WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd)
{ {
*nCtlColor = CTLCOLOR_BTN; *nCtlColor = 0; // TODO: CTLCOLOR_BTN;
*hwnd = (WXHWND)lParam; *hwnd = (WXHWND)lParam;
*hdc = (WXHDC)wParam; *hdc = (WXHDC)wParam;
} }
@@ -839,7 +850,7 @@ void wxWindow::UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
void wxWindow::UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam, void wxWindow::UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *item, WXWORD *flags, WXHMENU *hmenu) WXWORD *item, WXWORD *flags, WXHMENU *hmenu)
{ {
*item = (WXWORD)wParam; *item = (WXWORD)LOWORD(wParam);
*flags = HIWORD(wParam); *flags = HIWORD(wParam);
*hmenu = (WXHMENU)lParam; *hmenu = (WXHMENU)lParam;
} }
@@ -886,7 +897,7 @@ MRESULT wxWndProc(HWND hWnd, UINT message, MPARAM wParam, MPARAM lParam)
{ {
// FIXME: why do we do this? // FIXME: why do we do this?
wnd->SetHWND((WXHWND) hWnd); wnd->SetHWND((WXHWND) hWnd);
rc = wnd->OS2DefWindowProc(message, wParam, lParam ); rc = wnd->OS2DefWindowProc(hWnd, message, wParam, lParam );
wnd->SetHWND(0); wnd->SetHWND(0);
} }
else else
@@ -894,7 +905,7 @@ MRESULT wxWndProc(HWND hWnd, UINT message, MPARAM wParam, MPARAM lParam)
if ( wnd ) if ( wnd )
rc = wnd->OS2WindowProc(hWnd, message, wParam, lParam); rc = wnd->OS2WindowProc(hWnd, message, wParam, lParam);
else else
rc = DefWindowProc( hWnd, message, wParam, lParam ); rc = 0; //TODO: DefWindowProc( hWnd, message, wParam, lParam );
} }
return rc; return rc;
@@ -1249,11 +1260,11 @@ MRESULT wxWindow::OS2WindowProc(HWND hWnd, WXUINT message, WXWPARAM wParam, WXLP
rc.result = MSWDefWindowProc(message, wParam, lParam); rc.result = MSWDefWindowProc(message, wParam, lParam);
} }
*/ */
return rc.result; return (MRESULT)0;
} }
// Dialog window proc // Dialog window proc
MRESULT wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) MRESULT wxDlgProc(HWND hWnd, UINT message, MPARAM wParam, MPARAM lParam)
{ {
// TODO: // TODO:
/* /*
@@ -1273,7 +1284,6 @@ MRESULT wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
return (MRESULT)0; return (MRESULT)0;
} }
wxList *wxWinHandleList = NULL;
wxWindow *wxFindWinFromHandle(WXHWND hWnd) wxWindow *wxFindWinFromHandle(WXHWND hWnd)
{ {
wxNode *node = wxWinHandleList->Find((long)hWnd); wxNode *node = wxWinHandleList->Find((long)hWnd);
@@ -1551,7 +1561,7 @@ bool wxWindow::HandleDestroy()
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
if ( m_dropTarget != NULL ) if ( m_dropTarget != NULL )
{ {
m_dropTarget->Revoke(m_hWnd); // m_dropTarget->Revoke(m_hWnd);
delete m_dropTarget; delete m_dropTarget;
m_dropTarget = NULL; m_dropTarget = NULL;
@@ -1570,12 +1580,16 @@ bool wxWindow::HandleActivate(int state,
bool WXUNUSED(minimized), bool WXUNUSED(minimized),
WXHWND WXUNUSED(activate)) WXHWND WXUNUSED(activate))
{ {
// TODO:
/*
wxActivateEvent event(wxEVT_ACTIVATE, wxActivateEvent event(wxEVT_ACTIVATE,
(state == WA_ACTIVE) || (state == WA_CLICKACTIVE), (state == WA_ACTIVE) || (state == WA_CLICKACTIVE),
m_windowId); m_windowId);
event.SetEventObject(this); event.SetEventObject(this);
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
*/
return FALSE;
} }
bool wxWindow::HandleSetFocus(WXHWND WXUNUSED(hwnd)) bool wxWindow::HandleSetFocus(WXHWND WXUNUSED(hwnd))
@@ -1654,6 +1668,8 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd,
if ( GetHWND() == hWnd ) if ( GetHWND() == hWnd )
{ {
// don't set cursor when the mouse is not in the client part // don't set cursor when the mouse is not in the client part
// TODO
/*
if ( nHitTest == HTCLIENT || nHitTest == HTERROR ) if ( nHitTest == HTCLIENT || nHitTest == HTERROR )
{ {
HCURSOR hcursor = 0; HCURSOR hcursor = 0;
@@ -1692,6 +1708,7 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd,
return TRUE; return TRUE;
} }
} }
*/
} }
return FALSE; return FALSE;
@@ -1701,7 +1718,7 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd,
// owner drawn stuff // owner drawn stuff
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
bool wxWindow::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct) bool wxWindow::OS2OnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
{ {
// TODO: // TODO:
/* /*
@@ -1789,7 +1806,8 @@ bool wxWindow::HandleCtlColor(WXHBRUSH *brush,
WXLPARAM lParam) WXLPARAM lParam)
{ {
WXHBRUSH hBrush = 0; WXHBRUSH hBrush = 0;
// TODO:
/*
if ( nCtlColor == CTLCOLOR_DLG ) if ( nCtlColor == CTLCOLOR_DLG )
{ {
hBrush = OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam); hBrush = OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam);
@@ -1805,6 +1823,8 @@ bool wxWindow::HandleCtlColor(WXHBRUSH *brush,
*brush = hBrush; *brush = hBrush;
return hBrush != 0; return hBrush != 0;
*/
return FALSE;
} }
// Define for each class of dialog and control // Define for each class of dialog and control
@@ -1861,14 +1881,14 @@ void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
bool wxWindow::HandlePaint() bool wxWindow::HandlePaint()
{ {
// TODO: // TODO:
Return FALSE; return FALSE;
} }
bool wxWindow::HandleEraseBkgnd(WXHDC hdc) bool wxWindow::HandleEraseBkgnd(WXHDC hdc)
{ {
// Prevents flicker when dragging // Prevents flicker when dragging
if ( ::IsIconic(GetHwnd()) ) // if ( ::IsIconic(GetHwnd()) )
return TRUE; // return TRUE;
wxDC dc; wxDC dc;
@@ -1930,6 +1950,8 @@ bool wxWindow::HandleSize(int w, int h, WXUINT WXUNUSED(flag))
bool wxWindow::HandleGetMinMaxInfo(void *mmInfo) bool wxWindow::HandleGetMinMaxInfo(void *mmInfo)
{ {
// TODO:
/*
MINMAXINFO *info = (MINMAXINFO *)mmInfo; MINMAXINFO *info = (MINMAXINFO *)mmInfo;
bool rc = FALSE; bool rc = FALSE;
@@ -1959,6 +1981,8 @@ bool wxWindow::HandleGetMinMaxInfo(void *mmInfo)
} }
return rc; return rc;
*/
return FALSE;
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -1972,7 +1996,7 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
wxMenu *popupMenu = wxCurrentPopupMenu; wxMenu *popupMenu = wxCurrentPopupMenu;
wxCurrentPopupMenu = NULL; wxCurrentPopupMenu = NULL;
return popupMenu->MSWCommand(cmd, id); return popupMenu->OS2Command(cmd, id);
} }
wxWindow *win = FindItem(id); wxWindow *win = FindItem(id);
@@ -1982,7 +2006,7 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
} }
if ( win ) if ( win )
return win->MSWCommand(cmd, id); return win->OS2Command(cmd, id);
return FALSE; return FALSE;
} }
@@ -1999,6 +2023,8 @@ bool wxWindow::HandleSysCommand(WXWPARAM wParam, WXLPARAM lParam)
void wxWindow::InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags) void wxWindow::InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags)
{ {
// TODO:
/*
event.m_x = x; event.m_x = x;
event.m_y = y; event.m_y = y;
event.m_shiftDown = ((flags & MK_SHIFT) != 0); event.m_shiftDown = ((flags & MK_SHIFT) != 0);
@@ -2014,7 +2040,7 @@ void wxWindow::InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags)
m_lastMouseY = y; m_lastMouseY = y;
m_lastMouseEvent = event.GetEventType(); m_lastMouseEvent = event.GetEventType();
#endif // wxUSE_MOUSEEVENT_HACK #endif // wxUSE_MOUSEEVENT_HACK
*/
} }
bool wxWindow::HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags) bool wxWindow::HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags)
@@ -2119,7 +2145,7 @@ bool wxWindow::OS2OnScroll(int orientation, WXWORD wParam,
{ {
wxWindow *child = wxFindWinFromHandle(control); wxWindow *child = wxFindWinFromHandle(control);
if ( child ) if ( child )
return child->MSWOnScroll(orientation, wParam, pos, control); return child->OS2OnScroll(orientation, wParam, pos, control);
} }
wxScrollWinEvent event; wxScrollWinEvent event;
@@ -2311,8 +2337,8 @@ wxWindow *wxGetActiveWindow()
// Windows keyboard hook. Allows interception of e.g. F1, ESCAPE // Windows keyboard hook. Allows interception of e.g. F1, ESCAPE
// in active frames and dialogs, regardless of where the focus is. // in active frames and dialogs, regardless of where the focus is.
static HHOOK wxTheKeyboardHook = 0; //static HHOOK wxTheKeyboardHook = 0;
static FARPROC wxTheKeyboardHookProc = 0; //static FARPROC wxTheKeyboardHookProc = 0;
int wxKeyboardHook(int nCode, WORD wParam, DWORD lParam); int wxKeyboardHook(int nCode, WORD wParam, DWORD lParam);
void wxSetKeyboardHook(bool doIt) void wxSetKeyboardHook(bool doIt)
@@ -2749,3 +2775,5 @@ const char *wxGetMessageName(int message)
return NULL; return NULL;
} }
#endif // __WXDEBUG__