Added STRICT corrections.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e99c304810
commit
c4e7c2aa58
@ -40,7 +40,8 @@ wxFont WXDLLEXPORT wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNe
|
||||
#ifdef __GNUWIN32__
|
||||
#define CASTWNDPROC (long unsigned)
|
||||
#else
|
||||
#define CASTWNDPROC
|
||||
typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long);
|
||||
#define CASTWNDPROC (WndProcCast)
|
||||
#endif
|
||||
|
||||
#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not
|
||||
|
@ -387,7 +387,7 @@ void wxPageSetupData::ConvertToNative(void)
|
||||
pd->Flags |= PSD_SHOWHELP;
|
||||
|
||||
pd->lStructSize = sizeof( PAGESETUPDLG );
|
||||
pd->hwndOwner=(HANDLE)NULL;
|
||||
pd->hwndOwner=(HWND)NULL;
|
||||
pd->hDevNames=(HWND)NULL;
|
||||
pd->hInstance=(HINSTANCE)NULL;
|
||||
|
||||
|
@ -26,10 +26,12 @@
|
||||
|
||||
#include "wx/datstrm.h"
|
||||
|
||||
/*
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_CLASS(wxDataInputStream, wxFilterInputStream)
|
||||
IMPLEMENT_CLASS(wxDataOutputStream, wxFilterOutputStream)
|
||||
#endif
|
||||
*/
|
||||
|
||||
wxDataInputStream::wxDataInputStream(wxInputStream& s)
|
||||
: wxFilterInputStream(s)
|
||||
|
@ -59,7 +59,7 @@ extern wxList wxPendingDelete;
|
||||
extern void wxSetKeyboardHook(bool doIt);
|
||||
extern wxCursor *g_globalCursor;
|
||||
|
||||
HANDLE wxhInstance = 0;
|
||||
HINSTANCE wxhInstance = 0;
|
||||
static MSG s_currentMsg;
|
||||
wxApp *wxTheApp = NULL;
|
||||
|
||||
@ -94,9 +94,9 @@ long wxApp::sm_lastMessageTime = 0;
|
||||
static HINSTANCE gs_hRichEdit = NULL;
|
||||
#endif
|
||||
|
||||
bool wxApp::Initialize(WXHANDLE instance)
|
||||
bool wxApp::Initialize(WXHINSTANCE instance)
|
||||
{
|
||||
HANDLE hInstance = (HANDLE)instance;
|
||||
HINSTANCE hInstance = (HINSTANCE) instance;
|
||||
|
||||
CommonInit();
|
||||
|
||||
@ -248,7 +248,7 @@ bool wxApp::RegisterWindowClasses()
|
||||
wndclass2.hIcon = NULL;
|
||||
wndclass2.hCursor = NULL;
|
||||
// wndclass2.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1) ;
|
||||
wndclass2.hbrBackground = GetStockObject( LTGRAY_BRUSH );
|
||||
wndclass2.hbrBackground = (HBRUSH) GetStockObject( LTGRAY_BRUSH );
|
||||
wndclass2.lpszMenuName = NULL;
|
||||
wndclass2.lpszClassName = wxPanelClassName;
|
||||
if (!RegisterClass( &wndclass2 ))
|
||||
|
@ -130,7 +130,7 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
||||
HDC hDC = lpDIS->hDC;
|
||||
HDC memDC = ::CreateCompatibleDC(hDC);
|
||||
|
||||
HBITMAP old = ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
|
||||
HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
|
||||
|
||||
if (!old)
|
||||
return FALSE;
|
||||
@ -194,8 +194,8 @@ void wxBitmapButton::DrawFace( WXHDC dc, int left, int top, int right, int botto
|
||||
ms_color = GetSysColor(COLOR_BTNFACE) ;
|
||||
brushFace = CreateSolidBrush(ms_color) ;
|
||||
|
||||
oldp = SelectObject( (HDC) dc, GetStockObject( NULL_PEN ) ) ;
|
||||
oldb = SelectObject( (HDC) dc, brushFace ) ;
|
||||
oldp = (HPEN) SelectObject( (HDC) dc, GetStockObject( NULL_PEN ) ) ;
|
||||
oldb = (HBRUSH) SelectObject( (HDC) dc, brushFace ) ;
|
||||
Rectangle( (HDC) dc, left, top, right, bottom ) ;
|
||||
SelectObject( (HDC) dc, penBorder) ;
|
||||
MoveToEx((HDC) dc,left+1,top,NULL);LineTo((HDC) dc,right-1,top);
|
||||
@ -252,7 +252,7 @@ void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right, in
|
||||
extern HBRUSH wxDisableButtonBrush;
|
||||
void wxBitmapButton::DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg )
|
||||
{
|
||||
HBRUSH old = SelectObject( (HDC) dc, wxDisableButtonBrush ) ;
|
||||
HBRUSH old = (HBRUSH) SelectObject( (HDC) dc, wxDisableButtonBrush ) ;
|
||||
|
||||
if ( with_marg )
|
||||
::PatBlt( (HDC) dc, left + m_marginX, top + m_marginY,
|
||||
|
@ -92,7 +92,7 @@ bool wxSetClipboardData(int dataFormat, wxObject *obj, int width, int height)
|
||||
|
||||
HDC hdcMem = CreateCompatibleDC(NULL);
|
||||
HDC hdcSrc = CreateCompatibleDC(NULL);
|
||||
HBITMAP old = ::SelectObject(hdcSrc, (HBITMAP) wxBM->GetHBITMAP());
|
||||
HBITMAP old = (HBITMAP) ::SelectObject(hdcSrc, (HBITMAP) wxBM->GetHBITMAP());
|
||||
HBITMAP hBitmap = CreateCompatibleBitmap(hdcSrc,
|
||||
wxBM->GetWidth(), wxBM->GetHeight());
|
||||
if (!hBitmap)
|
||||
@ -102,7 +102,7 @@ bool wxSetClipboardData(int dataFormat, wxObject *obj, int width, int height)
|
||||
DeleteDC(hdcSrc);
|
||||
return FALSE;
|
||||
}
|
||||
HBITMAP old1 = SelectObject(hdcMem, hBitmap);
|
||||
HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap);
|
||||
BitBlt(hdcMem, 0, 0, wxBM->GetWidth(), wxBM->GetHeight(),
|
||||
hdcSrc, 0, 0, SRCCOPY);
|
||||
|
||||
@ -145,7 +145,7 @@ bool wxSetClipboardData(int dataFormat, wxObject *obj, int width, int height)
|
||||
mf->mm = wxMF->GetWindowsMappingMode();
|
||||
mf->xExt = width;
|
||||
mf->yExt = height;
|
||||
mf->hMF = (HANDLE) wxMF->GetHMETAFILE();
|
||||
mf->hMF = (HMETAFILE) wxMF->GetHMETAFILE();
|
||||
GlobalUnlock(data);
|
||||
wxMF->SetHMETAFILE((WXHANDLE) NULL);
|
||||
|
||||
@ -206,14 +206,14 @@ wxObject *wxGetClipboardData(int dataFormat, long *len)
|
||||
case wxCF_BITMAP:
|
||||
{
|
||||
BITMAP bm;
|
||||
HBITMAP hBitmap = GetClipboardData(CF_BITMAP);
|
||||
HBITMAP hBitmap = (HBITMAP) GetClipboardData(CF_BITMAP);
|
||||
if (!hBitmap)
|
||||
return NULL;
|
||||
|
||||
HDC hdcMem = CreateCompatibleDC(NULL);
|
||||
HDC hdcSrc = CreateCompatibleDC(NULL);
|
||||
|
||||
HBITMAP old = ::SelectObject(hdcSrc, hBitmap);
|
||||
HBITMAP old = (HBITMAP) ::SelectObject(hdcSrc, hBitmap);
|
||||
GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm);
|
||||
|
||||
HBITMAP hNewBitmap = CreateBitmapIndirect(&bm);
|
||||
@ -226,7 +226,7 @@ wxObject *wxGetClipboardData(int dataFormat, long *len)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HBITMAP old1 = SelectObject(hdcMem, hNewBitmap);
|
||||
HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hNewBitmap);
|
||||
BitBlt(hdcMem, 0, 0, bm.bmWidth, bm.bmHeight,
|
||||
hdcSrc, 0, 0, SRCCOPY);
|
||||
|
||||
|
@ -772,7 +772,7 @@ HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint)
|
||||
hAndBmp = CreateCompatibleBitmap(hDCMono, 32, 32);
|
||||
hXorBmp = CreateCompatibleBitmap(hDCMono, 32, 32);
|
||||
|
||||
hBmpOld = SelectObject(hDCColor, hBitmap);
|
||||
hBmpOld = (HBITMAP) SelectObject(hDCColor, hBitmap);
|
||||
SelectObject(hDCMono, hAndBmp);
|
||||
SetBkColor(hDCColor, RGB(191, 191, 191));
|
||||
|
||||
@ -849,7 +849,7 @@ HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap)
|
||||
hAndBmp = CreateCompatibleBitmap(hDCMono, 32, 32);
|
||||
hXorBmp = CreateCompatibleBitmap(hDCMono, 32, 32);
|
||||
|
||||
hBmpOld = SelectObject(hDCColor, hBitmap);
|
||||
hBmpOld = (HBITMAP) SelectObject(hDCColor, hBitmap);
|
||||
SelectObject(hDCMono, hAndBmp);
|
||||
SetBkColor(hDCColor, RGB(191, 191, 191));
|
||||
|
||||
|
@ -94,7 +94,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
|
||||
#if WXDEBUG > 1
|
||||
wxDebugMsg("wxMemoryDC::SelectObject: Selecting HBITMAP %X\n", m_selectedBitmap.GetHBITMAP());
|
||||
#endif
|
||||
HBITMAP bm = ::SelectObject((HDC) m_hDC, (HBITMAP) m_selectedBitmap.GetHBITMAP());
|
||||
HBITMAP bm = (HBITMAP) ::SelectObject((HDC) m_hDC, (HBITMAP) m_selectedBitmap.GetHBITMAP());
|
||||
|
||||
if (bm == ERROR)
|
||||
{
|
||||
|
@ -682,7 +682,7 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
|
||||
** some good color choices.
|
||||
*/
|
||||
else
|
||||
return(GetStockObject(DEFAULT_PALETTE));
|
||||
return((HPALETTE) GetStockObject(DEFAULT_PALETTE));
|
||||
}
|
||||
|
||||
bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal)
|
||||
|
@ -739,7 +739,7 @@ void wxFrame::MSWOnMenuHighlight(WXWORD nItem, WXWORD nFlags, WXHMENU hSysMenu)
|
||||
bool wxFrame::MSWProcessMessage(WXMSG* pMsg)
|
||||
{
|
||||
if (m_acceleratorTable != 0 &&
|
||||
::TranslateAccelerator((HWND) GetHWND(), (HANDLE) m_acceleratorTable, (MSG *)pMsg))
|
||||
::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable, (MSG *)pMsg))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
@ -75,7 +75,7 @@ bool wxGaugeMSW::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
if ( !wxGaugeMSWInitialised )
|
||||
{
|
||||
if (!gaugeInit((HWND) wxGetInstance()))
|
||||
if (!gaugeInit((HINSTANCE) wxGetInstance()))
|
||||
wxFatalError("Cannot initalize Gauge library");
|
||||
wxGaugeMSWInitialised = TRUE;
|
||||
}
|
||||
@ -540,13 +540,13 @@ void FAR PASCAL Draw3DLine(HDC hdc, WORD x, WORD y, WORD nLen,
|
||||
else return;
|
||||
|
||||
/* select NULL_PEN for no borders */
|
||||
hOldPen = SelectObject(hdc, GetStockObject(NULL_PEN));
|
||||
hOldPen = (HPEN) SelectObject(hdc, GetStockObject(NULL_PEN));
|
||||
|
||||
/* select the appropriate color for the fill */
|
||||
if (fDark)
|
||||
hOldBrush = SelectObject(hdc, GetStockObject(GRAY_BRUSH));
|
||||
hOldBrush = (HBRUSH) SelectObject(hdc, GetStockObject(GRAY_BRUSH));
|
||||
else
|
||||
hOldBrush = SelectObject(hdc, GetStockObject(WHITE_BRUSH));
|
||||
hOldBrush = (HBRUSH) SelectObject(hdc, GetStockObject(WHITE_BRUSH));
|
||||
|
||||
/* finally, draw the dern thing */
|
||||
Polygon(hdc, (LPPOINT)&Point, 4);
|
||||
@ -857,7 +857,7 @@ static void PASCAL gaugePaint(HWND hwnd, HDC hdc)
|
||||
GetClientRect(hwnd, &rc1);
|
||||
|
||||
/* draw a black border on the _outside_ */
|
||||
FrameRect(hdc, &rc1, GetStockObject(BLACK_BRUSH));
|
||||
FrameRect(hdc, &rc1, (HBRUSH) GetStockObject(BLACK_BRUSH));
|
||||
|
||||
/* we want to draw _just inside_ the black border */
|
||||
InflateRect(&rc1, -1, -1);
|
||||
@ -878,7 +878,7 @@ static void PASCAL gaugePaint(HWND hwnd, HDC hdc)
|
||||
InflateRect(&rc1, ~(pgauge->wWidth3D), ~(pgauge->wWidth3D));
|
||||
|
||||
/* draw a black border on the _inside_ */
|
||||
FrameRect(hdc, &rc1, GetStockObject(BLACK_BRUSH));
|
||||
FrameRect(hdc, &rc1, (HBRUSH) GetStockObject(BLACK_BRUSH));
|
||||
|
||||
/* we want to draw _just inside_ the black border */
|
||||
InflateRect(&rc1, -1, -1);
|
||||
@ -925,7 +925,7 @@ static void PASCAL gaugePaint(HWND hwnd, HDC hdc)
|
||||
} /* switch () */
|
||||
|
||||
/* select the correct font */
|
||||
hFont = SelectObject(hdc, pgauge->hFont);
|
||||
hFont = (HFONT) SelectObject(hdc, pgauge->hFont);
|
||||
|
||||
/* build up a string to blit out--ie the meaning of life: "42%" */
|
||||
wsprintf(ach, "%3d%%", (WORD)((DWORD)iPos * 100 / iRange));
|
||||
@ -1148,7 +1148,7 @@ zyzgForceRepaint3D:
|
||||
case WM_SETFONT:
|
||||
/* if NULL hFont, use system font */
|
||||
if (!(hFont = (HFONT)wParam))
|
||||
hFont = GetStockObject(SYSTEM_FONT);
|
||||
hFont = (HFONT) GetStockObject(SYSTEM_FONT);
|
||||
|
||||
pgauge->hFont = hFont;
|
||||
|
||||
|
@ -539,7 +539,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
|
||||
HDC dc = GetWindowDC(hwnd);
|
||||
HFONT oldFont = 0;
|
||||
if (GetFont() && GetFont()->GetResourceHandle())
|
||||
oldFont = ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
|
||||
oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
|
||||
|
||||
GetTextMetrics(dc, &lpTextMetric);
|
||||
SIZE extentXY;
|
||||
@ -560,7 +560,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
|
||||
HDC dc = GetWindowDC(hwnd);
|
||||
HFONT oldFont = 0;
|
||||
if (GetFont() && GetFont()->GetResourceHandle())
|
||||
oldFont = ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
|
||||
oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
|
||||
|
||||
GetTextMetrics(dc, &lpTextMetric);
|
||||
int i;
|
||||
|
@ -41,7 +41,7 @@ int PASCAL
|
||||
int APIENTRY
|
||||
#endif
|
||||
|
||||
WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR m_lpCmdLine, int nCmdShow )
|
||||
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR m_lpCmdLine, int nCmdShow )
|
||||
{
|
||||
return wxEntry((WXHINSTANCE) hInstance, (WXHINSTANCE) hPrevInstance, m_lpCmdLine, nCmdShow);
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ $(CFG): makefile.b32
|
||||
-Oxt
|
||||
-WE
|
||||
|
||||
-I$(WXINC);$(BCCDIR)\include
|
||||
-I$(WXINC);$(BCCDIR)\include;-I$(WXDIR)/src/png;-I$(WXDIR)/src/zlib
|
||||
-I$(WXDIR)\include\msw\gnuwin32
|
||||
|
||||
-L$(BCCDIR)\lib
|
||||
|
@ -71,6 +71,8 @@ GENERICOBJS= \
|
||||
$(GENDIR)\tabg.obj \
|
||||
$(GENDIR)\textdlgg.obj
|
||||
|
||||
# $(COMMDIR)\fileconf.obj \
|
||||
|
||||
COMMONOBJS = \
|
||||
$(COMMDIR)\cmndata.obj \
|
||||
$(COMMDIR)\config.obj \
|
||||
@ -78,7 +80,6 @@ COMMONOBJS = \
|
||||
$(COMMDIR)\dynarray.obj \
|
||||
$(COMMDIR)\event.obj \
|
||||
$(COMMDIR)\file.obj \
|
||||
$(COMMDIR)\fileconf.obj \
|
||||
$(COMMDIR)\filefn.obj \
|
||||
$(COMMDIR)\gdicmn.obj \
|
||||
$(COMMDIR)\intl.obj \
|
||||
|
@ -609,7 +609,7 @@ bool wxMDIParentFrame::MSWProcessMessage(WXMSG* msg)
|
||||
return TRUE;
|
||||
|
||||
if (m_acceleratorTable != (WXHANDLE) NULL &&
|
||||
::TranslateAccelerator((HWND) GetHWND(), (HANDLE) m_acceleratorTable, pMsg))
|
||||
::TranslateAccelerator((HWND) GetHWND(), (HACCEL) m_acceleratorTable, pMsg))
|
||||
return TRUE;
|
||||
|
||||
if (pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)
|
||||
@ -818,7 +818,7 @@ void wxMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar)
|
||||
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
|
||||
|
||||
parent->m_parentFrameActive = FALSE;
|
||||
HMENU subMenu = GetSubMenu((HWND) parent->GetWindowMenu(), 0);
|
||||
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
|
||||
|
||||
// Try to insert Window menu in front of Help, otherwise append it.
|
||||
int N = GetMenuItemCount(menu);
|
||||
@ -960,7 +960,7 @@ bool wxMDIChildFrame::MSWProcessMessage(WXMSG *msg)
|
||||
{
|
||||
wxFrame *parent = (wxFrame *)GetParent();
|
||||
HWND parent_hwnd = (HWND) parent->GetHWND();
|
||||
return (::TranslateAccelerator(parent_hwnd, (HANDLE) m_acceleratorTable, pMsg) != 0);
|
||||
return (::TranslateAccelerator(parent_hwnd, (HACCEL) m_acceleratorTable, pMsg) != 0);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ wxMetaFile::wxMetaFile(const wxString& file)
|
||||
wxMetaFile::~wxMetaFile(void)
|
||||
{
|
||||
if (m_metaFile)
|
||||
{ DeleteMetaFile((HANDLE) m_metaFile); m_metaFile = 0; }
|
||||
{ DeleteMetaFile((HMETAFILE) m_metaFile); m_metaFile = 0; }
|
||||
}
|
||||
|
||||
bool wxMetaFile::SetClipboard(int width, int height)
|
||||
@ -83,7 +83,7 @@ bool wxMetaFile::Play(wxDC *dc)
|
||||
dc->BeginDrawing();
|
||||
|
||||
if (dc->GetHDC() && m_metaFile)
|
||||
PlayMetaFile((HDC) dc->GetHDC(), (HANDLE) m_metaFile);
|
||||
PlayMetaFile((HDC) dc->GetHDC(), (HMETAFILE) m_metaFile);
|
||||
|
||||
dc->EndDrawing();
|
||||
|
||||
|
@ -841,13 +841,13 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc,
|
||||
DRAWFASTRECT( hDC, &rc ) ;
|
||||
|
||||
hbrCaption = CreateSolidBrush( rgbCaptionBG ) ;
|
||||
hbrCaption = SelectObject( hDC, hbrCaption ) ;
|
||||
SelectObject( hDC, GetStockObject( NULL_PEN ) ) ;
|
||||
hbrCaption = (HBRUSH) SelectObject( hDC, hbrCaption ) ;
|
||||
SelectObject( hDC, (HPEN) GetStockObject( NULL_PEN ) ) ;
|
||||
if (fVert)
|
||||
Rectangle( hDC, rcCap.left, rcCap.top, rcCap.right, rcCap.bottom + 1 ) ;
|
||||
else
|
||||
Rectangle( hDC, rcCap.left, rcCap.top, rcCap.right+1, rcCap.bottom ) ;
|
||||
hbrCaption = SelectObject( hDC, hbrCaption ) ;
|
||||
hbrCaption = (HBRUSH) SelectObject( hDC, hbrCaption ) ;
|
||||
DeleteObject( hbrCaption ) ;
|
||||
|
||||
|
||||
@ -901,7 +901,7 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc,
|
||||
lf.lfOrientation = 900 ;
|
||||
|
||||
hFont = CreateFontIndirect( &lf ) ;
|
||||
hFont = SelectObject( hDC, hFont ) ;
|
||||
hFont = (HFONT) SelectObject( hDC, hFont ) ;
|
||||
|
||||
GetTextExtentPoint( hDC, lpsz, ui, &Size ) ;
|
||||
cx = rcCap.bottom - ((rcCap.bottom - rcCap.top - Size.cx) / 2) ;
|
||||
@ -920,7 +920,7 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc,
|
||||
lpsz, ui, NULL ) ;
|
||||
}
|
||||
|
||||
hFont = SelectObject( hDC, hFont ) ;
|
||||
hFont = (HFONT) SelectObject( hDC, hFont ) ;
|
||||
DeleteObject( hFont ) ;
|
||||
}
|
||||
else
|
||||
@ -931,7 +931,7 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc,
|
||||
lf.lfPitchAndFamily = FF_SWISS ;
|
||||
|
||||
hFont = CreateFontIndirect( &lf ) ;
|
||||
hFont = SelectObject( hDC, hFont ) ;
|
||||
hFont = (HFONT) SelectObject( hDC, hFont ) ;
|
||||
|
||||
GetTextExtentPoint( hDC, lpsz, ui, &Size ) ;
|
||||
cx = rcCap.left + ((rcCap.right - rcCap.left - Size.cx) / 2) ;
|
||||
@ -945,7 +945,7 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc,
|
||||
ETO_CLIPPED, &rcCap,
|
||||
lpsz, ui, NULL ) ;
|
||||
|
||||
hFont = SelectObject( hDC, hFont ) ;
|
||||
hFont = (HFONT) SelectObject( hDC, hFont ) ;
|
||||
DeleteObject( hFont ) ;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
||||
#ifdef O_DRAW_NATIVE_API
|
||||
int nPrevMode = SetBkMode(hdc, TRANSPARENT);
|
||||
HBRUSH hbr = CreateSolidBrush(colBack),
|
||||
hPrevBrush = SelectObject(hdc, hbr);
|
||||
hPrevBrush = (HBRUSH) SelectObject(hdc, hbr);
|
||||
|
||||
RECT rectAll = { rc.GetLeft(), rc.GetTop(), rc.GetRight(), rc.GetBottom() };
|
||||
FillRect(hdc, &rectAll, hbr);
|
||||
@ -143,7 +143,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
||||
hfont = (HFONT)::GetStockObject(SYSTEM_FONT);
|
||||
}
|
||||
|
||||
HFONT hPrevFont = ::SelectObject(hdc, hfont);
|
||||
HFONT hPrevFont = (HFONT) ::SelectObject(hdc, hfont);
|
||||
DrawState(hdc, NULL, NULL,
|
||||
(LPARAM)(const char *)m_strName, m_strName.Length(),
|
||||
x, rc.y, rc.GetWidth(), rc.GetHeight(),
|
||||
|
@ -271,7 +271,7 @@ bool wxPNGReader::InstantiateBitmap(wxBitmap *bitmap)
|
||||
HDC dc2 = GetDC(NULL);
|
||||
HBITMAP tmpBitmap = ::CreateCompatibleBitmap(dc2, GetWidth(), GetHeight());
|
||||
ReleaseDC(NULL, dc2);
|
||||
HBITMAP oldBitmap = ::SelectObject(dc, tmpBitmap);
|
||||
HBITMAP oldBitmap = (HBITMAP) ::SelectObject(dc, tmpBitmap);
|
||||
|
||||
if ( Palette )
|
||||
{
|
||||
@ -342,7 +342,7 @@ wxMask *wxPNGReader::CreateMask(void)
|
||||
HBITMAP hBitmap = ::CreateBitmap(GetWidth(), GetHeight(), 1, 1, NULL);
|
||||
|
||||
HDC dc = ::CreateCompatibleDC(NULL);
|
||||
HBITMAP oldBitmap = ::SelectObject(dc, hBitmap);
|
||||
HBITMAP oldBitmap = (HBITMAP) ::SelectObject(dc, hBitmap);
|
||||
|
||||
int bgIndex = GetBGIndex();
|
||||
|
||||
|
@ -171,7 +171,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
|
||||
|
||||
wxWindow *win = CreateAbortWindow(parent, printout);
|
||||
wxYield();
|
||||
::SetAbortProc((HDC) dc->GetHDC(), (FARPROC) lpAbortProc);
|
||||
::SetAbortProc((HDC) dc->GetHDC(), (int (_stdcall *)(HDC, int)) lpAbortProc);
|
||||
|
||||
if (!win)
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ bool wxStaticBitmap::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
||||
HDC hDC = lpDIS->hDC;
|
||||
HDC memDC = ::CreateCompatibleDC(hDC);
|
||||
|
||||
HBITMAP old = ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
|
||||
HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
|
||||
|
||||
if (!old)
|
||||
return FALSE;
|
||||
|
@ -188,7 +188,7 @@ bool wxToolBar95::CreateTools(void)
|
||||
|
||||
// Now blit all the tools onto this bitmap
|
||||
HDC memoryDC = ::CreateCompatibleDC(NULL);
|
||||
HBITMAP oldBitmap = ::SelectObject(memoryDC, (HBITMAP) m_hBitmap);
|
||||
HBITMAP oldBitmap = (HBITMAP) ::SelectObject(memoryDC, (HBITMAP) m_hBitmap);
|
||||
|
||||
HDC memoryDC2 = ::CreateCompatibleDC(NULL);
|
||||
int x = 0;
|
||||
@ -201,7 +201,7 @@ bool wxToolBar95::CreateTools(void)
|
||||
{
|
||||
// wxPalette *palette = tool->m_bitmap1->GetPalette();
|
||||
|
||||
HBITMAP oldBitmap2 = ::SelectObject(memoryDC2, (HBITMAP) tool->m_bitmap1.GetHBITMAP());
|
||||
HBITMAP oldBitmap2 = (HBITMAP) ::SelectObject(memoryDC2, (HBITMAP) tool->m_bitmap1.GetHBITMAP());
|
||||
/* int bltResult = */
|
||||
BitBlt(memoryDC, x, 0, (int) m_defaultWidth, (int) m_defaultHeight, memoryDC2,
|
||||
0, 0, SRCCOPY);
|
||||
@ -506,7 +506,7 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height)
|
||||
|
||||
if (hdcMem)
|
||||
{
|
||||
hbmOld = SelectObject(hdcMem, hBitmap);
|
||||
hbmOld = (HBITMAP) SelectObject(hdcMem, hBitmap);
|
||||
|
||||
int i, j, k;
|
||||
for ( i = 0; i < width; i++)
|
||||
|
@ -439,7 +439,7 @@ void wxToolBarMSW::CreateMask(WXHDC hdc, int xoffset, int yoffset, int dx, int d
|
||||
// krj - create a new bitmap and copy the image from hdc.
|
||||
//HBITMAP bitmapOld = SelectObject(hdcGlyphs, hBitmap);
|
||||
HBITMAP hBitmap = CreateCompatibleBitmap((HDC) hdc, dx, dy);
|
||||
HBITMAP bitmapOld = SelectObject(hdcGlyphs, hBitmap);
|
||||
HBITMAP bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, hBitmap);
|
||||
BitBlt(hdcGlyphs, 0,0, dx, dy, (HDC) hdc, 0, 0, SRCCOPY);
|
||||
|
||||
// initalize whole area with 1's
|
||||
@ -528,11 +528,11 @@ void wxToolBarMSW::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBar
|
||||
#if !defined(__WIN32__) && !defined(__WIN386__)
|
||||
HBITMAP bitmapOld;
|
||||
if (tool->m_bitmap2.Ok())
|
||||
bitmapOld = SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap2.GetHBITMAP());
|
||||
bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap2.GetHBITMAP());
|
||||
else
|
||||
bitmapOld = SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap1.GetHBITMAP());
|
||||
bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap1.GetHBITMAP());
|
||||
#else
|
||||
HBITMAP bitmapOld = SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap1.GetHBITMAP());
|
||||
HBITMAP bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, (HBITMAP) tool->m_bitmap1.GetHBITMAP());
|
||||
#endif
|
||||
|
||||
// calculate offset of face from (x,y). y is always from the top,
|
||||
@ -564,7 +564,7 @@ void wxToolBarMSW::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBar
|
||||
if (!(state & wxTBSTATE_INDETERMINATE)) {
|
||||
hbr = CreateSolidBrush(m_rgbHilight);
|
||||
if (hbr) {
|
||||
hbrOld = SelectObject((HDC) hdc, hbr);
|
||||
hbrOld = (HBRUSH) SelectObject((HDC) hdc, hbr);
|
||||
if (hbrOld) {
|
||||
// draw hilight color where we have 0's in the mask
|
||||
BitBlt((HDC) hdc, x + 1, y + 1, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00B8074A);
|
||||
@ -577,7 +577,7 @@ void wxToolBarMSW::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBar
|
||||
// gray out glyph
|
||||
hbr = CreateSolidBrush(m_rgbShadow);
|
||||
if (hbr) {
|
||||
hbrOld = SelectObject((HDC) hdc, hbr);
|
||||
hbrOld = (HBRUSH) SelectObject((HDC) hdc, hbr);
|
||||
if (hbrOld) {
|
||||
// draw the shadow color where we have 0's in the mask
|
||||
BitBlt((HDC) hdc, x, y, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00B8074A);
|
||||
@ -593,7 +593,7 @@ void wxToolBarMSW::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, wxToolBar
|
||||
|
||||
if (state & (wxTBSTATE_CHECKED | wxTBSTATE_INDETERMINATE)) {
|
||||
|
||||
hbrOld = SelectObject((HDC) hdc, (HBRUSH) m_hbrDither);
|
||||
hbrOld = (HBRUSH) SelectObject((HDC) hdc, (HBRUSH) m_hbrDither);
|
||||
if (hbrOld) {
|
||||
|
||||
if (!bMaskCreated)
|
||||
@ -817,7 +817,7 @@ WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE WXUNUSED(hInstance), void
|
||||
// hbm = CreateDiscardableBitmap(hdc, i, hgt);
|
||||
hbm = CreateCompatibleBitmap(hdc, i, hgt);
|
||||
if (hbm) {
|
||||
hbmOld = SelectObject(hdcMem, hbm);
|
||||
hbmOld = (HBITMAP) SelectObject(hdcMem, hbm);
|
||||
|
||||
// set the main image
|
||||
StretchDIBits(hdcMem, 0, 0, wid, hgt, 0, 0, wid, hgt, lpBits,
|
||||
|
@ -171,7 +171,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
HWND edit = CreateWindowEx(exStyle, windowClass, NULL,
|
||||
msStyle,
|
||||
0, 0, 0, 0, (HWND) ((wxWindow*)parent)->GetHWND(), (HMENU)m_windowId,
|
||||
m_globalHandle ? (HANDLE) m_globalHandle : wxGetInstance(), NULL);
|
||||
m_globalHandle ? (HINSTANCE) m_globalHandle : wxGetInstance(), NULL);
|
||||
|
||||
#if CTL3D
|
||||
if ( want3D )
|
||||
|
@ -807,7 +807,7 @@ void wxWindow::GetTextExtent(const wxString& string, int *x, int *y,
|
||||
if (fontToUse && fontToUse->Ok())
|
||||
{
|
||||
if ((fnt=(HFONT) fontToUse->GetResourceHandle()))
|
||||
was = SelectObject(dc,fnt) ;
|
||||
was = (HFONT) SelectObject(dc,fnt) ;
|
||||
}
|
||||
|
||||
SIZE sizeRect;
|
||||
@ -1686,7 +1686,7 @@ void wxWindow::MSWOnDropFiles(WXWPARAM wParam)
|
||||
wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd);
|
||||
#endif
|
||||
|
||||
HANDLE hFilesInfo = (HANDLE)wParam;
|
||||
HDROP hFilesInfo = (HDROP) wParam;
|
||||
POINT dropPoint;
|
||||
DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint);
|
||||
|
||||
@ -2647,7 +2647,7 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
|
||||
// the_font->UseResource();
|
||||
// the_font->RealizeResource();
|
||||
if ((fnt=(HFONT) the_font->GetResourceHandle()))
|
||||
was = SelectObject(dc,fnt) ;
|
||||
was = (HFONT) SelectObject(dc,fnt) ;
|
||||
}
|
||||
GetTextMetrics(dc, &tm);
|
||||
if (the_font && fnt && was)
|
||||
|
@ -141,9 +141,9 @@ PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\wx.pdb
|
||||
MAKEPRECOMP=/YcWX/WXPREC.H
|
||||
!endif
|
||||
|
||||
CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ /DDEBUG=1 $(INC) $(OPT) $(EXTRADLLFLAGS) /MD /GX /D__WXDEBUG__ /DWXDEBUG=1
|
||||
CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ /DDEBUG=1 $(INC) $(OPT) $(EXTRADLLFLAGS) /MD /GX /D__WXDEBUG__ /DWXDEBUG=1 /DSTRICT
|
||||
# If you don't include wxprec.h, use CPPFLAGS2
|
||||
CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ /DDEBUG=1 $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) /MD /GX /D__WXDEBUG__ /DWXDEBUG=1
|
||||
CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ /DDEBUG=1 $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) /MD /GX /D__WXDEBUG__ /DWXDEBUG=1 /DSTRICT
|
||||
LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup
|
||||
DUMMY=dummy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user