From e90babdf85c9c8025e7f0647c0270de6d7e44a63 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 2 Jun 1999 14:08:08 +0000 Subject: [PATCH] Added progdlgg.cpp to makefiles; fixed true/false in treectrl.h; made IsFree consistent (const omission) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/treectrl.h | 2 +- include/wx/log.h | 2 +- include/wx/msw/brush.h | 2 +- include/wx/msw/font.h | 2 +- include/wx/msw/gdiobj.h | 2 +- include/wx/msw/winundef.h | 17 ++++++++++++++++- include/wx/string.h | 2 +- samples/dde/client.cpp | 3 +-- samples/makefile.vc | 12 ++++++++++++ src/msw/brush.cpp | 2 +- src/msw/font.cpp | 2 +- src/msw/makefile.b32 | 4 ++++ src/msw/makefile.bcc | 3 +++ src/msw/makefile.dos | 6 ++++++ src/msw/makefile.g95 | 1 + src/msw/makefile.sc | 1 + src/msw/makefile.sl | 4 ++++ src/msw/makefile.twn | 1 + src/msw/makefile.vc | 1 + src/msw/makefile.wat | 4 ++++ 20 files changed, 62 insertions(+), 11 deletions(-) diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h index 7d8ee8cb1c..9e57b50785 100644 --- a/include/wx/generic/treectrl.h +++ b/include/wx/generic/treectrl.h @@ -405,7 +405,7 @@ public: void Unselect(); void UnselectAll(); // select this item - void SelectItem(const wxTreeItemId& item, bool unselect_others=true, bool extended_select=false); + void SelectItem(const wxTreeItemId& item, bool unselect_others=TRUE, bool extended_select=FALSE); // make sure this item is visible (expanding the parent item and/or // scrolling to this item if necessary) void EnsureVisible(const wxTreeItemId& item); diff --git a/include/wx/log.h b/include/wx/log.h index af0a164dd6..2c9e5ccb33 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -449,7 +449,7 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); #define __TFILE__ __XFILE__(__FILE__) #endif -#if __WXDEBUG__ +#ifdef __WXDEBUG__ // make life easier for people using VC++ IDE: clicking on the message // will take us immediately to the place of the failed API #ifdef __VISUALC__ diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index 5805a69252..05ae288300 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -70,7 +70,7 @@ public: bool RealizeResource(void); WXHANDLE GetResourceHandle(void) ; bool FreeResource(bool force = FALSE); - bool IsFree(void); + bool IsFree() const; void Unshare(); }; diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index c210aed28c..a7a6609d2f 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -68,7 +68,7 @@ public: virtual bool ReleaseResource(void); */ - virtual bool IsFree(void); + virtual bool IsFree() const; virtual bool Ok(void) const { return (m_refData != NULL) ; } inline int GetPointSize(void) const { return M_FONTDATA->m_pointSize; } diff --git a/include/wx/msw/gdiobj.h b/include/wx/msw/gdiobj.h index 1950d12ffe..8f79cd0133 100644 --- a/include/wx/msw/gdiobj.h +++ b/include/wx/msw/gdiobj.h @@ -48,7 +48,7 @@ DECLARE_DYNAMIC_CLASS(wxGDIObject) // Frees the resource virtual bool FreeResource(bool WXUNUSED(force) = FALSE) { return FALSE; }; - virtual bool IsFree(void) { return FALSE; }; + virtual bool IsFree(void) const { return FALSE; }; inline bool IsNull(void) const { return (m_refData == 0); } diff --git a/include/wx/msw/winundef.h b/include/wx/msw/winundef.h index 59d8d7a35a..7e2b26daa6 100644 --- a/include/wx/msw/winundef.h +++ b/include/wx/msw/winundef.h @@ -20,6 +20,7 @@ #undef GetCharWidth #endif +#ifndef __WIN16__ inline BOOL GetCharWidth(HDC dc, UINT first, UINT last, LPINT buffer) { #ifdef _UNICODE @@ -28,6 +29,7 @@ inline BOOL GetCharWidth(HDC dc, UINT first, UINT last, LPINT buffer) return GetCharWidthA(dc, first, last, buffer); #endif } +#endif // FindWindow @@ -35,6 +37,7 @@ inline BOOL GetCharWidth(HDC dc, UINT first, UINT last, LPINT buffer) #undef FindWindow #endif +#ifndef __WIN16__ #ifdef _UNICODE inline HWND FindWindow(LPCWSTR classname, LPCWSTR windowname) { @@ -46,6 +49,7 @@ inline HWND FindWindow(LPCSTR classname, LPCSTR windowname) return FindWindowA(classname, windowname); } #endif +#endif // GetClassName @@ -53,6 +57,7 @@ inline HWND FindWindow(LPCSTR classname, LPCSTR windowname) #undef GetClassName #endif +#ifndef __WIN16__ #ifdef _UNICODE inline int GetClassName(HWND h, LPWSTR classname, int maxcount) { @@ -64,6 +69,7 @@ inline int GetClassName(HWND h, LPSTR classname, int maxcount) return GetClassNameA(h, classname, maxcount); } #endif +#endif // GetClassInfo @@ -71,6 +77,7 @@ inline int GetClassName(HWND h, LPSTR classname, int maxcount) #undef GetClassInfo #endif +#ifndef __WIN16__ #ifdef _UNICODE inline BOOL GetClassInfo(HINSTANCE h, LPCWSTR name, LPWNDCLASSW winclass) { @@ -82,6 +89,7 @@ inline BOOL GetClassInfo(HINSTANCE h, LPCSTR name, LPWNDCLASSA winclass) return GetClassInfoA(h, name, winclass); } #endif +#endif // LoadAccelerators @@ -89,6 +97,7 @@ inline BOOL GetClassInfo(HINSTANCE h, LPCSTR name, LPWNDCLASSA winclass) #undef LoadAccelerators #endif +#ifndef __WIN16__ #ifdef _UNICODE inline HACCEL LoadAccelerators(HINSTANCE h, LPCWSTR name) { @@ -100,7 +109,7 @@ inline HACCEL LoadAccelerators(HINSTANCE h, LPCSTR name) return LoadAcceleratorsA(h, name); } #endif - +#endif // GetWindowProc... this isn't a Windows API function?!?! //ifdef GetWindowProc @@ -114,6 +123,7 @@ inline HACCEL LoadAccelerators(HINSTANCE h, LPCSTR name) #undef DrawText #endif +#ifndef __WIN16__ #ifdef _UNICODE inline int DrawText(HDC h, LPCWSTR str, int count, LPRECT rect, UINT format) { @@ -125,6 +135,7 @@ inline int DrawText(HDC h, LPCSTR str, int count, LPRECT rect, UINT format) return DrawTextA(h, str, count, rect, format); } #endif +#endif // StartDoc @@ -132,6 +143,7 @@ inline int DrawText(HDC h, LPCSTR str, int count, LPRECT rect, UINT format) #undef StartDoc #endif +#ifndef __WIN16__ #ifdef _UNICODE inline int StartDoc(HDC h, CONST DOCINFOW* info) { @@ -143,6 +155,7 @@ inline int StartDoc(HDC h, CONST DOCINFOA* info) return StartDocA(h, info); } #endif +#endif // GetFirstChild... not a Windows API Function!?!?! //ifdef GetFirstChild @@ -163,6 +176,7 @@ inline int StartDoc(HDC h, CONST DOCINFOA* info) #undef GetObject #endif +#ifndef __WIN16__ inline int GetObject(HGDIOBJ h, int i, LPVOID buffer) { #ifdef _UNICODE @@ -171,5 +185,6 @@ inline int GetObject(HGDIOBJ h, int i, LPVOID buffer) return GetObjectA(h, i, buffer); #endif } +#endif #endif // _WX_WINUNDEF_H_ diff --git a/include/wx/string.h b/include/wx/string.h index c3992d5f47..fa68ee7ccf 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -575,7 +575,7 @@ public: // case-sensitive comparison (returns a value < 0, = 0 or > 0) int Cmp(const wxChar *psz) const { return wxStrcmp(c_str(), psz); } // same as Cmp() but not case-sensitive - int CmpNoCase(const wxChar *psz) const { return wxStricmp(c_str(), psz); } + int CmpNoCase(const wxChar *psz) const { return Stricmp(c_str(), psz); } // test for the string equality, either considering case or not // (if compareWithCase then the case matters) bool IsSameAs(const wxChar *psz, bool compareWithCase = TRUE) const diff --git a/samples/dde/client.cpp b/samples/dde/client.cpp index 01430071ab..1422e850cb 100644 --- a/samples/dde/client.cpp +++ b/samples/dde/client.cpp @@ -79,8 +79,7 @@ bool MyApp::OnInit() frame->Fit(); wxString server = "4242"; - wxString hostName; - wxGetHostName(hostName); + wxString hostName = wxGetHostName(); if (argc > 1) server = argv[1]; diff --git a/samples/makefile.vc b/samples/makefile.vc index a3efddc975..2eb883cff6 100644 --- a/samples/makefile.vc +++ b/samples/makefile.vc @@ -91,6 +91,12 @@ all: cd $(WXDIR)\samples\dde nmake -f client.vc FINAL=$(FINAL) nmake -f server.vc FINAL=$(FINAL) + cd $(WXDIR)\samples\caret + nmake -f makefile.vc FINAL=$(FINAL) + cd $(WXDIR)\samples\drawing + nmake -f makefile.vc FINAL=$(FINAL) + cd $(WXDIR)\samples\scroll + nmake -f makefile.vc FINAL=$(FINAL) # cd $(WXDIR)\samples\regtest # nmake -f makefile.vc FINAL=$(FINAL) @@ -162,5 +168,11 @@ clean: cd $(WXDIR)\samples\dde nmake -f client.vc clean nmake -f server.vc clean + cd $(WXDIR)\samples\caret + nmake -f makefile.vc clean + cd $(WXDIR)\samples\drawing + nmake -f makefile.vc clean + cd $(WXDIR)\samples\scroll + nmake -f makefile.vc clean cd $(WXDIR)\samples diff --git a/src/msw/brush.cpp b/src/msw/brush.cpp index 9c33fc9edd..486caf5827 100644 --- a/src/msw/brush.cpp +++ b/src/msw/brush.cpp @@ -179,7 +179,7 @@ bool wxBrush::FreeResource(bool WXUNUSED(force)) else return FALSE; } -bool wxBrush::IsFree(void) +bool wxBrush::IsFree() const { return (M_BRUSHDATA && (M_BRUSHDATA->m_hBrush == 0)); } diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 47f4ac63fa..d6c84ee3b6 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -232,7 +232,7 @@ WXHANDLE wxFont::GetResourceHandle() return (WXHANDLE)M_FONTDATA->m_hFont ; } -bool wxFont::IsFree() +bool wxFont::IsFree() const { return (M_FONTDATA && (M_FONTDATA->m_hFont == 0)); } diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index a9b92c3a4f..fad700852b 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -76,6 +76,7 @@ GENERICOBJS= \ $(MSWDIR)\gridg.obj \ $(MSWDIR)\laywin.obj \ $(MSWDIR)\panelg.obj \ + $(MSWDIR)\progdlgg.obj \ $(MSWDIR)\prop.obj \ $(MSWDIR)\proplist.obj \ $(MSWDIR)\propform.obj \ @@ -642,6 +643,8 @@ $(MSWDIR)\msgdlgg.obj: $(GENDIR)\msgdlgg.$(SRCSUFF) $(MSWDIR)\panelg.obj: $(GENDIR)\panelg.$(SRCSUFF) +$(MSWDIR)\progdlgg.obj: $(GENDIR)\progdlgg.$(SRCSUFF) + $(MSWDIR)\prop.obj: $(GENDIR)\prop.$(SRCSUFF) $(MSWDIR)\proplist.obj: $(GENDIR)\proplist.$(SRCSUFF) @@ -728,6 +731,7 @@ $(CFG): makefile.b32 -X -w-par -w-aus +-w-hid # virtual function A hides virtual function B -WE -tWM diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc index f81c855d3c..30b77448a2 100644 --- a/src/msw/makefile.bcc +++ b/src/msw/makefile.bcc @@ -79,6 +79,7 @@ GENERICOBJS= \ $(MSWDIR)\listctrl.obj \ $(MSWDIR)\notebook.obj \ $(MSWDIR)\panelg.obj \ + $(MSWDIR)\progdlgg.obj \ $(MSWDIR)\prop.obj \ $(MSWDIR)\propform.obj \ $(MSWDIR)\proplist.obj \ @@ -619,6 +620,8 @@ $(MSWDIR)\printps.obj: $(GENDIR)\printps.$(SRCSUFF) $(MSWDIR)\prntdlgg.obj: $(GENDIR)\prntdlgg.$(SRCSUFF) +$(MSWDIR)\progdlgg.obj: $(GENDIR)\progdlgg.$(SRCSUFF) + $(MSWDIR)\prop.obj: $(GENDIR)\prop.$(SRCSUFF) $(MSWDIR)\proplist.obj: $(GENDIR)\proplist.$(SRCSUFF) diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index a23c1db6a0..fbcde4675f 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -62,6 +62,7 @@ GENERICOBJS= \ $(GENDIR)\listctrl.obj \ $(GENDIR)\notebook.obj \ $(GENDIR)\panelg.obj \ + $(GENDIR)\progdlgg.obj \ $(GENDIR)\prop.obj \ $(GENDIR)\propform.obj \ $(GENDIR)\proplist.obj \ @@ -1031,6 +1032,11 @@ $(GENDIR)/prntdlgg.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(GENDIR)/progdlgg.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(GENDIR)/prop.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index 8f03001751..3b55706fbe 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -59,6 +59,7 @@ GENERICOBJS= \ $(GENDIR)/gridg.$(OBJSUFF) \ $(GENDIR)/laywin.$(OBJSUFF) \ $(GENDIR)/panelg.$(OBJSUFF) \ + $(GENDIR)/progdlgg.$(OBJSUFF) \ $(GENDIR)/prop.$(OBJSUFF) \ $(GENDIR)/propform.$(OBJSUFF) \ $(GENDIR)/proplist.$(OBJSUFF) \ diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc index aaef34a102..d2d9a93acb 100644 --- a/src/msw/makefile.sc +++ b/src/msw/makefile.sc @@ -26,6 +26,7 @@ GENERICOBJS= \ $(GENDIR)\gridg.obj \ $(GENDIR)\laywin.obj \ $(GENDIR)\panelg.obj \ + $(GENDIR)\progdlgg.obj \ $(GENDIR)\prop.obj \ $(GENDIR)\propform.obj \ $(GENDIR)\proplist.obj \ diff --git a/src/msw/makefile.sl b/src/msw/makefile.sl index 26f4d60a72..223b7608be 100644 --- a/src/msw/makefile.sl +++ b/src/msw/makefile.sl @@ -22,6 +22,7 @@ GENERICOBJS= choicdgg.obj \ laywin.obj \ panelg.obj \ prop.obj \ + progdlgg.obj \ propform.obj \ proplist.obj \ sashwin.obj \ @@ -737,6 +738,9 @@ panelg.obj: $(GENDIR)\panelg.cpp printps.obj: $(GENDIR)\printps.cpp $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\printps.cpp /BINARY printps.obj +progdlgg.obj: $(GENDIR)\progdlgg.cpp + $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\progdlgg.cpp /BINARY progdlgg.obj + prop.obj: $(GENDIR)\prop.cpp $(CCC) $(CPPFLAGS) $(IFLAGS) $(GENDIR)\prop.cpp /BINARY prop.obj diff --git a/src/msw/makefile.twn b/src/msw/makefile.twn index c30815250d..3a70a7d5f6 100644 --- a/src/msw/makefile.twn +++ b/src/msw/makefile.twn @@ -61,6 +61,7 @@ GENERICOBJS= \ $(GENDIR)/gridg.$(OBJSUFF) \ $(GENDIR)/laywin.$(OBJSUFF) \ $(GENDIR)/panelg.$(OBJSUFF) \ + $(GENDIR)/progdlgg.$(OBJSUFF) \ $(GENDIR)/prop.$(OBJSUFF) \ $(GENDIR)/propform.$(OBJSUFF) \ $(GENDIR)/proplist.$(OBJSUFF) \ diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index 3d4db3d282..8303dca518 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -70,6 +70,7 @@ GENERICOBJS= \ ..\generic\$D\gridg.obj \ ..\generic\$D\laywin.obj \ ..\generic\$D\panelg.obj \ + ..\generic\$D\progdlgg.obj \ ..\generic\$D\prop.obj \ ..\generic\$D\propform.obj \ ..\generic\$D\proplist.obj \ diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index ca78747f3c..c77adfa14f 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -30,6 +30,7 @@ GENERICOBJS= choicdgg.obj & gridg.obj & laywin.obj & panelg.obj & + progdlgg.obj & prop.obj & propform.obj & proplist.obj & @@ -759,6 +760,9 @@ panelg.obj: $(GENDIR)\panelg.cpp printps.obj: $(GENDIR)\printps.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +progdlgg.obj: $(GENDIR)\progdlgg.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + prop.obj: $(GENDIR)\prop.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -- 2.45.2