From 27a9bd487b5ee30238e35ff4962bf70237cfc2c0 Mon Sep 17 00:00:00 2001 From: Patrick Albert Date: Mon, 14 Jun 1999 07:12:16 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 5 +++++ include/wx/msw/dib.h | 6 +++--- include/wx/msw/private.h | 10 ++++++++-- src/msw/checklst.cpp | 6 +++--- src/msw/ctl3d/msvc/ctl3dv2.lib | Bin 1557 -> 1911 bytes src/msw/curico.cpp | 14 ++++++++++++++ src/msw/mdi.cpp | 2 +- src/msw/ole/oleutils.cpp | 2 ++ src/msw/printwin.cpp | 4 ++++ src/msw/tbarmsw.cpp | 2 +- src/msw/utilsexc.cpp | 2 +- src/msw/xpmhand.cpp | 2 +- 12 files changed, 43 insertions(+), 12 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 3bc4487512..1e17c22014 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -84,6 +84,11 @@ # pragma warning(disable:4100) // unreferenced formal parameter # pragma warning(disable:4511) // copy ctor couldn't be generated # pragma warning(disable:4512) // operator=() couldn't be generated +#ifndef WIN32 +# pragma warning(disable:4134) // conversion between pointers to members of same class +# pragma warning(disable:4135) // conversion between different integral types +# pragma warning(disable:4769) // assignment of near pointer to long integer +#endif #endif // __VISUALC__ // suppress some Salford C++ warnings diff --git a/include/wx/msw/dib.h b/include/wx/msw/dib.h index 06d8d8aa60..b6b89ef14b 100644 --- a/include/wx/msw/dib.h +++ b/include/wx/msw/dib.h @@ -19,8 +19,8 @@ wxBitmap *wxLoadBitmap(wxChar *filename, wxColourMap **colourmap = NULL) bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxColourMap **pal = NULL); HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal); -BOOL ReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette); -HANDLE ReadDIB2(LPTSTR lpFileName); -LPSTR FindDIBBits (LPTSTR lpbi); +BOOL ReadDIB(LPSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette); +HANDLE ReadDIB2(LPSTR lpFileName); +LPSTR FindDIBBits (LPSTR lpbi); HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo); diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index b9decc997c..02b9577313 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -77,8 +77,12 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; typedef int (pascal * WndProcCast) (); # define CASTWNDPROC (WndProcCast) # else - typedef int (PASCAL * WndProcCast) (); -# define CASTWNDPROC (WndProcCast) +# if defined(__VISUALC__) && defined(STRICT) +# define CASTWNDPROC (WNDPROC) +# else + typedef int (PASCAL * WndProcCast) (); +# define CASTWNDPROC (WndProcCast) +# endif # endif # else # define CASTWNDPROC @@ -105,8 +109,10 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; #endif #if !defined(__WIN32__) // 3.x uses FARPROC for dialogs +#ifndef STRICT #define DLGPROC FARPROC #endif +#endif #if wxUSE_PENWIN WXDLLEXPORT void wxRegisterPenWin(); diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index d0b312fb84..613edc426a 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -155,9 +155,9 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, #else // In WIN16, draw a cross HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); - HPEN whiteBrush = GetStockObject(WHITE_BRUSH); - HPEN hPenOld = ::SelectObject(hdcMem, blackPen); - HPEN hBrushOld = ::SelectObject(hdcMem, whiteBrush); + HPEN whiteBrush = (HPEN)GetStockObject(WHITE_BRUSH); + HPEN hPenOld = (HPEN)::SelectObject(hdcMem, blackPen); + HPEN hBrushOld = (HPEN)::SelectObject(hdcMem, whiteBrush); ::SetROP2(hdcMem, R2_COPYPEN); Rectangle(hdcMem, 0, 0, nCheckWidth, nCheckHeight); MoveTo(hdcMem, 0, 0); diff --git a/src/msw/ctl3d/msvc/ctl3dv2.lib b/src/msw/ctl3d/msvc/ctl3dv2.lib index 8e35c80b91cb9a610601a01217f91d718eeb98ac..c4952ef0f078097db15894161b270bebe90bd8cb 100644 GIT binary patch literal 1911 zcmd5-J#W)c6g}=&C~eYwlrFTCGB7{|QZrDA0sQeA0`SMd^7y=bn4tz1P3Wz#L#8{X{h^ z4F&_&@Av^{PRP5~vv?giGz=Xt+1zb9y{!sr`|$}$ z*I;5F#oL?>jN*sfn4$O@P6`X?=L%5;i_#bKOv`1?M!YJcDZnTJw(t6ZeZ}-z z>|1}}P-bCs-rLdHXW-DN|ieuR>P2EOK8nSTQ{sk_(q#9z|DkKzqk#qkr;S;3b? zCnCPt z|FnV6`bwTpmjD$&RP;R3#hdnk4ec3$pB2v(`|J|Z%P5vCR2R5-Kj{l}MO$I(lU8;O s>7t>QxR(A;4R%2pq>B^U!cQX;gY{e5@HfX^mWKZNn?>qQQq_hbf65Vy#_zosMo=bfLrz3wm zEx5M}()`o^o7*{jm5DZp)@bnr1B{B^2|zdIicU28VGamN&%3S=n&5?6srf~=omtNk2+Kd=0|RF?ew z)AC)PJ2;Z$X%)`(#Q8gcph6|_w>@j%+9L`N#hw!3E@a(Aas86K^=x@#J6*pDfWr%m z`{(@E#_M~d&eR`XCi%4p-)7>A_s9LWM~+c|MgJ)kgsm(gVE=zH6f~B_V;LyxsB)q>-|H8x1_z%45R$w zfAXd=VUa(hgTXfr+hc!&YVzIH-1xWy6rM>3%MmcDV8rK-?@e?9(&uj>!c~I{+gJ5- z5pvSnFBIzf6CISgro{8>+NNt>T|T^eeo*1%f0d+nnO~FY(m$7aJGCZu$8tPF;kgW8 zMF^y3mh{_G03K$^+^8kZONGGO`-6x5^d0Zsb8tcResl!1ebBz&lUe`YH=d3>yq@U! E0n3p@*Z=?k diff --git a/src/msw/curico.cpp b/src/msw/curico.cpp index 9338e438fd..9258b5ad20 100644 --- a/src/msw/curico.cpp +++ b/src/msw/curico.cpp @@ -820,10 +820,17 @@ HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint) DeleteObject(hXorBmp); ReleaseDC(NULL, hDC); #ifndef __WIN32__ +#ifdef STRICT + LocalUnlock(LocalHandle((void NEAR*) andBits)); + LocalUnlock(LocalHandle((void NEAR*) xorBits)); + LocalFree(LocalHandle((void NEAR*) andBits)); + LocalFree(LocalHandle((void NEAR*) xorBits)); +#else LocalUnlock(LocalHandle((WORD) andBits)); LocalUnlock(LocalHandle((WORD) xorBits)); LocalFree(LocalHandle((WORD) andBits)); LocalFree(LocalHandle((WORD) xorBits)); +#endif #else LocalUnlock(LocalHandle((LPCVOID) andBits)); LocalUnlock(LocalHandle((LPCVOID) xorBits)); @@ -891,10 +898,17 @@ HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap) DeleteObject(hXorBmp); ReleaseDC((HWND) NULL, hDC); #ifndef __WIN32__ +#ifdef STRICT + LocalUnlock(LocalHandle((void NEAR*) andBits)); + LocalUnlock(LocalHandle((void NEAR*) xorBits)); + LocalFree(LocalHandle((void NEAR*) andBits)); + LocalFree(LocalHandle((void NEAR*) xorBits)); +#else LocalUnlock(LocalHandle((WORD) andBits)); LocalUnlock(LocalHandle((WORD) xorBits)); LocalFree(LocalHandle((WORD) andBits)); LocalFree(LocalHandle((WORD) xorBits)); +#endif #else LocalUnlock(LocalHandle((LPCVOID) andBits)); LocalUnlock(LocalHandle((LPCVOID) xorBits)); diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 8666721817..1468591234 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -1002,7 +1002,7 @@ void wxMDIChildFrame::MSWDestroyWindow() #ifdef __WIN32__ SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (WPARAM)oldHandle, (LPARAM)0); #else - SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0); + SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (WPARAM)oldHandle, 0); #endif invalidHandle = 0; diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 58b3cd8a16..34f1109c68 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -79,6 +79,7 @@ const char *GetIidName(REFIID riid) ADD_KNOWN_IID(AdviseSink2), ADD_KNOWN_IID(BindCtx), ADD_KNOWN_IID(ClassFactory), +#if !defined( __VISUALC__) || (__VISUALC__!=1010) ADD_KNOWN_IID(ContinueCallback), ADD_KNOWN_IID(EnumOleDocumentViews), ADD_KNOWN_IID(OleCommandTarget), @@ -86,6 +87,7 @@ const char *GetIidName(REFIID riid) ADD_KNOWN_IID(OleDocumentSite), ADD_KNOWN_IID(OleDocumentView), ADD_KNOWN_IID(Print), +#endif ADD_KNOWN_IID(DataAdviseHolder), ADD_KNOWN_IID(DataObject), ADD_KNOWN_IID(Debug), diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index d09ddc2dd9..36beaf6021 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -190,7 +190,11 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt wxYield(); #if defined(__BORLANDC__) || defined(__GNUWIN32__) || defined(__SALFORDC__) || !defined(__WIN32__) +#ifdef STRICT + ::SetAbortProc((HDC) dc->GetHDC(), (ABORTPROC) m_lpAbortProc); +#else ::SetAbortProc((HDC) dc->GetHDC(), (FARPROC) m_lpAbortProc); +#endif #else ::SetAbortProc((HDC) dc->GetHDC(), (int (_stdcall *) // cast it to right type only if required diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp index 11facd6d13..3ca04af78b 100644 --- a/src/msw/tbarmsw.cpp +++ b/src/msw/tbarmsw.cpp @@ -347,7 +347,7 @@ wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx wxBitmap bitmap2; if (toggle) { - bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP())); + bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap((WXHINSTANCE)wxGetInstance(), (WXHBITMAP) ((wxBitmap& )bitmap).GetHBITMAP())); } wxToolBarTool *tool = new wxToolBarTool(index, bitmap, bitmap2, toggle, xPos, yPos, helpString1, helpString2); diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index d33c8215e8..77802caee3 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -317,7 +317,7 @@ long wxExecute(const wxString& command, bool sync, wxProcess *handler) int running; do { wxYield(); - running = GetModuleUsage((HANDLE)instanceID); + running = GetModuleUsage((HINSTANCE)instanceID); } while (running); } diff --git a/src/msw/xpmhand.cpp b/src/msw/xpmhand.cpp index 0432f686b9..da59e8b150 100644 --- a/src/msw/xpmhand.cpp +++ b/src/msw/xpmhand.cpp @@ -39,7 +39,7 @@ #if wxUSE_XPM_IN_MSW #define FOR_MSW 1 -#include "../src/xpm/xpm34.h" +#include "../xpm/xpm34.h" #endif #include "wx/xpmhand.h" -- 2.45.2