Warning suppressions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -298,7 +298,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +311,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,7 +376,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,7 +389,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!::WinRegisterClass( vHab
|
if (!::WinRegisterClass( vHab
|
||||||
@@ -401,7 +401,7 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHab);
|
vError = ::WinGetLastError(vHab);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
wxLogLastError(sError);
|
wxLogLastError(sError.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
@@ -412,8 +412,6 @@ bool wxBitmap::LoadFile(
|
|||||||
, long lType
|
, long lType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
HPS hPs = NULLHANDLE;
|
|
||||||
|
|
||||||
UnRef();
|
UnRef();
|
||||||
|
|
||||||
wxBitmapHandler* pHandler = wxDynamicCast( FindHandler(lType)
|
wxBitmapHandler* pHandler = wxDynamicCast( FindHandler(lType)
|
||||||
@@ -453,8 +451,7 @@ bool wxBitmap::Create(
|
|||||||
|
|
||||||
if (!pHandler)
|
if (!pHandler)
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for "
|
wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), lType);
|
||||||
"type %d defined."), lType);
|
|
||||||
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
@@ -859,7 +856,6 @@ wxImage wxBitmap::ConvertToImage() const
|
|||||||
BITMAPINFOHEADER2 vDIBh;
|
BITMAPINFOHEADER2 vDIBh;
|
||||||
BITMAPINFO2 vDIBInfo;
|
BITMAPINFO2 vDIBInfo;
|
||||||
HPS hPSMem;
|
HPS hPSMem;
|
||||||
HPS hPS;
|
|
||||||
HBITMAP hBitmap;
|
HBITMAP hBitmap;
|
||||||
HBITMAP hOldBitmap;
|
HBITMAP hOldBitmap;
|
||||||
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
||||||
@@ -1355,9 +1351,6 @@ bool wxMask::Create(
|
|||||||
HDC hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
|
HDC hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
|
||||||
HPS hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
|
HPS hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
|
||||||
HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
|
HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
|
||||||
POINTL vPoint[4] = { {0 ,0}, {rBitmap.GetWidth(), rBitmap.GetHeight()},
|
|
||||||
{0, 0}, {rBitmap.GetWidth(), rBitmap.GetHeight()}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (m_hMaskBitmap)
|
if (m_hMaskBitmap)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ wxSize wxButton::DoGetBestSize() const
|
|||||||
//
|
//
|
||||||
// Need a little extra to make it look right
|
// Need a little extra to make it look right
|
||||||
//
|
//
|
||||||
nHeightButton += nHeightChar/1.5;
|
nHeightButton += (int)(nHeightChar/1.5);
|
||||||
|
|
||||||
if (!HasFlag(wxBU_EXACTFIT))
|
if (!HasFlag(wxBU_EXACTFIT))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -226,9 +226,6 @@ void wxCheckListBoxItem::Check (
|
|||||||
m_nIndex = (size_t)nIndex;
|
m_nIndex = (size_t)nIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND hWndListbox = (HWND)m_pParent->GetHWND();
|
|
||||||
RECTL rUpdate;
|
|
||||||
MRESULT mRc;
|
|
||||||
|
|
||||||
wxCommandEvent vEvent( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
|
wxCommandEvent vEvent( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
|
||||||
,m_pParent->GetId()
|
,m_pParent->GetId()
|
||||||
@@ -445,7 +442,7 @@ void wxCheckListBox::OnChar (
|
|||||||
wxKeyEvent& rEvent
|
wxKeyEvent& rEvent
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (rEvent.KeyCode() == WXK_SPACE)
|
if (rEvent.GetKeyCode() == WXK_SPACE)
|
||||||
GetItem(GetSelection())->Toggle();
|
GetItem(GetSelection())->Toggle();
|
||||||
else
|
else
|
||||||
rEvent.Skip();
|
rEvent.Skip();
|
||||||
@@ -468,7 +465,7 @@ void wxCheckListBox::OnLeftClick (
|
|||||||
,&nParentHeight
|
,&nParentHeight
|
||||||
);
|
);
|
||||||
vDc.SetFont(GetFont());
|
vDc.SetFont(GetFont());
|
||||||
vHeight = vDc.GetCharHeight() * 2.5;
|
vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5);
|
||||||
|
|
||||||
//
|
//
|
||||||
// This, of course, will not work if the LB is scrolled
|
// This, of course, will not work if the LB is scrolled
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ int wxChoice::DoAppend(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
int nIndex;
|
int nIndex;
|
||||||
SHORT nIndexType = 0;
|
LONG nIndexType = 0;
|
||||||
|
|
||||||
if (m_windowStyle & wxLB_SORT)
|
if (m_windowStyle & wxLB_SORT)
|
||||||
nIndexType = LIT_SORTASCENDING;
|
nIndexType = LIT_SORTASCENDING;
|
||||||
@@ -140,7 +140,7 @@ int wxChoice::DoInsert(
|
|||||||
return DoAppend(rsItem);
|
return DoAppend(rsItem);
|
||||||
|
|
||||||
int nIndex;
|
int nIndex;
|
||||||
SHORT nIndexType = 0;
|
LONG nIndexType = 0;
|
||||||
|
|
||||||
if (m_windowStyle & wxLB_SORT)
|
if (m_windowStyle & wxLB_SORT)
|
||||||
nIndexType = LIT_SORTASCENDING;
|
nIndexType = LIT_SORTASCENDING;
|
||||||
@@ -227,7 +227,7 @@ void wxChoice::SetString(
|
|||||||
, const wxString& rsStr
|
, const wxString& rsStr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
SHORT nIndexType = 0;
|
LONG nIndexType = 0;
|
||||||
void* pData;
|
void* pData;
|
||||||
|
|
||||||
if ( m_clientDataItemsType != wxClientData_None )
|
if ( m_clientDataItemsType != wxClientData_None )
|
||||||
@@ -263,7 +263,7 @@ wxString wxChoice::GetString(
|
|||||||
int n
|
int n
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
size_t nLen = 0;
|
int nLen = 0;
|
||||||
wxString sStr = "";
|
wxString sStr = "";
|
||||||
char* zBuf;
|
char* zBuf;
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
#include "wx/dataobj.h"
|
#include "wx/dataobj.h"
|
||||||
|
|
||||||
static bool wxSetClipboardData(wxDataObject *data);
|
// static bool wxSetClipboardData(wxDataObject *data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -124,6 +124,7 @@ bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
static bool wxSetClipboardData(wxDataObject *data)
|
static bool wxSetClipboardData(wxDataObject *data)
|
||||||
{
|
{
|
||||||
@@ -157,6 +158,7 @@ static bool wxSetClipboardData(wxDataObject *data)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_DRAG_AND_DROP
|
#endif // wxUSE_DRAG_AND_DROP
|
||||||
|
#endif
|
||||||
|
|
||||||
bool wxSetClipboardData(wxDataFormat dataFormat,
|
bool wxSetClipboardData(wxDataFormat dataFormat,
|
||||||
const void *data,
|
const void *data,
|
||||||
@@ -281,7 +283,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
|
|||||||
|
|
||||||
void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
||||||
{
|
{
|
||||||
void *retval = NULL;
|
// void *retval = NULL;
|
||||||
// TODO:
|
// TODO:
|
||||||
/*
|
/*
|
||||||
switch ( dataFormat )
|
switch ( dataFormat )
|
||||||
|
|||||||
@@ -256,7 +256,6 @@ long wxComboBox::GetInsertionPoint() const
|
|||||||
|
|
||||||
long wxComboBox::GetLastPosition() const
|
long wxComboBox::GetLastPosition() const
|
||||||
{
|
{
|
||||||
HWND hEditWnd = GetHwnd();
|
|
||||||
long lLineLength = 0L;
|
long lLineLength = 0L;
|
||||||
WNDPARAMS vParams;
|
WNDPARAMS vParams;
|
||||||
|
|
||||||
@@ -288,8 +287,6 @@ void wxComboBox::Replace(
|
|||||||
{
|
{
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
HWND hWnd = GetHwnd();
|
HWND hWnd = GetHwnd();
|
||||||
long lFromChar = lFrom;
|
|
||||||
long lToChar = lTo;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set selection and remove it
|
// Set selection and remove it
|
||||||
@@ -320,8 +317,6 @@ void wxComboBox::Remove(
|
|||||||
{
|
{
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
HWND hWnd = GetHwnd();
|
HWND hWnd = GetHwnd();
|
||||||
long lFromChar = lFrom;
|
|
||||||
long lToChar = lTo;
|
|
||||||
|
|
||||||
::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), 0);
|
::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), 0);
|
||||||
::WinSendMsg(hWnd, EM_CUT, (MPARAM)0, (MPARAM)0);
|
::WinSendMsg(hWnd, EM_CUT, (MPARAM)0, (MPARAM)0);
|
||||||
@@ -334,8 +329,8 @@ void wxComboBox::SetSelection(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
HWND hWnd = GetHwnd();
|
HWND hWnd = GetHwnd();
|
||||||
long lFromChar = lFrom;
|
long lFromChar = 0;
|
||||||
long lToChar = lTo;
|
long lToChar = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If from and to are both -1, it means
|
// If from and to are both -1, it means
|
||||||
|
|||||||
@@ -41,10 +41,6 @@
|
|||||||
// functions
|
// functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
|
||||||
static const wxChar *GetTymedName(DWORD tymed);
|
|
||||||
#endif // Debug
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxDataFormat
|
// wxDataFormat
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -718,8 +718,6 @@ void wxDC::DoDrawArc(
|
|||||||
{
|
{
|
||||||
POINTL vPtlPos;
|
POINTL vPtlPos;
|
||||||
POINTL vPtlArc[2]; // Structure for current position
|
POINTL vPtlArc[2]; // Structure for current position
|
||||||
int nDx;
|
|
||||||
int nDy;
|
|
||||||
double dRadius;
|
double dRadius;
|
||||||
double dAngl1;
|
double dAngl1;
|
||||||
double dAngl2;
|
double dAngl2;
|
||||||
@@ -756,8 +754,8 @@ void wxDC::DoDrawArc(
|
|||||||
// Medium point
|
// Medium point
|
||||||
//
|
//
|
||||||
dAnglmid = (dAngl1 + dAngl2)/2. + M_PI;
|
dAnglmid = (dAngl1 + dAngl2)/2. + M_PI;
|
||||||
vXm = vXc + dRadius * cos(dAnglmid);
|
vXm = (wxCoord)(vXc + dRadius * cos(dAnglmid));
|
||||||
vYm = vYc + dRadius * sin(dAnglmid);
|
vYm = (wxCoord)(vYc + dRadius * sin(dAnglmid));
|
||||||
DoDrawArc( vX1, vY1
|
DoDrawArc( vX1, vY1
|
||||||
,vXm, vYm
|
,vXm, vYm
|
||||||
,vXc, vYc
|
,vXc, vYc
|
||||||
@@ -773,8 +771,8 @@ void wxDC::DoDrawArc(
|
|||||||
// Medium point
|
// Medium point
|
||||||
//
|
//
|
||||||
dAnglmid = (dAngl1 + dAngl2)/2.;
|
dAnglmid = (dAngl1 + dAngl2)/2.;
|
||||||
vXm = vXc + dRadius * cos(dAnglmid);
|
vXm = (wxCoord)(vXc + dRadius * cos(dAnglmid));
|
||||||
vYm = vYc + dRadius * sin(dAnglmid);
|
vYm = (wxCoord)(vYc + dRadius * sin(dAnglmid));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Ellipse main axis (r,q), (p,s) with center at (0,0) */
|
// Ellipse main axis (r,q), (p,s) with center at (0,0) */
|
||||||
@@ -793,11 +791,11 @@ void wxDC::DoDrawArc(
|
|||||||
vPtlArc[1].x = vX2;
|
vPtlArc[1].x = vX2;
|
||||||
vPtlArc[1].y = vY2;
|
vPtlArc[1].y = vY2;
|
||||||
::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
|
::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
|
||||||
CalcBoundingBox( (vXc - dRadius)
|
CalcBoundingBox( (wxCoord)(vXc - dRadius)
|
||||||
,(vYc - dRadius)
|
,(wxCoord)(vYc - dRadius)
|
||||||
);
|
);
|
||||||
CalcBoundingBox( (vXc + dRadius)
|
CalcBoundingBox( (wxCoord)(vXc + dRadius)
|
||||||
,(vYc + dRadius)
|
,(wxCoord)(vYc + dRadius)
|
||||||
);
|
);
|
||||||
} // end of wxDC::DoDrawArc
|
} // end of wxDC::DoDrawArc
|
||||||
|
|
||||||
@@ -1234,7 +1232,6 @@ void wxDC::DoDrawEllipticArc(
|
|||||||
FIXED vFSweepa; // Start angle, sweep angle
|
FIXED vFSweepa; // Start angle, sweep angle
|
||||||
double dIntPart;
|
double dIntPart;
|
||||||
double dFractPart;
|
double dFractPart;
|
||||||
double dRadius;
|
|
||||||
|
|
||||||
vY = OS2Y(vY,vHeight);
|
vY = OS2Y(vY,vHeight);
|
||||||
|
|
||||||
@@ -1251,8 +1248,8 @@ void wxDC::DoDrawEllipticArc(
|
|||||||
vArcp.lP = vWidth/2;
|
vArcp.lP = vWidth/2;
|
||||||
vArcp.lS = 0;
|
vArcp.lS = 0;
|
||||||
::GpiSetArcParams(m_hPS, &vArcp); // Sets parameters to default
|
::GpiSetArcParams(m_hPS, &vArcp); // Sets parameters to default
|
||||||
vPtlPos.x = vX + vWidth/2 * (1. + cos(DegToRad(dSa))); // Loads x-coordinate
|
vPtlPos.x = (wxCoord)(vX + vWidth/2 * (1. + cos(DegToRad(dSa)))); // Loads x-coordinate
|
||||||
vPtlPos.y = vY + vHeight/2 * (1. + sin(DegToRad(dSa))); // Loads y-coordinate
|
vPtlPos.y = (wxCoord)(vY + vHeight/2 * (1. + sin(DegToRad(dSa)))); // Loads y-coordinate
|
||||||
::GpiMove(m_hPS, &vPtlPos); // Sets current position
|
::GpiMove(m_hPS, &vPtlPos); // Sets current position
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1564,8 +1561,8 @@ void wxDC::DoDrawBitmap(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LONG lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
|
ULONG lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
|
||||||
LONG lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
|
ULONG lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
|
||||||
|
|
||||||
if (m_textForegroundColour.Ok())
|
if (m_textForegroundColour.Ok())
|
||||||
{
|
{
|
||||||
@@ -1637,10 +1634,6 @@ void wxDC::DoDrawBitmap(
|
|||||||
unsigned char cOldGreenFore = (unsigned char)(lOldForeGround >> 8);
|
unsigned char cOldGreenFore = (unsigned char)(lOldForeGround >> 8);
|
||||||
unsigned char cOldBlueFore = (unsigned char)lOldForeGround;
|
unsigned char cOldBlueFore = (unsigned char)lOldForeGround;
|
||||||
|
|
||||||
unsigned char cOldRedBack = (unsigned char)(lOldBackGround >> 16);
|
|
||||||
unsigned char cOldGreenBack = (unsigned char)(lOldBackGround >> 8);
|
|
||||||
unsigned char cOldBlueBack = (unsigned char)lOldBackGround;
|
|
||||||
|
|
||||||
unsigned char cRedFore = (unsigned char)(lForeGround >> 16);
|
unsigned char cRedFore = (unsigned char)(lForeGround >> 16);
|
||||||
unsigned char cGreenFore = (unsigned char)(lForeGround >> 8);
|
unsigned char cGreenFore = (unsigned char)(lForeGround >> 8);
|
||||||
unsigned char cBlueFore = (unsigned char)lForeGround;
|
unsigned char cBlueFore = (unsigned char)lForeGround;
|
||||||
@@ -1780,7 +1773,7 @@ void wxDC::DrawAnyText(
|
|||||||
if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
|
if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
|
||||||
vPtlStart.y = OS2Y(vY,vTextY);
|
vPtlStart.y = OS2Y(vY,vTextY);
|
||||||
else
|
else
|
||||||
vPtlStart.y = OS2Y(vY,vTextY/1.5); // Full extent is a bit much
|
vPtlStart.y = (wxCoord)(OS2Y(vY,vTextY/1.5)); // Full extent is a bit much
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1791,7 +1784,7 @@ void wxDC::DrawAnyText(
|
|||||||
if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
|
if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
|
||||||
vPtlStart.y = OS2Y(vY,vTextY);
|
vPtlStart.y = OS2Y(vY,vTextY);
|
||||||
else
|
else
|
||||||
vPtlStart.y = OS2Y(vY,vTextY/1.5);
|
vPtlStart.y = (LONG)(OS2Y(vY,vTextY/1.5));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vPtlStart.y = vY;
|
vPtlStart.y = vY;
|
||||||
@@ -2277,7 +2270,7 @@ void wxDC::DoGetTextExtent(
|
|||||||
vErrorCode = ::WinGetLastError(wxGetInstance());
|
vErrorCode = ::WinGetLastError(wxGetInstance());
|
||||||
sError = wxPMErrorToStr(vErrorCode);
|
sError = wxPMErrorToStr(vErrorCode);
|
||||||
// DEBUG
|
// DEBUG
|
||||||
sprintf(zMsg, "GpiQueryTextBox for %s: failed with Error: %x - %s", pStr, vErrorCode, sError.c_str());
|
sprintf(zMsg, "GpiQueryTextBox for %s: failed with Error: %lx - %s", pStr, vErrorCode, sError.c_str());
|
||||||
(void)wxMessageBox( "wxWindows Menu sample"
|
(void)wxMessageBox( "wxWindows Menu sample"
|
||||||
,zMsg
|
,zMsg
|
||||||
,wxICON_INFORMATION
|
,wxICON_INFORMATION
|
||||||
@@ -2873,8 +2866,8 @@ wxSize wxDC::GetPPI() const
|
|||||||
nPelHeight = lArray[CAPS_HEIGHT];
|
nPelHeight = lArray[CAPS_HEIGHT];
|
||||||
nHorzRes = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
|
nHorzRes = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
|
||||||
nVertRes = lArray[CAPS_VERTICAL_RESOLUTION]; // returns pel/meter
|
nVertRes = lArray[CAPS_VERTICAL_RESOLUTION]; // returns pel/meter
|
||||||
nWidth = (nHorzRes/39.3) * nPelWidth;
|
nWidth = (int)((nHorzRes/39.3) * nPelWidth);
|
||||||
nHeight = (nVertRes/39.3) * nPelHeight;
|
nHeight = (int)((nVertRes/39.3) * nPelHeight);
|
||||||
}
|
}
|
||||||
return (wxSize(nWidth,nHeight));
|
return (wxSize(nWidth,nHeight));
|
||||||
} // end of wxDC::GetPPI
|
} // end of wxDC::GetPPI
|
||||||
|
|||||||
@@ -153,9 +153,10 @@ void wxMemoryDC::SelectObject(
|
|||||||
//
|
//
|
||||||
// Bmps drawn to are upside down, so flip it before committing
|
// Bmps drawn to are upside down, so flip it before committing
|
||||||
//
|
//
|
||||||
POINTL vPoint[4] = { 0, m_vSelectedBitmap.GetHeight(),
|
POINTL vPoint[4] = { {0, m_vSelectedBitmap.GetHeight()}
|
||||||
m_vSelectedBitmap.GetWidth(), 0,
|
,{m_vSelectedBitmap.GetWidth(), 0}
|
||||||
0, 0, m_vSelectedBitmap.GetWidth(), m_vSelectedBitmap.GetHeight()
|
,{0, 0}
|
||||||
|
,{m_vSelectedBitmap.GetWidth(), m_vSelectedBitmap.GetHeight()}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ wxPrinterDC::wxPrinterDC(
|
|||||||
, int nOrientation
|
, int nOrientation
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
LONG lType = 0;
|
|
||||||
DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
|
DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
|
||||||
,(char*)rsDriverName.c_str()
|
,(char*)rsDriverName.c_str()
|
||||||
,NULL
|
,NULL
|
||||||
@@ -233,7 +232,7 @@ void wxPrinterDC::EndPage()
|
|||||||
// if (m_hDC)
|
// if (m_hDC)
|
||||||
// ::EndPage((HDC) m_hDC);
|
// ::EndPage((HDC) m_hDC);
|
||||||
} // end of wxPrinterDC::EndPage
|
} // end of wxPrinterDC::EndPage
|
||||||
|
#if 0
|
||||||
// Returns default device and port names
|
// Returns default device and port names
|
||||||
static bool wxGetDefaultDeviceName(
|
static bool wxGetDefaultDeviceName(
|
||||||
wxString& rsDeviceName
|
wxString& rsDeviceName
|
||||||
@@ -295,6 +294,7 @@ static bool wxGetDefaultDeviceName(
|
|||||||
*/
|
*/
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
} // end of wxGetDefaultDeviceName
|
} // end of wxGetDefaultDeviceName
|
||||||
|
#endif
|
||||||
|
|
||||||
// Gets an HDC for the specified printer configuration
|
// Gets an HDC for the specified printer configuration
|
||||||
WXHDC WXDLLEXPORT wxGetPrinterDC(
|
WXHDC WXDLLEXPORT wxGetPrinterDC(
|
||||||
@@ -356,8 +356,8 @@ void wxPrinterDC::DoDrawBitmap(
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
|
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
|
||||||
|
|
||||||
int nWidth = rBmp.GetWidth();
|
// int nWidth = rBmp.GetWidth();
|
||||||
int nHeight = rBmp.GetHeight();
|
// int nHeight = rBmp.GetHeight();
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
|
|
||||||
|
|||||||
@@ -98,14 +98,6 @@ bool wxDialog::Create(
|
|||||||
, const wxString& rsName
|
, const wxString& rsName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
long lX = rPos.x;
|
|
||||||
long lY = rPos.y;
|
|
||||||
long lWidth = rSize.x;
|
|
||||||
long lHeight = rSize.y;
|
|
||||||
const char* zDlg;
|
|
||||||
WXDWORD dwExtendedStyle = 0L;
|
|
||||||
HWND hWnd;
|
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
SetExtraStyle(GetExtraStyle() | wxTOPLEVEL_EX_DIALOG);
|
SetExtraStyle(GetExtraStyle() | wxTOPLEVEL_EX_DIALOG);
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
// Private functions
|
// Private functions
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#if 0
|
||||||
static wxDragResult ConvertDragEffectToResult (
|
static wxDragResult ConvertDragEffectToResult (
|
||||||
DWORD dwEffect
|
DWORD dwEffect
|
||||||
)
|
)
|
||||||
@@ -73,6 +74,7 @@ static DWORD ConvertDragResultToEffect (
|
|||||||
return DO_DEFAULT;
|
return DO_DEFAULT;
|
||||||
}
|
}
|
||||||
} // end of ConvertDragResultToEffect
|
} // end of ConvertDragResultToEffect
|
||||||
|
#endif
|
||||||
|
|
||||||
class CIDropTarget
|
class CIDropTarget
|
||||||
{
|
{
|
||||||
@@ -517,6 +519,11 @@ bool wxDropSource::GiveFeedback (
|
|||||||
case wxDragLink:
|
case wxDragLink:
|
||||||
m_pDragInfo->usOperation = DO_LINK;
|
m_pDragInfo->usOperation = DO_LINK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case wxDragNone:
|
||||||
|
case wxDragCancel:
|
||||||
|
case wxDragError:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ int wxFileDialog::ShowModal()
|
|||||||
m_fileNames.Empty();
|
m_fileNames.Empty();
|
||||||
if ((m_dialogStyle & wxMULTIPLE ) && vFileDlg.ulFQFCount > 1)
|
if ((m_dialogStyle & wxMULTIPLE ) && vFileDlg.ulFQFCount > 1)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < vFileDlg.ulFQFCount; i++)
|
for (int i = 0; i < (int)vFileDlg.ulFQFCount; i++)
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
@@ -263,7 +263,7 @@ int wxFileDialog::ShowModal()
|
|||||||
//
|
//
|
||||||
pzExtension = sFilterBuffer.c_str();
|
pzExtension = sFilterBuffer.c_str();
|
||||||
|
|
||||||
for( int i = 0; i < sFilterBuffer.length(); i++ )
|
for( int i = 0; i < (int)sFilterBuffer.length(); i++ )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Get extension
|
// Get extension
|
||||||
|
|||||||
@@ -376,8 +376,6 @@ bool wxFontRefData::Alloc(
|
|||||||
wxString sFaceName;
|
wxString sFaceName;
|
||||||
long flId = m_hFont;
|
long flId = m_hFont;
|
||||||
long lRc;
|
long lRc;
|
||||||
short nIndex = 0;
|
|
||||||
PFONTMETRICS pFM = NULL;
|
|
||||||
ERRORID vError;
|
ERRORID vError;
|
||||||
wxString sError;
|
wxString sError;
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ int wxFontDialog::ShowModal()
|
|||||||
FONTDLG vFontDlg;
|
FONTDLG vFontDlg;
|
||||||
char zCurrentFont[FACESIZE];
|
char zCurrentFont[FACESIZE];
|
||||||
HWND hWndFontDlg;
|
HWND hWndFontDlg;
|
||||||
FONTMETRICS vFm;
|
|
||||||
FACENAMEDESC vFn;
|
FACENAMEDESC vFn;
|
||||||
|
|
||||||
memset(&vFontDlg, '\0', sizeof(FONTDLG));
|
memset(&vFontDlg, '\0', sizeof(FONTDLG));
|
||||||
|
|||||||
@@ -392,7 +392,6 @@ void wxFillLogFont(
|
|||||||
// font, so now we need to generate an ID
|
// font, so now we need to generate an ID
|
||||||
//
|
//
|
||||||
long lNumLids = ::GpiQueryNumberSetIds(*phPS);
|
long lNumLids = ::GpiQueryNumberSetIds(*phPS);
|
||||||
long lGpiError;
|
|
||||||
|
|
||||||
if(lNumLids )
|
if(lNumLids )
|
||||||
{
|
{
|
||||||
@@ -465,17 +464,12 @@ void wxOS2SelectMatchingFontByName(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int nDiff0;
|
|
||||||
int nPointSize;
|
int nPointSize;
|
||||||
int nDiff;
|
|
||||||
int nIs;
|
int nIs;
|
||||||
int nMinDiff;
|
|
||||||
int nMinDiff0;
|
int nMinDiff0;
|
||||||
int nApirc;
|
|
||||||
int anDiff[16];
|
int anDiff[16];
|
||||||
int anMinDiff[16];
|
int anMinDiff[16];
|
||||||
int nIndex = 0;
|
int nIndex = 0;
|
||||||
STR8 zFn;
|
|
||||||
char zFontFaceName[FACESIZE];
|
char zFontFaceName[FACESIZE];
|
||||||
wxString sFaceName;
|
wxString sFaceName;
|
||||||
USHORT usWeightClass;
|
USHORT usWeightClass;
|
||||||
|
|||||||
@@ -180,8 +180,6 @@ void wxFrame::DoSetClientSize(
|
|||||||
, int nHeight
|
, int nHeight
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxStatusBar* pStatusBar = GetStatusBar();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Statusbars are not part of the OS/2 Client but parent frame
|
// Statusbars are not part of the OS/2 Client but parent frame
|
||||||
// so no statusbar consideration
|
// so no statusbar consideration
|
||||||
@@ -217,8 +215,6 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxStatusBar* pStatusBar = NULL;
|
wxStatusBar* pStatusBar = NULL;
|
||||||
SWP vSwp;
|
|
||||||
ERRORID vError;
|
|
||||||
wxString sError;
|
wxString sError;
|
||||||
|
|
||||||
pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber
|
pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber
|
||||||
@@ -281,7 +277,6 @@ void wxFrame::PositionStatusBar()
|
|||||||
int nY;
|
int nY;
|
||||||
int nStatbarWidth;
|
int nStatbarWidth;
|
||||||
int nStatbarHeight;
|
int nStatbarHeight;
|
||||||
HWND hWndClient;
|
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
RECTL vFRect;
|
RECTL vFRect;
|
||||||
|
|
||||||
@@ -355,17 +350,7 @@ void wxFrame::SetMenuBar(
|
|||||||
wxMenuBar* pMenuBar
|
wxMenuBar* pMenuBar
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ERRORID vError;
|
|
||||||
wxString sError;
|
wxString sError;
|
||||||
HWND hTitlebar = NULLHANDLE;
|
|
||||||
HWND hHScroll = NULLHANDLE;
|
|
||||||
HWND hVScroll = NULLHANDLE;
|
|
||||||
HWND hMenuBar = NULLHANDLE;
|
|
||||||
SWP vSwp;
|
|
||||||
SWP vSwpTitlebar;
|
|
||||||
SWP vSwpVScroll;
|
|
||||||
SWP vSwpHScroll;
|
|
||||||
SWP vSwpMenu;
|
|
||||||
|
|
||||||
if (!pMenuBar)
|
if (!pMenuBar)
|
||||||
{
|
{
|
||||||
@@ -738,10 +723,8 @@ void wxFrame::PositionToolBar()
|
|||||||
if (!pToolBar)
|
if (!pToolBar)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HWND hWndClient;
|
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
RECTL vFRect;
|
RECTL vFRect;
|
||||||
SWP vSwp;
|
|
||||||
wxPoint vPos;
|
wxPoint vPos;
|
||||||
|
|
||||||
::WinQueryWindowRect(m_hFrame, &vRect);
|
::WinQueryWindowRect(m_hFrame, &vRect);
|
||||||
@@ -899,7 +882,6 @@ bool wxFrame::HandlePaint()
|
|||||||
|
|
||||||
if (hIcon)
|
if (hIcon)
|
||||||
{
|
{
|
||||||
HWND hWndClient;
|
|
||||||
RECTL vRect3;
|
RECTL vRect3;
|
||||||
|
|
||||||
::WinQueryWindowRect(GetHwnd(), &vRect3);
|
::WinQueryWindowRect(GetHwnd(), &vRect3);
|
||||||
@@ -1227,7 +1209,6 @@ MRESULT EXPENTRY wxFrameWndProc(
|
|||||||
//
|
//
|
||||||
|
|
||||||
MRESULT rc = (MRESULT)0;
|
MRESULT rc = (MRESULT)0;
|
||||||
bool bProcessed = FALSE;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Stop right here if we don't have a valid handle in our wxWindow object.
|
// Stop right here if we don't have a valid handle in our wxWindow object.
|
||||||
@@ -1325,8 +1306,6 @@ MRESULT wxFrame::OS2WindowProc(
|
|||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
{
|
{
|
||||||
SHORT nScxold = SHORT1FROMMP(wParam); // Old horizontal size.
|
|
||||||
SHORT nScyold = SHORT2FROMMP(wParam); // Old vertical size.
|
|
||||||
SHORT nScxnew = SHORT1FROMMP(lParam); // New horizontal size.
|
SHORT nScxnew = SHORT1FROMMP(lParam); // New horizontal size.
|
||||||
SHORT nScynew = SHORT2FROMMP(lParam); // New vertical size.
|
SHORT nScynew = SHORT2FROMMP(lParam); // New vertical size.
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ MRESULT EXPENTRY wxGaugeWndProc(
|
|||||||
wxGauge* pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
|
wxGauge* pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
|
||||||
,QWL_USER
|
,QWL_USER
|
||||||
);
|
);
|
||||||
wxWindowOS2* pWindow = NULL;
|
|
||||||
MRESULT rc = (MRESULT)0;
|
|
||||||
bool bProcessed = FALSE;
|
|
||||||
HPS hPS;
|
HPS hPS;
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
RECTL vRect2;
|
RECTL vRect2;
|
||||||
|
|||||||
@@ -1654,7 +1654,7 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
|
|||||||
return GSOCK_INVPORT;
|
return GSOCK_INVPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
se = getservbyname(port, protocol);
|
se = getservbyname(port, (char*)protocol);
|
||||||
if (!se)
|
if (!se)
|
||||||
{
|
{
|
||||||
/* the cast to int suppresses compiler warnings about subscript having the
|
/* the cast to int suppresses compiler warnings about subscript having the
|
||||||
|
|||||||
@@ -281,31 +281,30 @@ int wxListBox::DoAppend(
|
|||||||
const wxString& rsItem
|
const wxString& rsItem
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int nIndex = 0;
|
long lIndex = 0;
|
||||||
SHORT nIndexType = 0;
|
LONG lIndexType = 0;
|
||||||
|
|
||||||
if (m_windowStyle & wxLB_SORT)
|
if (m_windowStyle & wxLB_SORT)
|
||||||
nIndexType = LIT_SORTASCENDING;
|
lIndexType = LIT_SORTASCENDING;
|
||||||
else
|
else
|
||||||
nIndexType = LIT_END;
|
lIndexType = LIT_END;
|
||||||
nIndex = (int)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)nIndexType, (MPARAM)rsItem.c_str());
|
lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)rsItem.c_str());
|
||||||
m_nNumItems++;
|
m_nNumItems++;
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
if (m_windowStyle & wxLB_OWNERDRAW)
|
if (m_windowStyle & wxLB_OWNERDRAW)
|
||||||
{
|
{
|
||||||
wxOwnerDrawn* pNewItem = CreateItem(nIndex); // dummy argument
|
wxOwnerDrawn* pNewItem = CreateItem(lIndex); // dummy argument
|
||||||
wxScreenDC vDc;
|
wxScreenDC vDc;
|
||||||
wxCoord vHeight;
|
|
||||||
|
|
||||||
|
|
||||||
pNewItem->SetName(rsItem);
|
pNewItem->SetName(rsItem);
|
||||||
m_aItems.Insert(pNewItem, nIndex);
|
m_aItems.Insert(pNewItem, lIndex);
|
||||||
::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)((SHORT)nIndex), MPFROMP(pNewItem));
|
::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)lIndex, MPFROMP(pNewItem));
|
||||||
pNewItem->SetFont(GetFont());
|
pNewItem->SetFont(GetFont());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return nIndex;
|
return (int)lIndex;
|
||||||
} // end of wxListBox::DoAppend
|
} // end of wxListBox::DoAppend
|
||||||
|
|
||||||
void wxListBox::DoSetItems(
|
void wxListBox::DoSetItems(
|
||||||
@@ -314,9 +313,8 @@ void wxListBox::DoSetItems(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
BOOL bHideAndShow = IsShown();
|
BOOL bHideAndShow = IsShown();
|
||||||
int nCount = 0;
|
|
||||||
int i;
|
int i;
|
||||||
SHORT nIndexType = 0;
|
LONG lIndexType = 0;
|
||||||
|
|
||||||
if (bHideAndShow)
|
if (bHideAndShow)
|
||||||
{
|
{
|
||||||
@@ -328,10 +326,10 @@ void wxListBox::DoSetItems(
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (m_windowStyle & wxLB_SORT)
|
if (m_windowStyle & wxLB_SORT)
|
||||||
nIndexType = LIT_SORTASCENDING;
|
lIndexType = LIT_SORTASCENDING;
|
||||||
else
|
else
|
||||||
nIndexType = LIT_END;
|
lIndexType = LIT_END;
|
||||||
::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)nIndexType, (MPARAM)raChoices[i].c_str());
|
::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)raChoices[i].c_str());
|
||||||
|
|
||||||
if (ppClientData)
|
if (ppClientData)
|
||||||
{
|
{
|
||||||
@@ -635,7 +633,7 @@ void wxListBox::DoInsertItems(
|
|||||||
m_aItems.Insert(pNewItem, nIndex);
|
m_aItems.Insert(pNewItem, nIndex);
|
||||||
::WinSendMsg( GetHwnd()
|
::WinSendMsg( GetHwnd()
|
||||||
,LM_SETITEMHANDLE
|
,LM_SETITEMHANDLE
|
||||||
,(MPARAM)((SHORT)nIndex)
|
,(MPARAM)((LONG)nIndex)
|
||||||
,MPFROMP(pNewItem)
|
,MPFROMP(pNewItem)
|
||||||
);
|
);
|
||||||
m_nNumItems += nItems;
|
m_nNumItems += nItems;
|
||||||
@@ -857,7 +855,7 @@ long wxListBox::OS2OnMeasure(
|
|||||||
pMeasureStruct->rclItem.yTop = 0;
|
pMeasureStruct->rclItem.yTop = 0;
|
||||||
pMeasureStruct->rclItem.yBottom = 0;
|
pMeasureStruct->rclItem.yBottom = 0;
|
||||||
|
|
||||||
vHeight = vDc.GetCharHeight() * 2.5;
|
vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5);
|
||||||
pMeasureStruct->rclItem.yTop = (USHORT)vHeight;
|
pMeasureStruct->rclItem.yTop = (USHORT)vHeight;
|
||||||
|
|
||||||
return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));
|
return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ void wxMenu::UpdateAccel(
|
|||||||
//
|
//
|
||||||
size_t n = FindAccel(pItem->GetId());
|
size_t n = FindAccel(pItem->GetId());
|
||||||
|
|
||||||
if (n == wxNOT_FOUND)
|
if (n == (size_t)wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// No old, add new if any
|
// No old, add new if any
|
||||||
@@ -247,7 +247,6 @@ bool wxMenu::DoInsertOrAppend(
|
|||||||
|
|
||||||
ERRORID vError;
|
ERRORID vError;
|
||||||
wxString sError;
|
wxString sError;
|
||||||
char zMsg[128];
|
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
UpdateAccel(pItem);
|
UpdateAccel(pItem);
|
||||||
@@ -331,7 +330,6 @@ bool wxMenu::DoInsertOrAppend(
|
|||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
if (pItem->IsOwnerDrawn())
|
if (pItem->IsOwnerDrawn())
|
||||||
{
|
{
|
||||||
BOOL rc;
|
|
||||||
MENUITEM vMenuItem;
|
MENUITEM vMenuItem;
|
||||||
|
|
||||||
::WinSendMsg( GetHmenu()
|
::WinSendMsg( GetHmenu()
|
||||||
@@ -343,7 +341,7 @@ bool wxMenu::DoInsertOrAppend(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (rc == MIT_MEMERROR || rc == MIT_ERROR)
|
if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR)
|
||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHabmain);
|
vError = ::WinGetLastError(vHabmain);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
@@ -601,7 +599,7 @@ bool wxMenu::OS2Command(
|
|||||||
SendEvent( vId
|
SendEvent( vId
|
||||||
,(int)::WinSendMsg( GetHmenu()
|
,(int)::WinSendMsg( GetHmenu()
|
||||||
,MM_QUERYITEMATTR
|
,MM_QUERYITEMATTR
|
||||||
,(MPARAM)vId
|
,MPFROMSHORT(vId)
|
||||||
,(MPARAM)MIA_CHECKED
|
,(MPARAM)MIA_CHECKED
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -730,7 +728,6 @@ void wxMenuBar::Refresh()
|
|||||||
|
|
||||||
WXHMENU wxMenuBar::Create()
|
WXHMENU wxMenuBar::Create()
|
||||||
{
|
{
|
||||||
MENUITEM vItem;
|
|
||||||
HWND hFrame;
|
HWND hFrame;
|
||||||
|
|
||||||
if (m_hMenu != 0 )
|
if (m_hMenu != 0 )
|
||||||
@@ -799,7 +796,7 @@ WXHMENU wxMenuBar::Create()
|
|||||||
m_menus[i]->m_vMenuData.iPosition = i;
|
m_menus[i]->m_vMenuData.iPosition = i;
|
||||||
|
|
||||||
rc = (APIRET)::WinSendMsg(m_hMenu, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str());
|
rc = (APIRET)::WinSendMsg(m_hMenu, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str());
|
||||||
if (rc == MIT_MEMERROR || rc == MIT_ERROR)
|
if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR)
|
||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHabmain);
|
vError = ::WinGetLastError(vHabmain);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
|
|||||||
@@ -189,9 +189,6 @@ WXDWORD wxNotebook::OS2GetStyle (
|
|||||||
|
|
||||||
size_t wxNotebook::GetPageCount() const
|
size_t wxNotebook::GetPageCount() const
|
||||||
{
|
{
|
||||||
int nPageInternal = m_pages.Count();
|
|
||||||
int nPageAPI = (int)::WinSendMsg(GetHWND(), BKM_QUERYPAGECOUNT, (MPARAM)0, (MPARAM)BKA_END);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Consistency check
|
// Consistency check
|
||||||
//
|
//
|
||||||
@@ -214,7 +211,7 @@ int wxNotebook::SetSelection(
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
|
||||||
|
|
||||||
if (nPage != m_nSelection)
|
if (nPage != (size_t)m_nSelection)
|
||||||
{
|
{
|
||||||
wxNotebookEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
|
wxNotebookEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
|
||||||
,m_windowId
|
,m_windowId
|
||||||
@@ -232,8 +229,6 @@ int wxNotebook::SetSelection(
|
|||||||
vEvent.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
|
vEvent.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
|
||||||
GetEventHandler()->ProcessEvent(vEvent);
|
GetEventHandler()->ProcessEvent(vEvent);
|
||||||
|
|
||||||
ULONG ulPageId = (ULONG)m_alPageId[nPage];
|
|
||||||
|
|
||||||
::WinSendMsg( GetHWND()
|
::WinSendMsg( GetHWND()
|
||||||
,BKM_TURNTOPAGE
|
,BKM_TURNTOPAGE
|
||||||
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
||||||
@@ -251,10 +246,6 @@ bool wxNotebook::SetPageText(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, wxT("notebook page out of range") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, wxT("notebook page out of range") );
|
||||||
|
|
||||||
|
|
||||||
ULONG ulPageId = (ULONG)m_alPageId[nPage];
|
|
||||||
|
|
||||||
return (bool)::WinSendMsg( m_hWnd
|
return (bool)::WinSendMsg( m_hWnd
|
||||||
,BKM_SETTABTEXT
|
,BKM_SETTABTEXT
|
||||||
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
||||||
@@ -273,9 +264,6 @@ wxString wxNotebook::GetPageText (
|
|||||||
|
|
||||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxT(""), wxT("notebook page out of range") );
|
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxT(""), wxT("notebook page out of range") );
|
||||||
|
|
||||||
|
|
||||||
ULONG ulPageId = (ULONG)m_alPageId[nPage];
|
|
||||||
|
|
||||||
memset(&vBookText, '\0', sizeof(BOOKTEXT));
|
memset(&vBookText, '\0', sizeof(BOOKTEXT));
|
||||||
vBookText.textLen = 0; // This will get the length
|
vBookText.textLen = 0; // This will get the length
|
||||||
ulRc = LONGFROMMR(::WinSendMsg( m_hWnd
|
ulRc = LONGFROMMR(::WinSendMsg( m_hWnd
|
||||||
@@ -283,9 +271,9 @@ wxString wxNotebook::GetPageText (
|
|||||||
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
||||||
,MPFROMP(&vBookText)
|
,MPFROMP(&vBookText)
|
||||||
));
|
));
|
||||||
if (ulRc == BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
|
if (ulRc == (ULONG)BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
|
||||||
{
|
{
|
||||||
if (ulRc == BOOKERR_INVALID_PARAMETERS)
|
if (ulRc == (ULONG)BOOKERR_INVALID_PARAMETERS)
|
||||||
{
|
{
|
||||||
wxLogError(wxT("Invalid Page Id for page text querry."));
|
wxLogError(wxT("Invalid Page Id for page text querry."));
|
||||||
}
|
}
|
||||||
@@ -302,7 +290,7 @@ wxString wxNotebook::GetPageText (
|
|||||||
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
||||||
,MPFROMP(&vBookText)
|
,MPFROMP(&vBookText)
|
||||||
));
|
));
|
||||||
if (ulRc == BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
|
if (ulRc == (ULONG)BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
|
||||||
{
|
{
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
@@ -333,9 +321,6 @@ bool wxNotebook::SetPageImage (
|
|||||||
{
|
{
|
||||||
wxBitmap* pBitmap = (wxBitmap*)m_imageList->GetBitmap(nImage);
|
wxBitmap* pBitmap = (wxBitmap*)m_imageList->GetBitmap(nImage);
|
||||||
|
|
||||||
|
|
||||||
ULONG ulPageId = (ULONG)m_alPageId[nPage];
|
|
||||||
|
|
||||||
return (bool)::WinSendMsg( GetHWND()
|
return (bool)::WinSendMsg( GetHWND()
|
||||||
,BKM_SETTABBITMAP
|
,BKM_SETTABBITMAP
|
||||||
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
||||||
@@ -415,9 +400,6 @@ wxNotebookPage* wxNotebook::DoRemovePage (
|
|||||||
if (!pPageRemoved)
|
if (!pPageRemoved)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
ULONG ulPageId = (ULONG)m_alPageId[nPage];
|
|
||||||
|
|
||||||
::WinSendMsg( GetHWND()
|
::WinSendMsg( GetHWND()
|
||||||
,BKM_DELETEPAGE
|
,BKM_DELETEPAGE
|
||||||
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
,MPFROMLONG((ULONG)m_alPageId[nPage])
|
||||||
@@ -437,14 +419,14 @@ wxNotebookPage* wxNotebook::DoRemovePage (
|
|||||||
//
|
//
|
||||||
int nSelNew;
|
int nSelNew;
|
||||||
|
|
||||||
if (m_nSelection == GetPageCount())
|
if (m_nSelection == (int)GetPageCount())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Last page deleted, make the new last page the new selection
|
// Last page deleted, make the new last page the new selection
|
||||||
//
|
//
|
||||||
nSelNew = m_nSelection - 1;
|
nSelNew = m_nSelection - 1;
|
||||||
}
|
}
|
||||||
else if (nPage <= m_nSelection)
|
else if (nPage <= (size_t)m_nSelection)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// We must show another page, even if it has the same index
|
// We must show another page, even if it has the same index
|
||||||
@@ -594,7 +576,7 @@ bool wxNotebook::InsertPage (
|
|||||||
// If the inserted page is before the selected one, we must update the
|
// If the inserted page is before the selected one, we must update the
|
||||||
// index of the selected page
|
// index of the selected page
|
||||||
//
|
//
|
||||||
if (nPage <= m_nSelection)
|
if (nPage <= (size_t)m_nSelection)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// One extra page added
|
// One extra page added
|
||||||
@@ -622,7 +604,7 @@ bool wxNotebook::InsertPage (
|
|||||||
|
|
||||||
vDC.GetTextExtent(rsStrText, &nTextX, &nTextY);
|
vDC.GetTextExtent(rsStrText, &nTextX, &nTextY);
|
||||||
nTextY *= 2;
|
nTextY *= 2;
|
||||||
nTextX *= 1.3;
|
nTextX = (wxCoord)(nTextX * 1.3);
|
||||||
if (nTextX > m_nTabSize)
|
if (nTextX > m_nTabSize)
|
||||||
{
|
{
|
||||||
m_nTabSize = nTextX;
|
m_nTabSize = nTextX;
|
||||||
@@ -730,7 +712,7 @@ void wxNotebook::OnSelChange (
|
|||||||
|
|
||||||
for (nSel = 0; nSel < nPageCount; nSel++)
|
for (nSel = 0; nSel < nPageCount; nSel++)
|
||||||
{
|
{
|
||||||
if (ulOS2Sel == m_alPageId[nSel])
|
if (ulOS2Sel == (ULONG)m_alPageId[nSel])
|
||||||
{
|
{
|
||||||
bFound = TRUE;
|
bFound = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -748,7 +730,7 @@ void wxNotebook::OnSelChange (
|
|||||||
|
|
||||||
for (nSel = 0; nSel < nPageCount; nSel++)
|
for (nSel = 0; nSel < nPageCount; nSel++)
|
||||||
{
|
{
|
||||||
if (ulOS2Sel == m_alPageId[nSel])
|
if (ulOS2Sel == (ULONG)m_alPageId[nSel])
|
||||||
{
|
{
|
||||||
bFound = TRUE;
|
bFound = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ bool wxOwnerDrawn::OnMeasureItem(
|
|||||||
// Add space at the end of the menu for the submenu expansion arrow
|
// Add space at the end of the menu for the submenu expansion arrow
|
||||||
// this will also allow offsetting the accel string from the right edge
|
// this will also allow offsetting the accel string from the right edge
|
||||||
//
|
//
|
||||||
*pWidth += GetDefaultMarginWidth() * 1.5;
|
*pWidth = (size_t)(*pWidth + GetDefaultMarginWidth() * 1.5);
|
||||||
|
|
||||||
//
|
//
|
||||||
// JACS: items still look too tightly packed, so adding 5 pixels.
|
// JACS: items still look too tightly packed, so adding 5 pixels.
|
||||||
@@ -303,7 +303,7 @@ bool wxOwnerDrawn::OnDrawItem(
|
|||||||
wxString sTgt = "\t";
|
wxString sTgt = "\t";
|
||||||
wxString sFullString = m_strName; // need to save the original text
|
wxString sFullString = m_strName; // need to save the original text
|
||||||
wxString sAccel;
|
wxString sAccel;
|
||||||
size_t nIndex;
|
int nIndex;
|
||||||
size_t nWidth;
|
size_t nWidth;
|
||||||
size_t nCharWidth;
|
size_t nCharWidth;
|
||||||
size_t nHeight;
|
size_t nHeight;
|
||||||
@@ -336,7 +336,7 @@ bool wxOwnerDrawn::OnDrawItem(
|
|||||||
,(long *)&nWidth
|
,(long *)&nWidth
|
||||||
,(long *)&nHeight
|
,(long *)&nHeight
|
||||||
);
|
);
|
||||||
sTmp = sFullString[nIndex + 1];
|
sTmp = sFullString[(size_t)(nIndex + 1)];
|
||||||
rDC.GetTextExtent( sTmp
|
rDC.GetTextExtent( sTmp
|
||||||
,(long *)&nCharWidth
|
,(long *)&nCharWidth
|
||||||
,(long *)&nHeight
|
,(long *)&nHeight
|
||||||
@@ -464,11 +464,6 @@ bool wxOwnerDrawn::OnDrawItem(
|
|||||||
|
|
||||||
if (eStatus & wxODSelected)
|
if (eStatus & wxODSelected)
|
||||||
{
|
{
|
||||||
RECT vRectBmp = { rRect.x
|
|
||||||
,rRect.y
|
|
||||||
,rRect.x + GetMarginWidth() - 1
|
|
||||||
,rRect.y + m_nHeight - 1
|
|
||||||
};
|
|
||||||
POINTL vPnt1 = {rRect.x + 1, rRect.y + 3}; // Leave a little background border
|
POINTL vPnt1 = {rRect.x + 1, rRect.y + 3}; // Leave a little background border
|
||||||
POINTL vPnt2 = {rRect.x + GetMarginWidth(), rRect.y + m_nHeight - 3};
|
POINTL vPnt2 = {rRect.x + GetMarginWidth(), rRect.y + m_nHeight - 3};
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ int wxPalette::GetPixel(
|
|||||||
//
|
//
|
||||||
// Now loop through and find the matching entry
|
// Now loop through and find the matching entry
|
||||||
//
|
//
|
||||||
int i;
|
ULONG i;
|
||||||
for (i = 0; i < ulNumEntries; i++)
|
for (i = 0; i < ulNumEntries; i++)
|
||||||
{
|
{
|
||||||
if (pualTable[i] == ulRGB)
|
if (pualTable[i] == ulRGB)
|
||||||
|
|||||||
@@ -107,8 +107,6 @@ void wxRadioBox::AdjustButtons(
|
|||||||
int nStartY;
|
int nStartY;
|
||||||
int nMaxWidth;
|
int nMaxWidth;
|
||||||
int nMaxHeight;
|
int nMaxHeight;
|
||||||
int nTotWidth;
|
|
||||||
int nTotHeight;
|
|
||||||
|
|
||||||
wxGetCharSize( m_hWnd
|
wxGetCharSize( m_hWnd
|
||||||
,&nCx1
|
,&nCx1
|
||||||
@@ -318,12 +316,6 @@ bool wxRadioBox::Create(
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
wxAssociateWinWithHandle(m_hWnd, this);
|
wxAssociateWinWithHandle(m_hWnd, this);
|
||||||
#if RADIOBTN_PARENT_IS_RADIOBOX
|
|
||||||
HWND hWndParent = GetHwnd();
|
|
||||||
#else
|
|
||||||
HWND hWndParent = GetHwndOf(pParent);
|
|
||||||
#endif
|
|
||||||
HFONT hFont;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Some radio boxes test consecutive id.
|
// Some radio boxes test consecutive id.
|
||||||
@@ -1041,8 +1033,6 @@ bool wxRadioBox::SetFont(
|
|||||||
//
|
//
|
||||||
// Also set the font of our radio buttons
|
// Also set the font of our radio buttons
|
||||||
//
|
//
|
||||||
WXHFONT hFont = wxFont(rFont).GetResourceHandle();
|
|
||||||
|
|
||||||
for (int n = 0; n < (int)m_nNoItems; n++)
|
for (int n = 0; n < (int)m_nNoItems; n++)
|
||||||
{
|
{
|
||||||
HWND hWndBtn = (HWND)m_ahRadioButtons[n];
|
HWND hWndBtn = (HWND)m_ahRadioButtons[n];
|
||||||
@@ -1099,8 +1089,6 @@ bool wxRadioBox::Show(
|
|||||||
bool bShow
|
bool bShow
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int nCmdShow = 0;
|
|
||||||
|
|
||||||
if (!wxControl::Show(bShow))
|
if (!wxControl::Show(bShow))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -1127,8 +1115,6 @@ void wxRadioBox::SubclassRadioButton(
|
|||||||
WXHWND hWndBtn
|
WXHWND hWndBtn
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
HWND hwndBtn = (HWND)hWndBtn;
|
|
||||||
|
|
||||||
fnWndProcRadioBtn = (WXFARPROC)::WinSubclassWindow(hWndBtn, (PFNWP)wxRadioBtnWndProc);
|
fnWndProcRadioBtn = (WXFARPROC)::WinSubclassWindow(hWndBtn, (PFNWP)wxRadioBtnWndProc);
|
||||||
} // end of wxRadioBox::SubclassRadioButton
|
} // end of wxRadioBox::SubclassRadioButton
|
||||||
|
|
||||||
|
|||||||
@@ -439,7 +439,6 @@ wxRegionContain wxRegion::Contains(
|
|||||||
, wxCoord y
|
, wxCoord y
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
bool bOK = FALSE;
|
|
||||||
POINTL vPoint;
|
POINTL vPoint;
|
||||||
|
|
||||||
vPoint.x = x;
|
vPoint.x = x;
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ void wxSlider::AdjustSubControls(
|
|||||||
, int nSizeFlags
|
, int nSizeFlags
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
SWP vSwp;
|
|
||||||
int nXOffset = nX;
|
int nXOffset = nX;
|
||||||
int nYOffset = nY;
|
int nYOffset = nY;
|
||||||
int nCx; // slider,min,max sizes
|
int nCx; // slider,min,max sizes
|
||||||
@@ -552,7 +551,7 @@ void wxSlider::DoSetSize(
|
|||||||
::WinSetWindowPos( (HWND)m_hStaticValue
|
::WinSetWindowPos( (HWND)m_hStaticValue
|
||||||
,HWND_TOP
|
,HWND_TOP
|
||||||
,(LONG)nXOffset
|
,(LONG)nXOffset
|
||||||
,(LONG)nYOffset - (nCyf * 1.2)
|
,(LONG)nYOffset - (LONG)(nCyf * 1.2)
|
||||||
,(LONG)nNewWidth
|
,(LONG)nNewWidth
|
||||||
,(LONG)nValueHeight
|
,(LONG)nValueHeight
|
||||||
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
|
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
|
||||||
@@ -562,7 +561,7 @@ void wxSlider::DoSetSize(
|
|||||||
::WinSetWindowPos( (HWND)m_hStaticMin
|
::WinSetWindowPos( (HWND)m_hStaticMin
|
||||||
,HWND_TOP
|
,HWND_TOP
|
||||||
,(LONG)nXOffset
|
,(LONG)nXOffset
|
||||||
,(LONG)nYOffset - (nCyf * 1.2)
|
,(LONG)nYOffset - (LONG)(nCyf * 1.2)
|
||||||
,(LONG)nMinLen
|
,(LONG)nMinLen
|
||||||
,(LONG)nCy
|
,(LONG)nCy
|
||||||
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
|
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
|
||||||
@@ -602,7 +601,7 @@ void wxSlider::DoSetSize(
|
|||||||
::WinSetWindowPos( (HWND)m_hStaticMax
|
::WinSetWindowPos( (HWND)m_hStaticMax
|
||||||
,HWND_TOP
|
,HWND_TOP
|
||||||
,(LONG)nXOffset
|
,(LONG)nXOffset
|
||||||
,(LONG)nYOffset - (nCyf * 1.2)
|
,(LONG)nYOffset - (LONG)(nCyf * 1.2)
|
||||||
,(LONG)nMaxLen
|
,(LONG)nMaxLen
|
||||||
,(LONG)nCy
|
,(LONG)nCy
|
||||||
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
|
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
|
||||||
@@ -961,7 +960,7 @@ bool wxSlider::OS2OnScroll(
|
|||||||
,(MPARAM)0
|
,(MPARAM)0
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
nNewPos = (nPixelPos/m_dPixelToRange);
|
nNewPos = (int)(nPixelPos/m_dPixelToRange);
|
||||||
if (nNewPos > (m_nRangeMax - m_nRangeMin)/2)
|
if (nNewPos > (m_nRangeMax - m_nRangeMin)/2)
|
||||||
nNewPos++;
|
nNewPos++;
|
||||||
if ((nNewPos < GetMin()) || (nNewPos > GetMax()))
|
if ((nNewPos < GetMin()) || (nNewPos > GetMax()))
|
||||||
@@ -1080,7 +1079,7 @@ void wxSlider::SetTick(
|
|||||||
int nTickPos
|
int nTickPos
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nTickPos *= m_dPixelToRange;
|
nTickPos = (int)(nTickPos * m_dPixelToRange);
|
||||||
::WinSendMsg( GetHwnd()
|
::WinSendMsg( GetHwnd()
|
||||||
,SLM_ADDDETENT
|
,SLM_ADDDETENT
|
||||||
,MPFROMSHORT(nTickPos)
|
,MPFROMSHORT(nTickPos)
|
||||||
@@ -1118,7 +1117,7 @@ void wxSlider::SetTickFreq(
|
|||||||
::WinSendMsg(GetHwnd(), WM_SETWINDOWPARAMS, (MPARAM)&vWndParams, (MPARAM)0);
|
::WinSendMsg(GetHwnd(), WM_SETWINDOWPARAMS, (MPARAM)&vWndParams, (MPARAM)0);
|
||||||
for (i = 1; i < (m_nRangeMax - m_nRangeMin)/n; i++)
|
for (i = 1; i < (m_nRangeMax - m_nRangeMin)/n; i++)
|
||||||
{
|
{
|
||||||
nPixelPos = i * n * m_dPixelToRange;
|
nPixelPos = (int)(i * n * m_dPixelToRange);
|
||||||
::WinSendMsg( GetHwnd()
|
::WinSendMsg( GetHwnd()
|
||||||
,SLM_ADDDETENT
|
,SLM_ADDDETENT
|
||||||
,MPFROMSHORT(nPixelPos)
|
,MPFROMSHORT(nPixelPos)
|
||||||
@@ -1131,14 +1130,6 @@ void wxSlider::SetValue(
|
|||||||
int nValue
|
int nValue
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int nPixelPos = SHORT1FROMMR(::WinSendMsg( GetHwnd()
|
|
||||||
,SLM_QUERYSLIDERINFO
|
|
||||||
,MPFROM2SHORT( SMA_SLIDERARMPOSITION
|
|
||||||
,SMA_RANGEVALUE
|
|
||||||
)
|
|
||||||
,(MPARAM)0
|
|
||||||
)
|
|
||||||
);
|
|
||||||
int nPixelRange = SHORT1FROMMR(::WinSendMsg( GetHwnd()
|
int nPixelRange = SHORT1FROMMR(::WinSendMsg( GetHwnd()
|
||||||
,SLM_QUERYSLIDERINFO
|
,SLM_QUERYSLIDERINFO
|
||||||
,MPFROM2SHORT( SMA_SHAFTDIMENSIONS
|
,MPFROM2SHORT( SMA_SHAFTDIMENSIONS
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ wxSize wxSpinButton::DoGetBestSize() const
|
|||||||
|
|
||||||
int wxSpinButton::GetValue() const
|
int wxSpinButton::GetValue() const
|
||||||
{
|
{
|
||||||
int nVal = 0;
|
|
||||||
long lVal = 0L;
|
long lVal = 0L;
|
||||||
char zVal[10];
|
char zVal[10];
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,7 @@ MRESULT EXPENTRY wxSpinCtrlWndProc(
|
|||||||
wxSpinCtrl* pSpin = (wxSpinCtrl *)::WinQueryWindowULong( hWnd
|
wxSpinCtrl* pSpin = (wxSpinCtrl *)::WinQueryWindowULong( hWnd
|
||||||
,QWL_USER
|
,QWL_USER
|
||||||
);
|
);
|
||||||
bool bProccesed = FALSE;
|
|
||||||
MRESULT rc = (MRESULT)0;
|
|
||||||
//
|
//
|
||||||
// Forward some messages (the key ones only so far) to the spin ctrl
|
// Forward some messages (the key ones only so far) to the spin ctrl
|
||||||
//
|
//
|
||||||
@@ -347,7 +346,7 @@ void wxSpinCtrl::OnChar (
|
|||||||
wxKeyEvent& rEvent
|
wxKeyEvent& rEvent
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
switch (rEvent.KeyCode())
|
switch (rEvent.GetKeyCode())
|
||||||
{
|
{
|
||||||
case WXK_RETURN:
|
case WXK_RETURN:
|
||||||
{
|
{
|
||||||
@@ -474,7 +473,6 @@ bool wxSpinCtrl::SetFont(
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHANDLE hFont = GetFont().GetResourceHandle();
|
|
||||||
wxOS2SetFont( m_hWnd
|
wxOS2SetFont( m_hWnd
|
||||||
,rFont
|
,rFont
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -97,8 +97,6 @@ bool wxStaticBitmap::Create(
|
|||||||
|
|
||||||
int nX= rPos.x;
|
int nX= rPos.x;
|
||||||
int nY = rPos.y;
|
int nY = rPos.y;
|
||||||
int nWidth = rSize.x;
|
|
||||||
int nHeight = rSize.y;
|
|
||||||
char zId[16];
|
char zId[16];
|
||||||
|
|
||||||
m_windowStyle = lStyle;
|
m_windowStyle = lStyle;
|
||||||
@@ -164,7 +162,6 @@ void wxStaticBitmap::OnPaint (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxPaintDC vDc(this);
|
wxPaintDC vDc(this);
|
||||||
int i;
|
|
||||||
wxBitmap* pBitmap;
|
wxBitmap* pBitmap;
|
||||||
|
|
||||||
if (m_pImage->IsKindOf(CLASSINFO(wxIcon)))
|
if (m_pImage->IsKindOf(CLASSINFO(wxIcon)))
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
|
|||||||
|
|
||||||
SetParent(parent);
|
SetParent(parent);
|
||||||
|
|
||||||
DWORD msflags = 0;
|
|
||||||
|
|
||||||
if (width <= 0)
|
if (width <= 0)
|
||||||
width = 100;
|
width = 100;
|
||||||
if (height <= 0)
|
if (height <= 0)
|
||||||
@@ -72,8 +70,6 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
|
|||||||
|
|
||||||
m_windowId = (id < 0 ? NewControlId() : id);
|
m_windowId = (id < 0 ? NewControlId() : id);
|
||||||
|
|
||||||
long tabStyle = 0;
|
|
||||||
|
|
||||||
// Create the toolbar control.
|
// Create the toolbar control.
|
||||||
HWND hWndTabCtrl = 0;
|
HWND hWndTabCtrl = 0;
|
||||||
// TODO: create tab control
|
// TODO: create tab control
|
||||||
|
|||||||
@@ -101,9 +101,6 @@ bool wxTextCtrl::Create(
|
|||||||
, const wxString& rsName
|
, const wxString& rsName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
HWND hParent;
|
|
||||||
int nTempy;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Base initialization
|
// Base initialization
|
||||||
//
|
//
|
||||||
@@ -607,8 +604,6 @@ void wxTextCtrl::Replace(
|
|||||||
{
|
{
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
HWND hWnd = GetHwnd();
|
HWND hWnd = GetHwnd();
|
||||||
long lFromChar = lFrom;
|
|
||||||
long lToChar = lTo;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set selection and remove it
|
// Set selection and remove it
|
||||||
@@ -645,8 +640,6 @@ void wxTextCtrl::Remove(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
HWND hWnd = GetHwnd();
|
HWND hWnd = GetHwnd();
|
||||||
long lFromChar = lFrom;
|
|
||||||
long lToChar = lTo;
|
|
||||||
|
|
||||||
if (m_bIsMLE)
|
if (m_bIsMLE)
|
||||||
{
|
{
|
||||||
@@ -749,7 +742,6 @@ long wxTextCtrl::XYToPosition(
|
|||||||
, long lY
|
, long lY
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
HWND hWnd = GetHwnd();
|
|
||||||
long lCharIndex = 0L;
|
long lCharIndex = 0L;
|
||||||
long lLen;
|
long lLen;
|
||||||
|
|
||||||
@@ -1012,7 +1004,6 @@ WXHBRUSH wxTextCtrl::OnCtlColor(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
HPS hPS = (HPS)hWxDC;
|
HPS hPS = (HPS)hWxDC;
|
||||||
wxBrush* pBrush = NULL;
|
|
||||||
wxColour vColBack = GetBackgroundColour();
|
wxColour vColBack = GetBackgroundColour();
|
||||||
wxColour vColFore = GetForegroundColour();
|
wxColour vColFore = GetForegroundColour();
|
||||||
wxBrush* pBackgroundBrush = wxTheBrushList->FindOrCreateBrush( GetBackgroundColour()
|
wxBrush* pBackgroundBrush = wxTheBrushList->FindOrCreateBrush( GetBackgroundColour()
|
||||||
@@ -1047,7 +1038,7 @@ void wxTextCtrl::OnChar(
|
|||||||
wxKeyEvent& rEvent
|
wxKeyEvent& rEvent
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
switch (rEvent.KeyCode())
|
switch (rEvent.GetKeyCode())
|
||||||
{
|
{
|
||||||
case WXK_RETURN:
|
case WXK_RETURN:
|
||||||
if ( !(m_windowStyle & wxTE_MULTILINE) )
|
if ( !(m_windowStyle & wxTE_MULTILINE) )
|
||||||
@@ -1202,7 +1193,7 @@ wxSize wxTextCtrl::DoGetBestSize() const
|
|||||||
wxGetCharSize(GetHWND(), &nCx, &nCy, (wxFont*)&GetFont());
|
wxGetCharSize(GetHWND(), &nCx, &nCy, (wxFont*)&GetFont());
|
||||||
|
|
||||||
int wText = DEFAULT_ITEM_WIDTH;
|
int wText = DEFAULT_ITEM_WIDTH;
|
||||||
int hText = (EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);
|
int hText = (int)(EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);
|
||||||
|
|
||||||
if (m_windowStyle & wxTE_MULTILINE)
|
if (m_windowStyle & wxTE_MULTILINE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ ULONG wxTimerProc(
|
|||||||
|
|
||||||
wxCHECK_MSG(pNode, 0, wxT("bogus timer id in wxTimerProc") );
|
wxCHECK_MSG(pNode, 0, wxT("bogus timer id in wxTimerProc") );
|
||||||
if (pNode)
|
if (pNode)
|
||||||
wxProcessTimer(*(wxTimer *)pNode->Data());
|
wxProcessTimer(*(wxTimer *)pNode->GetData());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -379,7 +379,6 @@ bool wxToolBar::Create(
|
|||||||
int nY = rPos.y;
|
int nY = rPos.y;
|
||||||
int nWidth = rSize.x;
|
int nWidth = rSize.x;
|
||||||
int nHeight = rSize.y;
|
int nHeight = rSize.y;
|
||||||
wxFrame* pFrame = wxDynamicCast(GetParent(), wxFrame);
|
|
||||||
|
|
||||||
if (lStyle & wxTB_HORIZONTAL)
|
if (lStyle & wxTB_HORIZONTAL)
|
||||||
{
|
{
|
||||||
@@ -435,8 +434,6 @@ bool wxToolBar::Realize()
|
|||||||
{
|
{
|
||||||
int nMaxToolWidth = 0;
|
int nMaxToolWidth = 0;
|
||||||
int nMaxToolHeight = 0;
|
int nMaxToolHeight = 0;
|
||||||
int nX;
|
|
||||||
int nY;
|
|
||||||
|
|
||||||
m_nCurrentRowsOrColumns = 0;
|
m_nCurrentRowsOrColumns = 0;
|
||||||
m_vLastX = m_xMargin;
|
m_vLastX = m_xMargin;
|
||||||
@@ -847,7 +844,6 @@ void wxToolBar::DrawTool(
|
|||||||
wxBitmap vBitmap = pTool->GetNormalBitmap();
|
wxBitmap vBitmap = pTool->GetNormalBitmap();
|
||||||
bool bUseMask = FALSE;
|
bool bUseMask = FALSE;
|
||||||
wxMask* pMask = NULL;
|
wxMask* pMask = NULL;
|
||||||
RECTL vRect;
|
|
||||||
|
|
||||||
PrepareDC(rDc);
|
PrepareDC(rDc);
|
||||||
|
|
||||||
@@ -974,8 +970,6 @@ wxToolBarToolBase* wxToolBar::FindToolForPosition(
|
|||||||
, wxCoord vY
|
, wxCoord vY
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
wxCoord vTextX = 0;
|
|
||||||
wxCoord vTextY = 0;
|
|
||||||
wxCoord vTBarHeight = 0;
|
wxCoord vTBarHeight = 0;
|
||||||
|
|
||||||
GetSize( NULL
|
GetSize( NULL
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ END_EVENT_TABLE()
|
|||||||
// Dialog window proc
|
// Dialog window proc
|
||||||
MRESULT EXPENTRY wxDlgProc( HWND WXUNUSED(hWnd)
|
MRESULT EXPENTRY wxDlgProc( HWND WXUNUSED(hWnd)
|
||||||
,UINT uMessage
|
,UINT uMessage
|
||||||
,MPARAM WXUNUSED(wParam)
|
,void * WXUNUSED(wParam)
|
||||||
,MPARAM WXUNUSED(lParam)
|
,void * WXUNUSED(lParam)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
switch(uMessage)
|
switch(uMessage)
|
||||||
@@ -167,7 +167,7 @@ void wxTopLevelWindowOS2::OnActivate(
|
|||||||
//
|
//
|
||||||
// Restore focus to the child which was last focused
|
// Restore focus to the child which was last focused
|
||||||
//
|
//
|
||||||
wxLogTrace(_T("focus"), _T("wxTLW %08x activated."), m_hWnd);
|
wxLogTrace(_T("focus"), _T("wxTLW %08lx activated."), m_hWnd);
|
||||||
|
|
||||||
wxWindow* pParent = m_pWinLastFocused ? m_pWinLastFocused->GetParent()
|
wxWindow* pParent = m_pWinLastFocused ? m_pWinLastFocused->GetParent()
|
||||||
: NULL;
|
: NULL;
|
||||||
@@ -206,7 +206,7 @@ void wxTopLevelWindowOS2::OnActivate(
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxLogTrace(_T("focus"),
|
wxLogTrace(_T("focus"),
|
||||||
_T("wxTLW %08x deactivated, last focused: %08x."),
|
_T("wxTLW %08lx deactivated, last focused: %08lx."),
|
||||||
m_hWnd,
|
m_hWnd,
|
||||||
m_pWinLastFocused ? GetHwndOf(m_pWinLastFocused)
|
m_pWinLastFocused ? GetHwndOf(m_pWinLastFocused)
|
||||||
: NULL);
|
: NULL);
|
||||||
@@ -366,7 +366,7 @@ bool wxTopLevelWindowOS2::CreateDialog(
|
|||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Did you forget to include wx/os2/wx.rc in your resources?"));
|
wxFAIL_MSG(wxT("Did you forget to include wx/os2/wx.rc in your resources?"));
|
||||||
|
|
||||||
wxLogSysError(wxT("Can't create dialog using template '%ul'"), ulDlgTemplate);
|
wxLogSysError(wxT("Can't create dialog using template '%ld'"), ulDlgTemplate);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -730,7 +730,6 @@ bool wxTopLevelWindowOS2::Show(
|
|||||||
{
|
{
|
||||||
int nShowCmd;
|
int nShowCmd;
|
||||||
SWP vSwp;
|
SWP vSwp;
|
||||||
RECTL vRect;
|
|
||||||
|
|
||||||
if (bShow != IsShown() )
|
if (bShow != IsShown() )
|
||||||
{
|
{
|
||||||
@@ -820,7 +819,6 @@ void wxTopLevelWindowOS2::Maximize(
|
|||||||
|
|
||||||
bool wxTopLevelWindowOS2::IsMaximized() const
|
bool wxTopLevelWindowOS2::IsMaximized() const
|
||||||
{
|
{
|
||||||
bool bIconic;
|
|
||||||
|
|
||||||
::WinQueryWindowPos(m_hFrame, (PSWP)&m_vSwp);
|
::WinQueryWindowPos(m_hFrame, (PSWP)&m_vSwp);
|
||||||
return (m_vSwp.fl & SWP_MAXIMIZE);
|
return (m_vSwp.fl & SWP_MAXIMIZE);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ bool wxGetHostName(
|
|||||||
|
|
||||||
if ((zSysname = wxGetenv(_T("SYSTEM_NAME"))) == NULL)
|
if ((zSysname = wxGetenv(_T("SYSTEM_NAME"))) == NULL)
|
||||||
{
|
{
|
||||||
ULONG n = ::PrfQueryProfileString( HINI_PROFILE
|
::PrfQueryProfileString( HINI_PROFILE
|
||||||
,(PSZ)WX_SECTION
|
,(PSZ)WX_SECTION
|
||||||
,(PSZ)eHOSTNAME
|
,(PSZ)eHOSTNAME
|
||||||
,(PSZ)zDefaultHost
|
,(PSZ)zDefaultHost
|
||||||
|
|||||||
@@ -148,9 +148,7 @@ long wxExecute(
|
|||||||
ULONG ulExecFlag;
|
ULONG ulExecFlag;
|
||||||
PSZ zArgs = NULL;
|
PSZ zArgs = NULL;
|
||||||
PSZ zEnvs = NULL;
|
PSZ zEnvs = NULL;
|
||||||
ULONG ulWindowId;
|
|
||||||
APIRET rc;
|
APIRET rc;
|
||||||
PFNWP pOldProc;
|
|
||||||
TID vTID;
|
TID vTID;
|
||||||
|
|
||||||
if (flags & wxEXEC_SYNC)
|
if (flags & wxEXEC_SYNC)
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static wxTimer* wxTheSleepTimer = NULL;
|
|
||||||
|
|
||||||
// Reading and writing resources (eg WIN.INI, .Xdefaults)
|
// Reading and writing resources (eg WIN.INI, .Xdefaults)
|
||||||
#if wxUSE_RESOURCES
|
#if wxUSE_RESOURCES
|
||||||
bool wxWriteResource(
|
bool wxWriteResource(
|
||||||
@@ -335,7 +333,6 @@ bool wxCheckForInterrupt(
|
|||||||
QMSG vMsg;
|
QMSG vMsg;
|
||||||
HAB hab = 0;
|
HAB hab = 0;
|
||||||
HWND hwndFilter = NULLHANDLE;
|
HWND hwndFilter = NULLHANDLE;
|
||||||
HWND hwndWin= (HWND) pWnd->GetHWND();
|
|
||||||
|
|
||||||
while(::WinPeekMsg(hab, &vMsg, hwndFilter, 0, 0, PM_REMOVE))
|
while(::WinPeekMsg(hab, &vMsg, hwndFilter, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -409,8 +409,6 @@ bool wxWindowOS2::Create(
|
|||||||
|
|
||||||
if (pParent)
|
if (pParent)
|
||||||
{
|
{
|
||||||
int nTempy;
|
|
||||||
|
|
||||||
pParent->AddChild(this);
|
pParent->AddChild(this);
|
||||||
hParent = GetWinHwnd(pParent);
|
hParent = GetWinHwnd(pParent);
|
||||||
|
|
||||||
@@ -749,7 +747,6 @@ void wxWindowOS2::SetScrollbar(
|
|||||||
ULONG ulStyle = WS_VISIBLE | WS_SYNCPAINT;
|
ULONG ulStyle = WS_VISIBLE | WS_SYNCPAINT;
|
||||||
SWP vSwp;
|
SWP vSwp;
|
||||||
SWP vSwpOwner;
|
SWP vSwpOwner;
|
||||||
RECTL vRect;
|
|
||||||
HWND hWndParent;
|
HWND hWndParent;
|
||||||
HWND hWndClient;
|
HWND hWndClient;
|
||||||
wxWindow* pParent = GetParent();
|
wxWindow* pParent = GetParent();
|
||||||
@@ -941,9 +938,6 @@ void wxWindowOS2::ScrollWindow(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
RECTL vRectHorz;
|
|
||||||
RECTL vRectVert;
|
|
||||||
RECTL vRectChild;
|
|
||||||
|
|
||||||
if (pRect)
|
if (pRect)
|
||||||
{
|
{
|
||||||
@@ -1477,7 +1471,6 @@ void wxWindowOS2::DoMoveWindow(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
HWND hParent;
|
|
||||||
wxWindow* pParent = GetParent();
|
wxWindow* pParent = GetParent();
|
||||||
|
|
||||||
if (pParent && !IsKindOf(CLASSINFO(wxDialog)))
|
if (pParent && !IsKindOf(CLASSINFO(wxDialog)))
|
||||||
@@ -1513,7 +1506,6 @@ void wxWindowOS2::DoMoveWindow(
|
|||||||
int nHeightFrameDelta = 0;
|
int nHeightFrameDelta = 0;
|
||||||
int nHeightFrame = 0;
|
int nHeightFrame = 0;
|
||||||
int nWidthFrame = 0;
|
int nWidthFrame = 0;
|
||||||
ULONG ulFLag = SWP_MOVE;
|
|
||||||
wxFrame* pFrame;
|
wxFrame* pFrame;
|
||||||
|
|
||||||
pFrame = wxDynamicCast(this, wxFrame);
|
pFrame = wxDynamicCast(this, wxFrame);
|
||||||
@@ -1668,7 +1660,6 @@ void wxWindowOS2::DoSetSize(
|
|||||||
// Must convert Y coords to test for equality under OS/2
|
// Must convert Y coords to test for equality under OS/2
|
||||||
//
|
//
|
||||||
int nY2 = nY;
|
int nY2 = nY;
|
||||||
wxWindow* pParent = (wxWindow*)GetParent();
|
|
||||||
|
|
||||||
if (nX == nCurrentX && nY2 == nCurrentY &&
|
if (nX == nCurrentX && nY2 == nCurrentY &&
|
||||||
nWidth == nCurrentWidth && nHeight == nCurrentHeight)
|
nWidth == nCurrentWidth && nHeight == nCurrentHeight)
|
||||||
@@ -1845,7 +1836,6 @@ void wxWindowOS2::GetTextExtent(
|
|||||||
FONTMETRICS vFM; // metrics structure
|
FONTMETRICS vFM; // metrics structure
|
||||||
BOOL bRc = FALSE;
|
BOOL bRc = FALSE;
|
||||||
char* pStr;
|
char* pStr;
|
||||||
ERRORID vErrorCode; // last error id code
|
|
||||||
HPS hPS;
|
HPS hPS;
|
||||||
|
|
||||||
|
|
||||||
@@ -1951,28 +1941,6 @@ bool wxWindowOS2::IsMouseInWindow() const
|
|||||||
// popup menu
|
// popup menu
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
#if wxUSE_MENUS_NATIVE
|
|
||||||
static void wxYieldForCommandsOnly()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Peek all WM_COMMANDs (it will always return WM_QUIT too but we don't
|
|
||||||
// want to process it here)
|
|
||||||
//
|
|
||||||
QMSG vMsg;
|
|
||||||
|
|
||||||
while (::WinPeekMsg(vHabmain, &vMsg, (HWND)0, WM_COMMAND, WM_COMMAND, PM_REMOVE)
|
|
||||||
&& vMsg.msg != WM_QUIT)
|
|
||||||
{
|
|
||||||
// luckily (as we don't have access to wxEventLoopImpl method from here
|
|
||||||
// anyhow...) we don't need to pre process WM_COMMANDs so dispatch it
|
|
||||||
// immediately
|
|
||||||
::WinDispatchMsg(vHabmain, &vMsg);
|
|
||||||
}
|
|
||||||
if (vMsg.msg == WM_QUIT)
|
|
||||||
::WinPostMsg(NULL, WM_QUIT, 0, 0);
|
|
||||||
}
|
|
||||||
#endif // wxUSE_MENUS_NATIVE
|
|
||||||
|
|
||||||
#if wxUSE_MENUS_NATIVE
|
#if wxUSE_MENUS_NATIVE
|
||||||
bool wxWindowOS2::DoPopupMenu(
|
bool wxWindowOS2::DoPopupMenu(
|
||||||
wxMenu* pMenu
|
wxMenu* pMenu
|
||||||
@@ -2005,7 +1973,6 @@ bool wxWindowOS2::DoPopupMenu(
|
|||||||
while(bIsWaiting)
|
while(bIsWaiting)
|
||||||
{
|
{
|
||||||
QMSG vMsg;
|
QMSG vMsg;
|
||||||
BOOL bRc = ::WinGetMsg(vHabmain, &vMsg, HWND(NULL), 0, 0);
|
|
||||||
|
|
||||||
if (vMsg.msg == WM_MENUEND || vMsg.msg == WM_COMMAND)
|
if (vMsg.msg == WM_MENUEND || vMsg.msg == WM_COMMAND)
|
||||||
{
|
{
|
||||||
@@ -2321,14 +2288,6 @@ MRESULT EXPENTRY wxWndProc(
|
|||||||
, MPARAM lParam
|
, MPARAM lParam
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// Trace all ulMsgs - useful for the debugging
|
|
||||||
//
|
|
||||||
#ifdef __WXDEBUG__
|
|
||||||
wxLogTrace(wxTraceMessages, wxT("Processing %s(wParam=%8lx, lParam=%8lx)"),
|
|
||||||
wxGetMessageName(ulMsg), wParam, lParam);
|
|
||||||
#endif // __WXDEBUG__
|
|
||||||
|
|
||||||
wxWindowOS2* pWnd = wxFindWinFromHandle((WXHWND)hWnd);
|
wxWindowOS2* pWnd = wxFindWinFromHandle((WXHWND)hWnd);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -3009,36 +2968,6 @@ MRESULT wxWindowOS2::OS2WindowProc(
|
|||||||
return mResult;
|
return mResult;
|
||||||
} // end of wxWindowOS2::OS2WindowProc
|
} // end of wxWindowOS2::OS2WindowProc
|
||||||
|
|
||||||
#ifndef __EMX__
|
|
||||||
// clashes with wxDlgProc in toplevel.cpp?
|
|
||||||
//
|
|
||||||
// Dialog window proc
|
|
||||||
//
|
|
||||||
MRESULT wxDlgProc(
|
|
||||||
HWND WXUNUSED(hWnd)
|
|
||||||
, UINT uMsg
|
|
||||||
, MPARAM WXUNUSED(wParam)
|
|
||||||
, MPARAM WXUNUSED(lParam))
|
|
||||||
{
|
|
||||||
if (uMsg == WM_INITDLG)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// For this message, returning TRUE tells system to set focus to the
|
|
||||||
// first control in the dialog box
|
|
||||||
//
|
|
||||||
return (MRESULT)TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// For all the other ones, FALSE means that we didn't process the
|
|
||||||
// message
|
|
||||||
//
|
|
||||||
return (MRESULT)0;
|
|
||||||
}
|
|
||||||
} // end of wxDlgProc
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxWindow* wxFindWinFromHandle(
|
wxWindow* wxFindWinFromHandle(
|
||||||
WXHWND hWnd
|
WXHWND hWnd
|
||||||
)
|
)
|
||||||
@@ -3047,7 +2976,7 @@ wxWindow* wxFindWinFromHandle(
|
|||||||
|
|
||||||
if (!pNode)
|
if (!pNode)
|
||||||
return NULL;
|
return NULL;
|
||||||
return (wxWindow *)pNode->Data();
|
return (wxWindow *)pNode->GetData();
|
||||||
} // end of wxFindWinFromHandle
|
} // end of wxFindWinFromHandle
|
||||||
|
|
||||||
void wxAssociateWinWithHandle(
|
void wxAssociateWinWithHandle(
|
||||||
@@ -3154,9 +3083,6 @@ bool wxWindowOS2::OS2Create(
|
|||||||
int nY = 0L;
|
int nY = 0L;
|
||||||
int nWidth = 0L;
|
int nWidth = 0L;
|
||||||
int nHeight = 0L;
|
int nHeight = 0L;
|
||||||
wxWindow* pParent = GetParent();
|
|
||||||
HWND hWnd = NULLHANDLE;
|
|
||||||
HWND hParent;
|
|
||||||
long lControlId = 0L;
|
long lControlId = 0L;
|
||||||
wxWindowCreationHook vHook(this);
|
wxWindowCreationHook vHook(this);
|
||||||
wxString sClassName((wxChar*)zClass);
|
wxString sClassName((wxChar*)zClass);
|
||||||
@@ -3696,14 +3622,14 @@ void wxWindowOS2::OnSysColourChanged(
|
|||||||
wxSysColourChangedEvent& rEvent
|
wxSysColourChangedEvent& rEvent
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxNode* pNode = GetChildren().First();
|
wxWindowListNode* pNode = GetChildren().GetFirst();
|
||||||
|
|
||||||
while (pNode)
|
while (pNode)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Only propagate to non-top-level windows
|
// Only propagate to non-top-level windows
|
||||||
//
|
//
|
||||||
wxWindow* pWin = (wxWindow *)pNode->Data();
|
wxWindow* pWin = (wxWindow *)pNode->GetData();
|
||||||
|
|
||||||
if (pWin->GetParent())
|
if (pWin->GetParent())
|
||||||
{
|
{
|
||||||
@@ -3712,7 +3638,7 @@ void wxWindowOS2::OnSysColourChanged(
|
|||||||
rEvent.m_eventObject = pWin;
|
rEvent.m_eventObject = pWin;
|
||||||
pWin->GetEventHandler()->ProcessEvent(vEvent);
|
pWin->GetEventHandler()->ProcessEvent(vEvent);
|
||||||
}
|
}
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
} // end of wxWindowOS2::OnSysColourChanged
|
} // end of wxWindowOS2::OnSysColourChanged
|
||||||
|
|
||||||
@@ -3740,7 +3666,6 @@ bool wxWindowOS2::HandlePaint()
|
|||||||
HRGN hRgn;
|
HRGN hRgn;
|
||||||
wxPaintEvent vEvent(m_windowId);
|
wxPaintEvent vEvent(m_windowId);
|
||||||
HPS hPS;
|
HPS hPS;
|
||||||
RECTL vRect;
|
|
||||||
bool bProcessed;
|
bool bProcessed;
|
||||||
|
|
||||||
// Create empty region
|
// Create empty region
|
||||||
@@ -3772,8 +3697,6 @@ bool wxWindowOS2::HandlePaint()
|
|||||||
//
|
//
|
||||||
HPS hPS;
|
HPS hPS;
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
wxFrame* pFrame;
|
|
||||||
wxWindow* pParent;
|
|
||||||
|
|
||||||
hPS = ::WinBeginPaint( GetHwnd()
|
hPS = ::WinBeginPaint( GetHwnd()
|
||||||
,NULLHANDLE
|
,NULLHANDLE
|
||||||
@@ -3833,8 +3756,6 @@ bool wxWindowOS2::HandlePaint()
|
|||||||
//
|
//
|
||||||
HPS hPS;
|
HPS hPS;
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
wxFrame* pFrame;
|
|
||||||
wxWindow* pParent;
|
|
||||||
|
|
||||||
hPS = ::WinBeginPaint( GetHwnd()
|
hPS = ::WinBeginPaint( GetHwnd()
|
||||||
,NULLHANDLE
|
,NULLHANDLE
|
||||||
@@ -3954,7 +3875,6 @@ bool wxWindowOS2::HandleGetMinMaxInfo(
|
|||||||
PSWP pSwp
|
PSWP pSwp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
bool bRc = FALSE;
|
|
||||||
POINTL vPoint;
|
POINTL vPoint;
|
||||||
|
|
||||||
switch(pSwp->fl)
|
switch(pSwp->fl)
|
||||||
@@ -4104,7 +4024,6 @@ bool wxWindowOS2::HandleMouseEvent(
|
|||||||
bProcessed = GetEventHandler()->ProcessEvent(vEvent);
|
bProcessed = GetEventHandler()->ProcessEvent(vEvent);
|
||||||
if (!bProcessed)
|
if (!bProcessed)
|
||||||
{
|
{
|
||||||
HPOINTER hPtr = ::WinQuerySysPointer(HWND_DESKTOP, SPTR_WAIT, FALSE);
|
|
||||||
HPOINTER hCursor = (HPOINTER)GetCursor().GetHCURSOR();
|
HPOINTER hCursor = (HPOINTER)GetCursor().GetHCURSOR();
|
||||||
|
|
||||||
if (hCursor != NULLHANDLE)
|
if (hCursor != NULLHANDLE)
|
||||||
@@ -4501,8 +4420,6 @@ int wxWindowOS2::GetOS2ParentHeight(
|
|||||||
wxWindowOS2* pParent
|
wxWindowOS2* pParent
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxWindowOS2* pGrandParent = NULL;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Case 1
|
// Case 1
|
||||||
//
|
//
|
||||||
@@ -5298,7 +5215,6 @@ wxWindowOS2* FindWindowForMouseEvent(
|
|||||||
POINTL vPoint;
|
POINTL vPoint;
|
||||||
BOOL rcEnabled = FALSE;
|
BOOL rcEnabled = FALSE;
|
||||||
BOOL rcVisible = FALSE;
|
BOOL rcVisible = FALSE;
|
||||||
HWND hWndDesktop = HWND_DESKTOP;
|
|
||||||
|
|
||||||
::WinQueryPointerPos(HWND_DESKTOP, &vPoint);
|
::WinQueryPointerPos(HWND_DESKTOP, &vPoint);
|
||||||
hWndUnderMouse = ::WinWindowFromPoint(HWND_DESKTOP, &vPoint, TRUE);
|
hWndUnderMouse = ::WinWindowFromPoint(HWND_DESKTOP, &vPoint, TRUE);
|
||||||
@@ -5309,7 +5225,6 @@ wxWindowOS2* FindWindowForMouseEvent(
|
|||||||
if (pWinUnderMouse)
|
if (pWinUnderMouse)
|
||||||
{
|
{
|
||||||
wxWindowList::Node* pCurrent = pWinUnderMouse->GetChildren().GetFirst();
|
wxWindowList::Node* pCurrent = pWinUnderMouse->GetChildren().GetFirst();
|
||||||
wxWindow* pChild = NULL;
|
|
||||||
wxWindow* pGrandChild = NULL;
|
wxWindow* pGrandChild = NULL;
|
||||||
RECTL vRect;
|
RECTL vRect;
|
||||||
POINTL vPoint2;
|
POINTL vPoint2;
|
||||||
|
|||||||
Reference in New Issue
Block a user