More OS/2 changes and fixes. Getting there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-09-20 17:19:25 +00:00
parent 22aed133d8
commit 86de7616de
7 changed files with 185 additions and 73 deletions

View File

@@ -63,10 +63,10 @@ typedef MRESULT (APIENTRY * WndProcCast) (HWND, ULONG, MPARAM, MPARAM);
#define IBS_HORZCAPTION 0x4000L
#define IBS_VERTCAPTION 0x8000L
UINT WINAPI ibGetCaptionSize( HWND hWnd ) ;
UINT WINAPI ibSetCaptionSize( HWND hWnd, UINT nSize ) ;
LRESULT WINAPI ibDefWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) ;
VOID WINAPI ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
UINT APIENTRY ibGetCaptionSize( HWND hWnd ) ;
UINT APIENTRY ibSetCaptionSize( HWND hWnd, UINT nSize ) ;
MRESULT APIENTRY ibDefWindowProc( HWND hWnd, ULONG ulMsg, MPARAM wParam, MPARAM lParam ) ;
VOID APIENTRY ibAdjustWindowRect( HWND hWnd, LPRECT lprc ) ;
#endif // wxUSE_ITSY_BITSY
/*
@@ -76,10 +76,10 @@ typedef MRESULT (APIENTRY * WndProcCast) (HWND, ULONG, MPARAM, MPARAM);
#define STATIC_CLASS _T("STATIC")
#define STATIC_FLAGS (SS_TEXT|DT_LEFT|SS_LEFT|WS_VISIBLE)
#define CHECK_CLASS "BUTTON"
#define CHECK_CLASS _T("BUTTON")
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP)
#define CHECK_IS_FAFA FALSE
#define RADIO_CLASS "BUTTON"
#define RADIO_CLASS _T("BUTTON" )
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_VISIBLE)
#define RADIO_SIZE 20
#define RADIO_IS_FAFA FALSE
@@ -107,8 +107,7 @@ typedef MRESULT (APIENTRY * WndProcCast) (HWND, ULONG, MPARAM, MPARAM);
// Generic subclass proc, for panel item moving/sizing and intercept
// EDIT control VK_RETURN messages
extern LONG APIENTRY _EXPORT
wxSubclassedGenericControlProc(WXHWND hWnd, WXDWORD message, WXWPARAM wParam, WXLPARAM lParam);
extern LONG APIENTRY wxSubclassedGenericControlProc(WXHWND hWnd, WXDWORD message, WXWPARAM wParam, WXLPARAM lParam);
// ---------------------------------------------------------------------------
// constants which might miss from some compilers' headers
@@ -155,7 +154,7 @@ extern LONG APIENTRY _EXPORT
// ---------------------------------------------------------------------------
// The MakeProcInstance version of the function wxSubclassedGenericControlProc
WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc;
WXDLLEXPORT_DATA(extern) wxGenericControlSubClassProc;
WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance;

View File

@@ -146,7 +146,6 @@ public:
// same as DoSetSize() for the client size
virtual void DoSetClientSize(int width, int height);
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
virtual WXWidget GetHandle() const;
// ---------------------------------------------------------------------------
// wxWindowBase virtual implementations that need to be overriden
@@ -225,6 +224,11 @@ public:
void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent& event);
// Accessors
WXHWND GetHWND() const { return m_hWnd; }
void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; }
virtual WXWidget GetHandle() const { return GetHWND(); }
public:
// ---------------------------------------------------------------------------
@@ -239,14 +243,25 @@ public:
// a toolbar that it manages itself).
virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags);
// Windows subclassing
void SubclassWin(WXHWND hWnd);
void UnsubclassWin();
WXFARPROC OS2GetOldWndProc() const { return m_oldWndProc; }
void OS2SetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; }
wxWindow *FindItem(long id) const;
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const;
// Determine whether 3D effects are wanted
WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D) const;
// PM only: TRUE if this control is part of the main control
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
// Executes the default message
virtual long Default();
/* TODO: you may need something like this
// Determine whether 3D effects are wanted
virtual WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D);
*/
// Constraint implementation
void UnsetConstraints(wxLayoutConstraints *c);
// Back-pointer to other windows we're involved with, so if we delete
@@ -268,6 +283,7 @@ protected:
wxButton * m_defaultItem;
public:
WXFARPROC m_oldWndProc;
int m_returnCode;
bool m_isBeingDeleted;
bool m_isShown;
@@ -287,8 +303,6 @@ DECLARE_EVENT_TABLE()
private:
void Init();
void PMDetachWindowMenu();
WXHWND GetHwnd() const { return m_hWnd; }
void SetHwnd(WXHWND hWnd) { m_hWnd = hWnd; }
};
////////////////////////////////////////////////////////////////////////