Warning suppressions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2004-03-01 06:24:20 +00:00
parent 52d9d823a1
commit 9923c37dcc
40 changed files with 118 additions and 344 deletions

View File

@@ -298,7 +298,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
@@ -311,7 +311,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
@@ -324,7 +324,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
@@ -337,7 +337,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
@@ -350,7 +350,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
@@ -363,7 +363,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
@@ -376,7 +376,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
@@ -389,7 +389,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
if (!::WinRegisterClass( vHab
@@ -401,7 +401,7 @@ bool wxApp::RegisterWindowClasses(
{
vError = ::WinGetLastError(vHab);
sError = wxPMErrorToStr(vError);
wxLogLastError(sError);
wxLogLastError(sError.c_str());
return FALSE;
}
return TRUE;

View File

@@ -412,8 +412,6 @@ bool wxBitmap::LoadFile(
, long lType
)
{
HPS hPs = NULLHANDLE;
UnRef();
wxBitmapHandler* pHandler = wxDynamicCast( FindHandler(lType)
@@ -453,8 +451,7 @@ bool wxBitmap::Create(
if (!pHandler)
{
wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for "
"type %d defined."), lType);
wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), lType);
return(FALSE);
}
@@ -859,7 +856,6 @@ wxImage wxBitmap::ConvertToImage() const
BITMAPINFOHEADER2 vDIBh;
BITMAPINFO2 vDIBInfo;
HPS hPSMem;
HPS hPS;
HBITMAP hBitmap;
HBITMAP hOldBitmap;
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);
HPS hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &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)
{

View File

@@ -162,7 +162,7 @@ wxSize wxButton::DoGetBestSize() const
//
// Need a little extra to make it look right
//
nHeightButton += nHeightChar/1.5;
nHeightButton += (int)(nHeightChar/1.5);
if (!HasFlag(wxBU_EXACTFIT))
{

View File

@@ -226,9 +226,6 @@ void wxCheckListBoxItem::Check (
m_nIndex = (size_t)nIndex;
}
HWND hWndListbox = (HWND)m_pParent->GetHWND();
RECTL rUpdate;
MRESULT mRc;
wxCommandEvent vEvent( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
,m_pParent->GetId()
@@ -445,7 +442,7 @@ void wxCheckListBox::OnChar (
wxKeyEvent& rEvent
)
{
if (rEvent.KeyCode() == WXK_SPACE)
if (rEvent.GetKeyCode() == WXK_SPACE)
GetItem(GetSelection())->Toggle();
else
rEvent.Skip();
@@ -468,7 +465,7 @@ void wxCheckListBox::OnLeftClick (
,&nParentHeight
);
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

View File

@@ -114,7 +114,7 @@ int wxChoice::DoAppend(
)
{
int nIndex;
SHORT nIndexType = 0;
LONG nIndexType = 0;
if (m_windowStyle & wxLB_SORT)
nIndexType = LIT_SORTASCENDING;
@@ -140,7 +140,7 @@ int wxChoice::DoInsert(
return DoAppend(rsItem);
int nIndex;
SHORT nIndexType = 0;
LONG nIndexType = 0;
if (m_windowStyle & wxLB_SORT)
nIndexType = LIT_SORTASCENDING;
@@ -227,7 +227,7 @@ void wxChoice::SetString(
, const wxString& rsStr
)
{
SHORT nIndexType = 0;
LONG nIndexType = 0;
void* pData;
if ( m_clientDataItemsType != wxClientData_None )
@@ -263,7 +263,7 @@ wxString wxChoice::GetString(
int n
) const
{
size_t nLen = 0;
int nLen = 0;
wxString sStr = "";
char* zBuf;

View File

@@ -44,7 +44,7 @@
#if wxUSE_DRAG_AND_DROP
#include "wx/dataobj.h"
static bool wxSetClipboardData(wxDataObject *data);
// static bool wxSetClipboardData(wxDataObject *data);
#endif
// ===========================================================================
@@ -124,6 +124,7 @@ bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
return FALSE;
}
#if 0
#if wxUSE_DRAG_AND_DROP
static bool wxSetClipboardData(wxDataObject *data)
{
@@ -157,6 +158,7 @@ static bool wxSetClipboardData(wxDataObject *data)
return TRUE;
}
#endif // wxUSE_DRAG_AND_DROP
#endif
bool wxSetClipboardData(wxDataFormat dataFormat,
const void *data,
@@ -281,7 +283,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
{
void *retval = NULL;
// void *retval = NULL;
// TODO:
/*
switch ( dataFormat )

View File

@@ -256,7 +256,6 @@ long wxComboBox::GetInsertionPoint() const
long wxComboBox::GetLastPosition() const
{
HWND hEditWnd = GetHwnd();
long lLineLength = 0L;
WNDPARAMS vParams;
@@ -288,8 +287,6 @@ void wxComboBox::Replace(
{
#if wxUSE_CLIPBOARD
HWND hWnd = GetHwnd();
long lFromChar = lFrom;
long lToChar = lTo;
//
// Set selection and remove it
@@ -320,8 +317,6 @@ void wxComboBox::Remove(
{
#if wxUSE_CLIPBOARD
HWND hWnd = GetHwnd();
long lFromChar = lFrom;
long lToChar = lTo;
::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), 0);
::WinSendMsg(hWnd, EM_CUT, (MPARAM)0, (MPARAM)0);
@@ -334,8 +329,8 @@ void wxComboBox::SetSelection(
)
{
HWND hWnd = GetHwnd();
long lFromChar = lFrom;
long lToChar = lTo;
long lFromChar = 0;
long lToChar = 0;
//
// If from and to are both -1, it means

View File

@@ -41,10 +41,6 @@
// functions
// ----------------------------------------------------------------------------
#ifdef __WXDEBUG__
static const wxChar *GetTymedName(DWORD tymed);
#endif // Debug
// ----------------------------------------------------------------------------
// wxDataFormat
// ----------------------------------------------------------------------------

View File

@@ -718,8 +718,6 @@ void wxDC::DoDrawArc(
{
POINTL vPtlPos;
POINTL vPtlArc[2]; // Structure for current position
int nDx;
int nDy;
double dRadius;
double dAngl1;
double dAngl2;
@@ -756,8 +754,8 @@ void wxDC::DoDrawArc(
// Medium point
//
dAnglmid = (dAngl1 + dAngl2)/2. + M_PI;
vXm = vXc + dRadius * cos(dAnglmid);
vYm = vYc + dRadius * sin(dAnglmid);
vXm = (wxCoord)(vXc + dRadius * cos(dAnglmid));
vYm = (wxCoord)(vYc + dRadius * sin(dAnglmid));
DoDrawArc( vX1, vY1
,vXm, vYm
,vXc, vYc
@@ -773,8 +771,8 @@ void wxDC::DoDrawArc(
// Medium point
//
dAnglmid = (dAngl1 + dAngl2)/2.;
vXm = vXc + dRadius * cos(dAnglmid);
vYm = vYc + dRadius * sin(dAnglmid);
vXm = (wxCoord)(vXc + dRadius * cos(dAnglmid));
vYm = (wxCoord)(vYc + dRadius * sin(dAnglmid));
//
// 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].y = vY2;
::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
CalcBoundingBox( (vXc - dRadius)
,(vYc - dRadius)
CalcBoundingBox( (wxCoord)(vXc - dRadius)
,(wxCoord)(vYc - dRadius)
);
CalcBoundingBox( (vXc + dRadius)
,(vYc + dRadius)
CalcBoundingBox( (wxCoord)(vXc + dRadius)
,(wxCoord)(vYc + dRadius)
);
} // end of wxDC::DoDrawArc
@@ -1234,7 +1232,6 @@ void wxDC::DoDrawEllipticArc(
FIXED vFSweepa; // Start angle, sweep angle
double dIntPart;
double dFractPart;
double dRadius;
vY = OS2Y(vY,vHeight);
@@ -1251,8 +1248,8 @@ void wxDC::DoDrawEllipticArc(
vArcp.lP = vWidth/2;
vArcp.lS = 0;
::GpiSetArcParams(m_hPS, &vArcp); // Sets parameters to default
vPtlPos.x = vX + vWidth/2 * (1. + cos(DegToRad(dSa))); // Loads x-coordinate
vPtlPos.y = vY + vHeight/2 * (1. + sin(DegToRad(dSa))); // Loads y-coordinate
vPtlPos.x = (wxCoord)(vX + vWidth/2 * (1. + cos(DegToRad(dSa)))); // Loads x-coordinate
vPtlPos.y = (wxCoord)(vY + vHeight/2 * (1. + sin(DegToRad(dSa)))); // Loads y-coordinate
::GpiMove(m_hPS, &vPtlPos); // Sets current position
//
@@ -1564,8 +1561,8 @@ void wxDC::DoDrawBitmap(
}
else
{
LONG lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
LONG lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
ULONG lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
ULONG lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
if (m_textForegroundColour.Ok())
{
@@ -1637,10 +1634,6 @@ void wxDC::DoDrawBitmap(
unsigned char cOldGreenFore = (unsigned char)(lOldForeGround >> 8);
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 cGreenFore = (unsigned char)(lForeGround >> 8);
unsigned char cBlueFore = (unsigned char)lForeGround;
@@ -1780,7 +1773,7 @@ void wxDC::DrawAnyText(
if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
vPtlStart.y = OS2Y(vY,vTextY);
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
{
@@ -1791,7 +1784,7 @@ void wxDC::DrawAnyText(
if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar)))
vPtlStart.y = OS2Y(vY,vTextY);
else
vPtlStart.y = OS2Y(vY,vTextY/1.5);
vPtlStart.y = (LONG)(OS2Y(vY,vTextY/1.5));
}
else
vPtlStart.y = vY;
@@ -2277,7 +2270,7 @@ void wxDC::DoGetTextExtent(
vErrorCode = ::WinGetLastError(wxGetInstance());
sError = wxPMErrorToStr(vErrorCode);
// 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"
,zMsg
,wxICON_INFORMATION
@@ -2873,8 +2866,8 @@ wxSize wxDC::GetPPI() const
nPelHeight = lArray[CAPS_HEIGHT];
nHorzRes = lArray[CAPS_HORIZONTAL_RESOLUTION]; // returns pel/meter
nVertRes = lArray[CAPS_VERTICAL_RESOLUTION]; // returns pel/meter
nWidth = (nHorzRes/39.3) * nPelWidth;
nHeight = (nVertRes/39.3) * nPelHeight;
nWidth = (int)((nHorzRes/39.3) * nPelWidth);
nHeight = (int)((nVertRes/39.3) * nPelHeight);
}
return (wxSize(nWidth,nHeight));
} // end of wxDC::GetPPI

View File

@@ -153,9 +153,10 @@ void wxMemoryDC::SelectObject(
//
// Bmps drawn to are upside down, so flip it before committing
//
POINTL vPoint[4] = { 0, m_vSelectedBitmap.GetHeight(),
m_vSelectedBitmap.GetWidth(), 0,
0, 0, m_vSelectedBitmap.GetWidth(), m_vSelectedBitmap.GetHeight()
POINTL vPoint[4] = { {0, m_vSelectedBitmap.GetHeight()}
,{m_vSelectedBitmap.GetWidth(), 0}
,{0, 0}
,{m_vSelectedBitmap.GetWidth(), m_vSelectedBitmap.GetHeight()}
};

View File

@@ -42,7 +42,6 @@ wxPrinterDC::wxPrinterDC(
, int nOrientation
)
{
LONG lType = 0;
DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
,(char*)rsDriverName.c_str()
,NULL
@@ -233,7 +232,7 @@ void wxPrinterDC::EndPage()
// if (m_hDC)
// ::EndPage((HDC) m_hDC);
} // end of wxPrinterDC::EndPage
#if 0
// Returns default device and port names
static bool wxGetDefaultDeviceName(
wxString& rsDeviceName
@@ -295,6 +294,7 @@ static bool wxGetDefaultDeviceName(
*/
return(TRUE);
} // end of wxGetDefaultDeviceName
#endif
// Gets an HDC for the specified printer configuration
WXHDC WXDLLEXPORT wxGetPrinterDC(
@@ -356,8 +356,8 @@ void wxPrinterDC::DoDrawBitmap(
{
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
int nWidth = rBmp.GetWidth();
int nHeight = rBmp.GetHeight();
// int nWidth = rBmp.GetWidth();
// int nHeight = rBmp.GetHeight();
// TODO:

View File

@@ -98,14 +98,6 @@ bool wxDialog::Create(
, 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();
SetExtraStyle(GetExtraStyle() | wxTOPLEVEL_EX_DIALOG);

View File

@@ -32,6 +32,7 @@
// Private functions
/////////////////////////////////////////////////////////////////////////////
#if 0
static wxDragResult ConvertDragEffectToResult (
DWORD dwEffect
)
@@ -73,6 +74,7 @@ static DWORD ConvertDragResultToEffect (
return DO_DEFAULT;
}
} // end of ConvertDragResultToEffect
#endif
class CIDropTarget
{
@@ -517,6 +519,11 @@ bool wxDropSource::GiveFeedback (
case wxDragLink:
m_pDragInfo->usOperation = DO_LINK;
break;
case wxDragNone:
case wxDragCancel:
case wxDragError:
break;
}
return TRUE;
}

View File

@@ -216,7 +216,7 @@ int wxFileDialog::ShowModal()
m_fileNames.Empty();
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)
{
@@ -263,7 +263,7 @@ int wxFileDialog::ShowModal()
//
pzExtension = sFilterBuffer.c_str();
for( int i = 0; i < sFilterBuffer.length(); i++ )
for( int i = 0; i < (int)sFilterBuffer.length(); i++ )
{
//
// Get extension

View File

@@ -376,8 +376,6 @@ bool wxFontRefData::Alloc(
wxString sFaceName;
long flId = m_hFont;
long lRc;
short nIndex = 0;
PFONTMETRICS pFM = NULL;
ERRORID vError;
wxString sError;

View File

@@ -40,7 +40,6 @@ int wxFontDialog::ShowModal()
FONTDLG vFontDlg;
char zCurrentFont[FACESIZE];
HWND hWndFontDlg;
FONTMETRICS vFm;
FACENAMEDESC vFn;
memset(&vFontDlg, '\0', sizeof(FONTDLG));

View File

@@ -392,7 +392,6 @@ void wxFillLogFont(
// font, so now we need to generate an ID
//
long lNumLids = ::GpiQueryNumberSetIds(*phPS);
long lGpiError;
if(lNumLids )
{
@@ -465,17 +464,12 @@ void wxOS2SelectMatchingFontByName(
)
{
int i;
int nDiff0;
int nPointSize;
int nDiff;
int nIs;
int nMinDiff;
int nMinDiff0;
int nApirc;
int anDiff[16];
int anMinDiff[16];
int nIndex = 0;
STR8 zFn;
char zFontFaceName[FACESIZE];
wxString sFaceName;
USHORT usWeightClass;

View File

@@ -180,8 +180,6 @@ void wxFrame::DoSetClientSize(
, int nHeight
)
{
wxStatusBar* pStatusBar = GetStatusBar();
//
// Statusbars are not part of the OS/2 Client but parent frame
// so no statusbar consideration
@@ -217,8 +215,6 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
)
{
wxStatusBar* pStatusBar = NULL;
SWP vSwp;
ERRORID vError;
wxString sError;
pStatusBar = wxFrameBase::OnCreateStatusBar( nNumber
@@ -281,7 +277,6 @@ void wxFrame::PositionStatusBar()
int nY;
int nStatbarWidth;
int nStatbarHeight;
HWND hWndClient;
RECTL vRect;
RECTL vFRect;
@@ -355,17 +350,7 @@ void wxFrame::SetMenuBar(
wxMenuBar* pMenuBar
)
{
ERRORID vError;
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)
{
@@ -738,10 +723,8 @@ void wxFrame::PositionToolBar()
if (!pToolBar)
return;
HWND hWndClient;
RECTL vRect;
RECTL vFRect;
SWP vSwp;
wxPoint vPos;
::WinQueryWindowRect(m_hFrame, &vRect);
@@ -899,7 +882,6 @@ bool wxFrame::HandlePaint()
if (hIcon)
{
HWND hWndClient;
RECTL vRect3;
::WinQueryWindowRect(GetHwnd(), &vRect3);
@@ -1227,7 +1209,6 @@ MRESULT EXPENTRY wxFrameWndProc(
//
MRESULT rc = (MRESULT)0;
bool bProcessed = FALSE;
//
// 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:
{
SHORT nScxold = SHORT1FROMMP(wParam); // Old horizontal size.
SHORT nScyold = SHORT2FROMMP(wParam); // Old vertical size.
SHORT nScxnew = SHORT1FROMMP(lParam); // New horizontal size.
SHORT nScynew = SHORT2FROMMP(lParam); // New vertical size.

View File

@@ -37,9 +37,6 @@ MRESULT EXPENTRY wxGaugeWndProc(
wxGauge* pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
,QWL_USER
);
wxWindowOS2* pWindow = NULL;
MRESULT rc = (MRESULT)0;
bool bProcessed = FALSE;
HPS hPS;
RECTL vRect;
RECTL vRect2;

View File

@@ -1654,7 +1654,7 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
return GSOCK_INVPORT;
}
se = getservbyname(port, protocol);
se = getservbyname(port, (char*)protocol);
if (!se)
{
/* the cast to int suppresses compiler warnings about subscript having the

View File

@@ -281,31 +281,30 @@ int wxListBox::DoAppend(
const wxString& rsItem
)
{
int nIndex = 0;
SHORT nIndexType = 0;
long lIndex = 0;
LONG lIndexType = 0;
if (m_windowStyle & wxLB_SORT)
nIndexType = LIT_SORTASCENDING;
lIndexType = LIT_SORTASCENDING;
else
nIndexType = LIT_END;
nIndex = (int)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)nIndexType, (MPARAM)rsItem.c_str());
lIndexType = LIT_END;
lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)rsItem.c_str());
m_nNumItems++;
#if wxUSE_OWNER_DRAWN
if (m_windowStyle & wxLB_OWNERDRAW)
{
wxOwnerDrawn* pNewItem = CreateItem(nIndex); // dummy argument
wxOwnerDrawn* pNewItem = CreateItem(lIndex); // dummy argument
wxScreenDC vDc;
wxCoord vHeight;
pNewItem->SetName(rsItem);
m_aItems.Insert(pNewItem, nIndex);
::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)((SHORT)nIndex), MPFROMP(pNewItem));
m_aItems.Insert(pNewItem, lIndex);
::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)lIndex, MPFROMP(pNewItem));
pNewItem->SetFont(GetFont());
}
#endif
return nIndex;
return (int)lIndex;
} // end of wxListBox::DoAppend
void wxListBox::DoSetItems(
@@ -314,9 +313,8 @@ void wxListBox::DoSetItems(
)
{
BOOL bHideAndShow = IsShown();
int nCount = 0;
int i;
SHORT nIndexType = 0;
LONG lIndexType = 0;
if (bHideAndShow)
{
@@ -328,10 +326,10 @@ void wxListBox::DoSetItems(
{
if (m_windowStyle & wxLB_SORT)
nIndexType = LIT_SORTASCENDING;
lIndexType = LIT_SORTASCENDING;
else
nIndexType = LIT_END;
::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)nIndexType, (MPARAM)raChoices[i].c_str());
lIndexType = LIT_END;
::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)raChoices[i].c_str());
if (ppClientData)
{
@@ -635,7 +633,7 @@ void wxListBox::DoInsertItems(
m_aItems.Insert(pNewItem, nIndex);
::WinSendMsg( GetHwnd()
,LM_SETITEMHANDLE
,(MPARAM)((SHORT)nIndex)
,(MPARAM)((LONG)nIndex)
,MPFROMP(pNewItem)
);
m_nNumItems += nItems;
@@ -857,7 +855,7 @@ long wxListBox::OS2OnMeasure(
pMeasureStruct->rclItem.yTop = 0;
pMeasureStruct->rclItem.yBottom = 0;
vHeight = vDc.GetCharHeight() * 2.5;
vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5);
pMeasureStruct->rclItem.yTop = (USHORT)vHeight;
return long(MRFROM2SHORT((USHORT)vHeight, (USHORT)vWidth));

View File

@@ -202,7 +202,7 @@ void wxMenu::UpdateAccel(
//
size_t n = FindAccel(pItem->GetId());
if (n == wxNOT_FOUND)
if (n == (size_t)wxNOT_FOUND)
{
//
// No old, add new if any
@@ -247,7 +247,6 @@ bool wxMenu::DoInsertOrAppend(
ERRORID vError;
wxString sError;
char zMsg[128];
#if wxUSE_ACCEL
UpdateAccel(pItem);
@@ -331,7 +330,6 @@ bool wxMenu::DoInsertOrAppend(
#if wxUSE_OWNER_DRAWN
if (pItem->IsOwnerDrawn())
{
BOOL rc;
MENUITEM vMenuItem;
::WinSendMsg( GetHmenu()
@@ -343,7 +341,7 @@ bool wxMenu::DoInsertOrAppend(
);
}
#endif
if (rc == MIT_MEMERROR || rc == MIT_ERROR)
if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR)
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
@@ -601,7 +599,7 @@ bool wxMenu::OS2Command(
SendEvent( vId
,(int)::WinSendMsg( GetHmenu()
,MM_QUERYITEMATTR
,(MPARAM)vId
,MPFROMSHORT(vId)
,(MPARAM)MIA_CHECKED
)
);
@@ -730,7 +728,6 @@ void wxMenuBar::Refresh()
WXHMENU wxMenuBar::Create()
{
MENUITEM vItem;
HWND hFrame;
if (m_hMenu != 0 )
@@ -799,7 +796,7 @@ WXHMENU wxMenuBar::Create()
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());
if (rc == MIT_MEMERROR || rc == MIT_ERROR)
if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR)
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);

View File

@@ -189,9 +189,6 @@ WXDWORD wxNotebook::OS2GetStyle (
size_t wxNotebook::GetPageCount() const
{
int nPageInternal = m_pages.Count();
int nPageAPI = (int)::WinSendMsg(GetHWND(), BKM_QUERYPAGECOUNT, (MPARAM)0, (MPARAM)BKA_END);
//
// Consistency check
//
@@ -214,7 +211,7 @@ int wxNotebook::SetSelection(
{
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
,m_windowId
@@ -232,8 +229,6 @@ int wxNotebook::SetSelection(
vEvent.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
GetEventHandler()->ProcessEvent(vEvent);
ULONG ulPageId = (ULONG)m_alPageId[nPage];
::WinSendMsg( GetHWND()
,BKM_TURNTOPAGE
,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") );
ULONG ulPageId = (ULONG)m_alPageId[nPage];
return (bool)::WinSendMsg( m_hWnd
,BKM_SETTABTEXT
,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") );
ULONG ulPageId = (ULONG)m_alPageId[nPage];
memset(&vBookText, '\0', sizeof(BOOKTEXT));
vBookText.textLen = 0; // This will get the length
ulRc = LONGFROMMR(::WinSendMsg( m_hWnd
@@ -283,9 +271,9 @@ wxString wxNotebook::GetPageText (
,MPFROMLONG((ULONG)m_alPageId[nPage])
,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."));
}
@@ -302,7 +290,7 @@ wxString wxNotebook::GetPageText (
,MPFROMLONG((ULONG)m_alPageId[nPage])
,MPFROMP(&vBookText)
));
if (ulRc == BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
if (ulRc == (ULONG)BOOKERR_INVALID_PARAMETERS || ulRc == 0L)
{
return wxEmptyString;
}
@@ -333,9 +321,6 @@ bool wxNotebook::SetPageImage (
{
wxBitmap* pBitmap = (wxBitmap*)m_imageList->GetBitmap(nImage);
ULONG ulPageId = (ULONG)m_alPageId[nPage];
return (bool)::WinSendMsg( GetHWND()
,BKM_SETTABBITMAP
,MPFROMLONG((ULONG)m_alPageId[nPage])
@@ -415,9 +400,6 @@ wxNotebookPage* wxNotebook::DoRemovePage (
if (!pPageRemoved)
return NULL;
ULONG ulPageId = (ULONG)m_alPageId[nPage];
::WinSendMsg( GetHWND()
,BKM_DELETEPAGE
,MPFROMLONG((ULONG)m_alPageId[nPage])
@@ -437,14 +419,14 @@ wxNotebookPage* wxNotebook::DoRemovePage (
//
int nSelNew;
if (m_nSelection == GetPageCount())
if (m_nSelection == (int)GetPageCount())
{
//
// Last page deleted, make the new last page the new selection
//
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
@@ -594,7 +576,7 @@ bool wxNotebook::InsertPage (
// If the inserted page is before the selected one, we must update the
// index of the selected page
//
if (nPage <= m_nSelection)
if (nPage <= (size_t)m_nSelection)
{
//
// One extra page added
@@ -622,7 +604,7 @@ bool wxNotebook::InsertPage (
vDC.GetTextExtent(rsStrText, &nTextX, &nTextY);
nTextY *= 2;
nTextX *= 1.3;
nTextX = (wxCoord)(nTextX * 1.3);
if (nTextX > m_nTabSize)
{
m_nTabSize = nTextX;
@@ -730,7 +712,7 @@ void wxNotebook::OnSelChange (
for (nSel = 0; nSel < nPageCount; nSel++)
{
if (ulOS2Sel == m_alPageId[nSel])
if (ulOS2Sel == (ULONG)m_alPageId[nSel])
{
bFound = TRUE;
break;
@@ -748,7 +730,7 @@ void wxNotebook::OnSelChange (
for (nSel = 0; nSel < nPageCount; nSel++)
{
if (ulOS2Sel == m_alPageId[nSel])
if (ulOS2Sel == (ULONG)m_alPageId[nSel])
{
bFound = TRUE;
break;

View File

@@ -111,7 +111,7 @@ bool wxOwnerDrawn::OnMeasureItem(
// 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
//
*pWidth += GetDefaultMarginWidth() * 1.5;
*pWidth = (size_t)(*pWidth + GetDefaultMarginWidth() * 1.5);
//
// JACS: items still look too tightly packed, so adding 5 pixels.
@@ -303,7 +303,7 @@ bool wxOwnerDrawn::OnDrawItem(
wxString sTgt = "\t";
wxString sFullString = m_strName; // need to save the original text
wxString sAccel;
size_t nIndex;
int nIndex;
size_t nWidth;
size_t nCharWidth;
size_t nHeight;
@@ -336,7 +336,7 @@ bool wxOwnerDrawn::OnDrawItem(
,(long *)&nWidth
,(long *)&nHeight
);
sTmp = sFullString[nIndex + 1];
sTmp = sFullString[(size_t)(nIndex + 1)];
rDC.GetTextExtent( sTmp
,(long *)&nCharWidth
,(long *)&nHeight
@@ -464,11 +464,6 @@ bool wxOwnerDrawn::OnDrawItem(
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 vPnt2 = {rRect.x + GetMarginWidth(), rRect.y + m_nHeight - 3};

View File

@@ -153,7 +153,7 @@ int wxPalette::GetPixel(
//
// Now loop through and find the matching entry
//
int i;
ULONG i;
for (i = 0; i < ulNumEntries; i++)
{
if (pualTable[i] == ulRGB)

View File

@@ -107,8 +107,6 @@ void wxRadioBox::AdjustButtons(
int nStartY;
int nMaxWidth;
int nMaxHeight;
int nTotWidth;
int nTotHeight;
wxGetCharSize( m_hWnd
,&nCx1
@@ -318,12 +316,6 @@ bool wxRadioBox::Create(
return FALSE;
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.
@@ -1041,8 +1033,6 @@ bool wxRadioBox::SetFont(
//
// Also set the font of our radio buttons
//
WXHFONT hFont = wxFont(rFont).GetResourceHandle();
for (int n = 0; n < (int)m_nNoItems; n++)
{
HWND hWndBtn = (HWND)m_ahRadioButtons[n];
@@ -1099,8 +1089,6 @@ bool wxRadioBox::Show(
bool bShow
)
{
int nCmdShow = 0;
if (!wxControl::Show(bShow))
return FALSE;
@@ -1127,8 +1115,6 @@ void wxRadioBox::SubclassRadioButton(
WXHWND hWndBtn
)
{
HWND hwndBtn = (HWND)hWndBtn;
fnWndProcRadioBtn = (WXFARPROC)::WinSubclassWindow(hWndBtn, (PFNWP)wxRadioBtnWndProc);
} // end of wxRadioBox::SubclassRadioButton

View File

@@ -439,7 +439,6 @@ wxRegionContain wxRegion::Contains(
, wxCoord y
) const
{
bool bOK = FALSE;
POINTL vPoint;
vPoint.x = x;

View File

@@ -58,7 +58,6 @@ void wxSlider::AdjustSubControls(
, int nSizeFlags
)
{
SWP vSwp;
int nXOffset = nX;
int nYOffset = nY;
int nCx; // slider,min,max sizes
@@ -552,7 +551,7 @@ void wxSlider::DoSetSize(
::WinSetWindowPos( (HWND)m_hStaticValue
,HWND_TOP
,(LONG)nXOffset
,(LONG)nYOffset - (nCyf * 1.2)
,(LONG)nYOffset - (LONG)(nCyf * 1.2)
,(LONG)nNewWidth
,(LONG)nValueHeight
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
@@ -562,7 +561,7 @@ void wxSlider::DoSetSize(
::WinSetWindowPos( (HWND)m_hStaticMin
,HWND_TOP
,(LONG)nXOffset
,(LONG)nYOffset - (nCyf * 1.2)
,(LONG)nYOffset - (LONG)(nCyf * 1.2)
,(LONG)nMinLen
,(LONG)nCy
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
@@ -602,7 +601,7 @@ void wxSlider::DoSetSize(
::WinSetWindowPos( (HWND)m_hStaticMax
,HWND_TOP
,(LONG)nXOffset
,(LONG)nYOffset - (nCyf * 1.2)
,(LONG)nYOffset - (LONG)(nCyf * 1.2)
,(LONG)nMaxLen
,(LONG)nCy
,SWP_ZORDER | SWP_SIZE | SWP_MOVE | SWP_SHOW
@@ -961,7 +960,7 @@ bool wxSlider::OS2OnScroll(
,(MPARAM)0
)
);
nNewPos = (nPixelPos/m_dPixelToRange);
nNewPos = (int)(nPixelPos/m_dPixelToRange);
if (nNewPos > (m_nRangeMax - m_nRangeMin)/2)
nNewPos++;
if ((nNewPos < GetMin()) || (nNewPos > GetMax()))
@@ -1080,7 +1079,7 @@ void wxSlider::SetTick(
int nTickPos
)
{
nTickPos *= m_dPixelToRange;
nTickPos = (int)(nTickPos * m_dPixelToRange);
::WinSendMsg( GetHwnd()
,SLM_ADDDETENT
,MPFROMSHORT(nTickPos)
@@ -1118,7 +1117,7 @@ void wxSlider::SetTickFreq(
::WinSendMsg(GetHwnd(), WM_SETWINDOWPARAMS, (MPARAM)&vWndParams, (MPARAM)0);
for (i = 1; i < (m_nRangeMax - m_nRangeMin)/n; i++)
{
nPixelPos = i * n * m_dPixelToRange;
nPixelPos = (int)(i * n * m_dPixelToRange);
::WinSendMsg( GetHwnd()
,SLM_ADDDETENT
,MPFROMSHORT(nPixelPos)
@@ -1131,14 +1130,6 @@ void wxSlider::SetValue(
int nValue
)
{
int nPixelPos = SHORT1FROMMR(::WinSendMsg( GetHwnd()
,SLM_QUERYSLIDERINFO
,MPFROM2SHORT( SMA_SLIDERARMPOSITION
,SMA_RANGEVALUE
)
,(MPARAM)0
)
);
int nPixelRange = SHORT1FROMMR(::WinSendMsg( GetHwnd()
,SLM_QUERYSLIDERINFO
,MPFROM2SHORT( SMA_SHAFTDIMENSIONS

View File

@@ -179,7 +179,6 @@ wxSize wxSpinButton::DoGetBestSize() const
int wxSpinButton::GetValue() const
{
int nVal = 0;
long lVal = 0L;
char zVal[10];

View File

@@ -73,8 +73,7 @@ MRESULT EXPENTRY wxSpinCtrlWndProc(
wxSpinCtrl* pSpin = (wxSpinCtrl *)::WinQueryWindowULong( hWnd
,QWL_USER
);
bool bProccesed = FALSE;
MRESULT rc = (MRESULT)0;
//
// Forward some messages (the key ones only so far) to the spin ctrl
//
@@ -347,7 +346,7 @@ void wxSpinCtrl::OnChar (
wxKeyEvent& rEvent
)
{
switch (rEvent.KeyCode())
switch (rEvent.GetKeyCode())
{
case WXK_RETURN:
{
@@ -474,7 +473,6 @@ bool wxSpinCtrl::SetFont(
return FALSE;
}
WXHANDLE hFont = GetFont().GetResourceHandle();
wxOS2SetFont( m_hWnd
,rFont
);

View File

@@ -97,8 +97,6 @@ bool wxStaticBitmap::Create(
int nX= rPos.x;
int nY = rPos.y;
int nWidth = rSize.x;
int nHeight = rSize.y;
char zId[16];
m_windowStyle = lStyle;
@@ -164,7 +162,6 @@ void wxStaticBitmap::OnPaint (
)
{
wxPaintDC vDc(this);
int i;
wxBitmap* pBitmap;
if (m_pImage->IsKindOf(CLASSINFO(wxIcon)))

View File

@@ -59,8 +59,6 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
SetParent(parent);
DWORD msflags = 0;
if (width <= 0)
width = 100;
if (height <= 0)
@@ -72,8 +70,6 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
m_windowId = (id < 0 ? NewControlId() : id);
long tabStyle = 0;
// Create the toolbar control.
HWND hWndTabCtrl = 0;
// TODO: create tab control

View File

@@ -101,9 +101,6 @@ bool wxTextCtrl::Create(
, const wxString& rsName
)
{
HWND hParent;
int nTempy;
//
// Base initialization
//
@@ -607,8 +604,6 @@ void wxTextCtrl::Replace(
{
#if wxUSE_CLIPBOARD
HWND hWnd = GetHwnd();
long lFromChar = lFrom;
long lToChar = lTo;
//
// Set selection and remove it
@@ -645,8 +640,6 @@ void wxTextCtrl::Remove(
)
{
HWND hWnd = GetHwnd();
long lFromChar = lFrom;
long lToChar = lTo;
if (m_bIsMLE)
{
@@ -749,7 +742,6 @@ long wxTextCtrl::XYToPosition(
, long lY
) const
{
HWND hWnd = GetHwnd();
long lCharIndex = 0L;
long lLen;
@@ -1012,7 +1004,6 @@ WXHBRUSH wxTextCtrl::OnCtlColor(
)
{
HPS hPS = (HPS)hWxDC;
wxBrush* pBrush = NULL;
wxColour vColBack = GetBackgroundColour();
wxColour vColFore = GetForegroundColour();
wxBrush* pBackgroundBrush = wxTheBrushList->FindOrCreateBrush( GetBackgroundColour()
@@ -1047,7 +1038,7 @@ void wxTextCtrl::OnChar(
wxKeyEvent& rEvent
)
{
switch (rEvent.KeyCode())
switch (rEvent.GetKeyCode())
{
case WXK_RETURN:
if ( !(m_windowStyle & wxTE_MULTILINE) )
@@ -1202,7 +1193,7 @@ wxSize wxTextCtrl::DoGetBestSize() const
wxGetCharSize(GetHWND(), &nCx, &nCy, (wxFont*)&GetFont());
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)
{

View File

@@ -169,7 +169,7 @@ ULONG wxTimerProc(
wxCHECK_MSG(pNode, 0, wxT("bogus timer id in wxTimerProc") );
if (pNode)
wxProcessTimer(*(wxTimer *)pNode->Data());
wxProcessTimer(*(wxTimer *)pNode->GetData());
return 0;
}

View File

@@ -379,7 +379,6 @@ bool wxToolBar::Create(
int nY = rPos.y;
int nWidth = rSize.x;
int nHeight = rSize.y;
wxFrame* pFrame = wxDynamicCast(GetParent(), wxFrame);
if (lStyle & wxTB_HORIZONTAL)
{
@@ -435,8 +434,6 @@ bool wxToolBar::Realize()
{
int nMaxToolWidth = 0;
int nMaxToolHeight = 0;
int nX;
int nY;
m_nCurrentRowsOrColumns = 0;
m_vLastX = m_xMargin;
@@ -847,7 +844,6 @@ void wxToolBar::DrawTool(
wxBitmap vBitmap = pTool->GetNormalBitmap();
bool bUseMask = FALSE;
wxMask* pMask = NULL;
RECTL vRect;
PrepareDC(rDc);
@@ -974,8 +970,6 @@ wxToolBarToolBase* wxToolBar::FindToolForPosition(
, wxCoord vY
) const
{
wxCoord vTextX = 0;
wxCoord vTextY = 0;
wxCoord vTBarHeight = 0;
GetSize( NULL

View File

@@ -76,8 +76,8 @@ END_EVENT_TABLE()
// Dialog window proc
MRESULT EXPENTRY wxDlgProc( HWND WXUNUSED(hWnd)
,UINT uMessage
,MPARAM WXUNUSED(wParam)
,MPARAM WXUNUSED(lParam)
,void * WXUNUSED(wParam)
,void * WXUNUSED(lParam)
)
{
switch(uMessage)
@@ -167,7 +167,7 @@ void wxTopLevelWindowOS2::OnActivate(
//
// 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()
: NULL;
@@ -206,7 +206,7 @@ void wxTopLevelWindowOS2::OnActivate(
}
wxLogTrace(_T("focus"),
_T("wxTLW %08x deactivated, last focused: %08x."),
_T("wxTLW %08lx deactivated, last focused: %08lx."),
m_hWnd,
m_pWinLastFocused ? GetHwndOf(m_pWinLastFocused)
: NULL);
@@ -366,7 +366,7 @@ bool wxTopLevelWindowOS2::CreateDialog(
{
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;
}
@@ -730,7 +730,6 @@ bool wxTopLevelWindowOS2::Show(
{
int nShowCmd;
SWP vSwp;
RECTL vRect;
if (bShow != IsShown() )
{
@@ -820,7 +819,6 @@ void wxTopLevelWindowOS2::Maximize(
bool wxTopLevelWindowOS2::IsMaximized() const
{
bool bIconic;
::WinQueryWindowPos(m_hFrame, (PSWP)&m_vSwp);
return (m_vSwp.fl & SWP_MAXIMIZE);

View File

@@ -83,7 +83,7 @@ bool wxGetHostName(
if ((zSysname = wxGetenv(_T("SYSTEM_NAME"))) == NULL)
{
ULONG n = ::PrfQueryProfileString( HINI_PROFILE
::PrfQueryProfileString( HINI_PROFILE
,(PSZ)WX_SECTION
,(PSZ)eHOSTNAME
,(PSZ)zDefaultHost

View File

@@ -148,9 +148,7 @@ long wxExecute(
ULONG ulExecFlag;
PSZ zArgs = NULL;
PSZ zEnvs = NULL;
ULONG ulWindowId;
APIRET rc;
PFNWP pOldProc;
TID vTID;
if (flags & wxEXEC_SYNC)

View File

@@ -57,8 +57,6 @@ public:
}
};
static wxTimer* wxTheSleepTimer = NULL;
// Reading and writing resources (eg WIN.INI, .Xdefaults)
#if wxUSE_RESOURCES
bool wxWriteResource(
@@ -335,7 +333,6 @@ bool wxCheckForInterrupt(
QMSG vMsg;
HAB hab = 0;
HWND hwndFilter = NULLHANDLE;
HWND hwndWin= (HWND) pWnd->GetHWND();
while(::WinPeekMsg(hab, &vMsg, hwndFilter, 0, 0, PM_REMOVE))
{

View File

@@ -409,8 +409,6 @@ bool wxWindowOS2::Create(
if (pParent)
{
int nTempy;
pParent->AddChild(this);
hParent = GetWinHwnd(pParent);
@@ -749,7 +747,6 @@ void wxWindowOS2::SetScrollbar(
ULONG ulStyle = WS_VISIBLE | WS_SYNCPAINT;
SWP vSwp;
SWP vSwpOwner;
RECTL vRect;
HWND hWndParent;
HWND hWndClient;
wxWindow* pParent = GetParent();
@@ -941,9 +938,6 @@ void wxWindowOS2::ScrollWindow(
)
{
RECTL vRect;
RECTL vRectHorz;
RECTL vRectVert;
RECTL vRectChild;
if (pRect)
{
@@ -1477,7 +1471,6 @@ void wxWindowOS2::DoMoveWindow(
)
{
RECTL vRect;
HWND hParent;
wxWindow* pParent = GetParent();
if (pParent && !IsKindOf(CLASSINFO(wxDialog)))
@@ -1513,7 +1506,6 @@ void wxWindowOS2::DoMoveWindow(
int nHeightFrameDelta = 0;
int nHeightFrame = 0;
int nWidthFrame = 0;
ULONG ulFLag = SWP_MOVE;
wxFrame* pFrame;
pFrame = wxDynamicCast(this, wxFrame);
@@ -1668,7 +1660,6 @@ void wxWindowOS2::DoSetSize(
// Must convert Y coords to test for equality under OS/2
//
int nY2 = nY;
wxWindow* pParent = (wxWindow*)GetParent();
if (nX == nCurrentX && nY2 == nCurrentY &&
nWidth == nCurrentWidth && nHeight == nCurrentHeight)
@@ -1845,7 +1836,6 @@ void wxWindowOS2::GetTextExtent(
FONTMETRICS vFM; // metrics structure
BOOL bRc = FALSE;
char* pStr;
ERRORID vErrorCode; // last error id code
HPS hPS;
@@ -1951,28 +1941,6 @@ bool wxWindowOS2::IsMouseInWindow() const
// 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
bool wxWindowOS2::DoPopupMenu(
wxMenu* pMenu
@@ -2005,7 +1973,6 @@ bool wxWindowOS2::DoPopupMenu(
while(bIsWaiting)
{
QMSG vMsg;
BOOL bRc = ::WinGetMsg(vHabmain, &vMsg, HWND(NULL), 0, 0);
if (vMsg.msg == WM_MENUEND || vMsg.msg == WM_COMMAND)
{
@@ -2321,14 +2288,6 @@ MRESULT EXPENTRY wxWndProc(
, 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);
//
@@ -3009,36 +2968,6 @@ MRESULT wxWindowOS2::OS2WindowProc(
return mResult;
} // 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(
WXHWND hWnd
)
@@ -3047,7 +2976,7 @@ wxWindow* wxFindWinFromHandle(
if (!pNode)
return NULL;
return (wxWindow *)pNode->Data();
return (wxWindow *)pNode->GetData();
} // end of wxFindWinFromHandle
void wxAssociateWinWithHandle(
@@ -3154,9 +3083,6 @@ bool wxWindowOS2::OS2Create(
int nY = 0L;
int nWidth = 0L;
int nHeight = 0L;
wxWindow* pParent = GetParent();
HWND hWnd = NULLHANDLE;
HWND hParent;
long lControlId = 0L;
wxWindowCreationHook vHook(this);
wxString sClassName((wxChar*)zClass);
@@ -3696,14 +3622,14 @@ void wxWindowOS2::OnSysColourChanged(
wxSysColourChangedEvent& rEvent
)
{
wxNode* pNode = GetChildren().First();
wxWindowListNode* pNode = GetChildren().GetFirst();
while (pNode)
{
//
// Only propagate to non-top-level windows
//
wxWindow* pWin = (wxWindow *)pNode->Data();
wxWindow* pWin = (wxWindow *)pNode->GetData();
if (pWin->GetParent())
{
@@ -3712,7 +3638,7 @@ void wxWindowOS2::OnSysColourChanged(
rEvent.m_eventObject = pWin;
pWin->GetEventHandler()->ProcessEvent(vEvent);
}
pNode = pNode->Next();
pNode = pNode->GetNext();
}
} // end of wxWindowOS2::OnSysColourChanged
@@ -3740,7 +3666,6 @@ bool wxWindowOS2::HandlePaint()
HRGN hRgn;
wxPaintEvent vEvent(m_windowId);
HPS hPS;
RECTL vRect;
bool bProcessed;
// Create empty region
@@ -3772,8 +3697,6 @@ bool wxWindowOS2::HandlePaint()
//
HPS hPS;
RECTL vRect;
wxFrame* pFrame;
wxWindow* pParent;
hPS = ::WinBeginPaint( GetHwnd()
,NULLHANDLE
@@ -3833,8 +3756,6 @@ bool wxWindowOS2::HandlePaint()
//
HPS hPS;
RECTL vRect;
wxFrame* pFrame;
wxWindow* pParent;
hPS = ::WinBeginPaint( GetHwnd()
,NULLHANDLE
@@ -3954,7 +3875,6 @@ bool wxWindowOS2::HandleGetMinMaxInfo(
PSWP pSwp
)
{
bool bRc = FALSE;
POINTL vPoint;
switch(pSwp->fl)
@@ -4104,7 +4024,6 @@ bool wxWindowOS2::HandleMouseEvent(
bProcessed = GetEventHandler()->ProcessEvent(vEvent);
if (!bProcessed)
{
HPOINTER hPtr = ::WinQuerySysPointer(HWND_DESKTOP, SPTR_WAIT, FALSE);
HPOINTER hCursor = (HPOINTER)GetCursor().GetHCURSOR();
if (hCursor != NULLHANDLE)
@@ -4501,8 +4420,6 @@ int wxWindowOS2::GetOS2ParentHeight(
wxWindowOS2* pParent
)
{
wxWindowOS2* pGrandParent = NULL;
//
// Case 1
//
@@ -5298,7 +5215,6 @@ wxWindowOS2* FindWindowForMouseEvent(
POINTL vPoint;
BOOL rcEnabled = FALSE;
BOOL rcVisible = FALSE;
HWND hWndDesktop = HWND_DESKTOP;
::WinQueryPointerPos(HWND_DESKTOP, &vPoint);
hWndUnderMouse = ::WinWindowFromPoint(HWND_DESKTOP, &vPoint, TRUE);
@@ -5309,7 +5225,6 @@ wxWindowOS2* FindWindowForMouseEvent(
if (pWinUnderMouse)
{
wxWindowList::Node* pCurrent = pWinUnderMouse->GetChildren().GetFirst();
wxWindow* pChild = NULL;
wxWindow* pGrandChild = NULL;
RECTL vRect;
POINTL vPoint2;