Removing some level 3 warning

Updating samples\makefile.vc


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Patrick Albert
1999-08-27 11:46:55 +00:00
parent cbd4be25b2
commit 48c12cb129
20 changed files with 228 additions and 138 deletions

View File

@@ -219,7 +219,7 @@ wxPrintData::wxPrintData(const wxPrintData& printData)
wxPrintData::~wxPrintData()
{
#ifdef __WXMSW__
HGLOBAL hDevMode = (HGLOBAL) m_devMode;
HGLOBAL hDevMode = (HGLOBAL)(DWORD) m_devMode;
if (hDevMode )
GlobalFree(hDevMode);
#endif
@@ -264,7 +264,7 @@ static wxString wxGetPrintDlgError()
void wxPrintData::ConvertToNative()
{
HGLOBAL hDevMode = (HGLOBAL) m_devMode;
HGLOBAL hDevMode = (HGLOBAL)(DWORD) m_devMode;
if (!hDevMode)
{
// Use PRINTDLG as a way of creating a DEVMODE object
@@ -435,7 +435,7 @@ void wxPrintData::ConvertToNative()
void wxPrintData::ConvertFromNative()
{
HGLOBAL hDevMode = (HGLOBAL) m_devMode;
HGLOBAL hDevMode = (HGLOBAL)(DWORD) m_devMode;
if (!hDevMode)
return;
@@ -755,7 +755,7 @@ void wxPrintDialogData::ConvertToNative()
GlobalFree(pd->hDevMode);
}
pd->hDevMode = (HGLOBAL) m_printData.GetNativeData();
pd->hDevMode = (HGLOBAL)(DWORD) m_printData.GetNativeData();
m_printData.SetNativeData((void*) NULL);
@@ -817,7 +817,7 @@ void wxPrintDialogData::ConvertFromNative()
if (m_printData.GetNativeData())
{
// Make sure we don't leak memory
GlobalFree((HGLOBAL) m_printData.GetNativeData());
GlobalFree((HGLOBAL)(DWORD) m_printData.GetNativeData());
}
m_printData.SetNativeData((void*) pd->hDevMode);
pd->hDevMode = NULL;

View File

@@ -500,7 +500,7 @@ bool wxTempFile::Open(const wxString& strName)
if ( !GetTempFileName(strPath, _T("wx_"),0, m_strTemp.GetWriteBuf(MAX_PATH)) )
#else
// Not sure why MSVC++ 1.5 header defines first param as BYTE - bug?
if ( !GetTempFileName((BYTE) (const wxChar*) strPath, _T("wx_"),0, m_strTemp.GetWriteBuf(MAX_PATH)) )
if ( !GetTempFileName((BYTE) (DWORD)(const wxChar*) strPath, _T("wx_"),0, m_strTemp.GetWriteBuf(MAX_PATH)) )
#endif
wxLogLastError(_T("GetTempFileName"));
m_strTemp.UngetWriteBuf();

View File

@@ -682,7 +682,11 @@ wxBitmap wxImage::ConvertToBitmap() const
return wxNullBitmap;
// sizeLimit is the MS upper limit for the DIB size
#ifdef WIN32
int sizeLimit = 1024*768*3;
#else
int sizeLimit = 0x7fff ;
#endif
// width and height of the device-dependent bitmap
int width = GetWidth();

View File

@@ -563,7 +563,7 @@ wxStringList::wxStringList (const wxChar *first, ...)
s = va_arg(ap, const wxChar *);
// if (s == NULL)
#ifdef __WXMSW__
if ((int) s == 0)
if ((int)(long) s == 0)
#else
if ((long) s == 0)
#endif

View File

@@ -443,7 +443,7 @@ float wxDatabase::GetODBCVersionFloat(bool implementation)
if (retcode == SQL_ERROR)
return 0.0;
else
return atof(buf);
return (float)atof(buf);
}
/*

View File

@@ -2504,7 +2504,7 @@ int wxResourceGetIdentifier(const wxString& name, wxResourceTable *table)
if (!table)
table = wxDefaultResourceTable;
return (int)table->identifiers.Get(name);
return (int)(long)table->identifiers.Get(name);
}
/*

View File

@@ -1786,21 +1786,21 @@ void wxGenericGrid::DrawTextRect(wxDC *dc, const wxString& text, wxRect *rect, i
{
case wxRIGHT:
{
x = (rect->x + rect->width - textWidth - 1.0);
y = (rect->y + (rect->height - textHeight)/2.0);
x = (rect->x + rect->width - textWidth - (float)1.0);
y = (rect->y + (rect->height - textHeight)/(float)2.0);
break;
}
case wxCENTRE:
{
x = (rect->x + (rect->width - textWidth)/2.0);
y = (rect->y + (rect->height - textHeight)/2.0);
x = (rect->x + (rect->width - textWidth)/(float)2.0);
y = (rect->y + (rect->height - textHeight)/(float)2.0);
break;
}
case wxLEFT:
default:
{
x = (rect->x + 1.0);
y = (rect->y + (rect->height - textHeight)/2.0);
x = (rect->x + (float)1.0);
y = (rect->y + (rect->height - textHeight)/(float)2.0);
break;
}
}

View File

@@ -80,7 +80,7 @@ wxBitmapRefData::~wxBitmapRefData()
if (m_selectedInto)
{
wxChar buf[200];
wxSprintf(buf, _T("Bitmap was deleted without selecting out of wxMemoryDC %X."), (unsigned int) m_selectedInto);
wxSprintf(buf, _T("Bitmap was deleted without selecting out of wxMemoryDC %lX."), (unsigned long) m_selectedInto);
wxFatalError(buf);
}
if (m_hBitmap)
@@ -146,7 +146,7 @@ bool wxBitmap::FreeResource(bool WXUNUSED(force))
if (M_BITMAPDATA->m_selectedInto)
{
wxChar buf[200];
wxSprintf(buf, _T("Bitmap %X was deleted without selecting out of wxMemoryDC %X."), (unsigned int) this, (unsigned int) M_BITMAPDATA->m_selectedInto);
wxSprintf(buf, _T("Bitmap %lX was deleted without selecting out of wxMemoryDC %lX."), (unsigned long) this, (unsigned long) M_BITMAPDATA->m_selectedInto);
wxFatalError(buf);
}
if (M_BITMAPDATA->m_hBitmap)

View File

@@ -113,7 +113,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H)
return (HANDLE) NULL;
// inserted by P.S.
while( (nDirEntries < iconFileHead.wResourceCount) &&
while( ((unsigned)nDirEntries < iconFileHead.wResourceCount) &&
((iconFileRes.bWidth != nWidth) || (iconFileRes.bHeight != nHeight)))
{
cbRes = _lread( hFile, (LPSTR )&iconFileRes, sizeof( ICONFILERES));
@@ -361,7 +361,7 @@ HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H)
return (HANDLE) NULL;
// following added by P.S.
while( (nDirEntries < curFileHead.wResourceCount) &&
while( ((unsigned)nDirEntries < curFileHead.wResourceCount) &&
((curFileRes.bWidth != nWidth) || (curFileRes.bHeight != nHeight)))
{
cbRes = _lread( hFile, (LPSTR )&curFileRes, sizeof( CURFILERES));

View File

@@ -377,8 +377,8 @@ void wxDC::DoDrawArc(long x1,long y1,long x2,long y2, long xc, long yc)
Arc(GetHdc(),xxx1,yyy1,xxx2,yyy2,
xx1,yy1,xx2,yy2);
CalcBoundingBox((xc-radius), (yc-radius));
CalcBoundingBox((xc+radius), (yc+radius));
CalcBoundingBox((long)(xc-radius), (long)(yc-radius));
CalcBoundingBox((long)(xc+radius), (long)(yc+radius));
}
void wxDC::DoDrawPoint(long x, long y)

View File

@@ -361,7 +361,7 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
LPDEVMODE lpDevMode = (LPDEVMODE) NULL;
HGLOBAL hDevMode = (HGLOBAL) printData.GetNativeData();
HGLOBAL hDevMode = (HGLOBAL)(DWORD) printData.GetNativeData();
if ( hDevMode )
lpDevMode = (DEVMODE*) GlobalLock(hDevMode);

View File

@@ -647,7 +647,7 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
#ifdef __WXWINE__
return (FALSE);
#else
NPLOGPALETTE npPal;
LPLOGPALETTE npPal;
RGBQUAD far *lpRGB;
HPALETTE hLogPal;
WORD i;
@@ -661,7 +661,7 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) +
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
*/
npPal = (NPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
npPal = (LPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
if (!npPal)
return(FALSE);

View File

@@ -716,7 +716,7 @@ HPALETTE MakePalette(const BITMAPINFO FAR* Info, UINT flags)
logPal->palVersion = 0x300; // Windows 3.0 version
logPal->palNumEntries = nColors;
for (short n = 0; n < nColors; n++) {
for (WORD n = 0; n < nColors; n++) {
logPal->palPalEntry[n].peRed = rgb[n].rgbRed;
logPal->palPalEntry[n].peGreen = rgb[n].rgbGreen;
logPal->palPalEntry[n].peBlue = rgb[n].rgbBlue;

View File

@@ -674,25 +674,29 @@ $(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
$(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
cd $(DOCDIR)\latex\wx
-copy *.bmp *.wmf $(DOCDIR)\pdf
-copy *.wmf $(DOCDIR)\pdf
-copy *.bmp $(DOCDIR)\pdf
-start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf
cd $(THISDIR)
$(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex
cd $(DOCDIR)\latex\porting
-copy *.bmp *.wmf $(DOCDIR)\pdf
-copy *.wmf $(DOCDIR)\pdf
-copy *.bmp $(DOCDIR)\pdf
-start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf
cd $(THISDIR)
$(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex
cd $(DOCDIR)\latex\proplist
-copy *.bmp *.wmf $(DOCDIR)\pdf
-copy *.bmp $(DOCDIR)\pdf
-copy *.wmf $(DOCDIR)\pdf
-start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf
cd $(THISDIR)
$(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex
cd $(DOCDIR)\latex\techref
-copy *.bmp *.wmf $(DOCDIR)\pdf
-copy *.wmf $(DOCDIR)\pdf
-copy *.bmp $(DOCDIR)\pdf
-start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf
cd $(THISDIR)

View File

@@ -482,7 +482,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
if ( child->GetHWND() )
{
long childId = wxGetWindowId(child->GetHWND());
if (childId == id)
if (childId == (long)id)
{
::SendMessage( GetWinHwnd(GetClientWindow()),
WM_MDIACTIVATE,

View File

@@ -983,7 +983,7 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc,
SetBkMode( hDC, nBkMode ) ;
#ifdef __WIN16__
GlobalFreePtr( (unsigned int) lpsz ) ;
GlobalFreePtr( (unsigned int)(DWORD) lpsz ) ;
#else
GlobalFreePtr( lpsz ) ;
#endif