I've translated that to one that you all can use
For all of you normal developers, the patch is here, along with those for wxDev-C++ users, and if you have Borland Delphi, you can modify the wxDev-C++ source to allow you to use this style.
Code: Select all
===================================================================
Main wxWidgets Patch
===================================================================
Index: include/wx/msw/gauge95.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/include/wx/msw/gauge95.h,v
retrieving revision 1.18
diff -u -r1.18 gauge95.h
--- include/wx/msw/gauge95.h 2005/01/21 18:11:12 1.18
+++ include/wx/msw/gauge95.h 2005/08/18 13:19:31
@@ -18,6 +18,8 @@
#if wxUSE_GAUGE
+#define wxGA_MARQUEE 0x0030
+
extern WXDLLEXPORT_DATA(const wxChar*) wxGaugeNameStr;
// Group box
@@ -54,7 +56,11 @@
// overriden base class virtuals
virtual bool SetForegroundColour(const wxColour& col);
virtual bool SetBackgroundColour(const wxColour& col);
-
+
+ // start or stop a marquee
+ virtual void StartMarquee(int interval);
+ virtual void StopMarquee();
+
protected:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
virtual wxSize DoGetBestSize() const;
Index: src/msw/gauge95.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/msw/gauge95.cpp,v
retrieving revision 1.47
diff -u -r1.47 gauge95.cpp
--- src/msw/gauge95.cpp 2004/08/26 08:46:18 1.47
+++ src/msw/gauge95.cpp 2005/08/18 13:19:59
@@ -159,6 +159,9 @@
if ( style & wxGA_SMOOTH )
msStyle |= PBS_SMOOTH;
+
+ if ( style & wxGA_MARQUEE )
+ msStyle |= PBS_MARQUEE;
return msStyle;
}
@@ -218,6 +221,16 @@
::SendMessage(GetHwnd(), PBM_SETBKCOLOR, 0, (LPARAM)wxColourToRGB(col));
return true;
+}
+
+void wxGauge95::StartMarquee(int interval)
+{
+ SendMessage((HWND)this->GetHWND(), PBM_SETMARQUEE, (WPARAM)true, (LPARAM)interval);
+}
+
+void wxGauge95::StopMarquee()
+{
+ SendMessage((HWND)this->GetHWND(), PBM_SETMARQUEE, (WPARAM)false, (LPARAM)0);
}
#endif // wxUSE_GAUGE
===================================================================
wxDev-C++ Patch
===================================================================
Index: source/components/wxgauge.pas
===================================================================
RCS file: /cvsroot/wxdsgn/wxdevcpp/source/components/wxgauge.pas,v
retrieving revision 1.12
diff -u -r1.12 wxgauge.pas
--- source/components/wxgauge.pas 14 Aug 2005 16:25:09 -0000 1.12
+++ source/components/wxgauge.pas 18 Aug 2005 13:07:22 -0000
@@ -268,6 +268,7 @@
FWx_PropertyList.add('Wx_GaugeStyle : Gauge Styles');
FWx_PropertyList.Add('wxGA_SMOOTH:wxGA_SMOOTH');
+ FWx_PropertyList.Add('wxGA_MARQUEE:wxGA_MARQUEE');
FWx_PropertyList.add('Wx_GaugeOrientation : Orientation');
Index: source/components/wxUtils.pas
===================================================================
RCS file: /cvsroot/wxdsgn/wxdevcpp/source/components/wxUtils.pas,v
retrieving revision 1.19
diff -u -r1.19 wxUtils.pas
--- source/components/wxUtils.pas 14 Aug 2005 16:25:09 -0000 1.19
+++ source/components/wxUtils.pas 18 Aug 2005 13:14:12 -0000
@@ -228,7 +228,7 @@
TWxGagOrientation = (wxGA_HORIZONTAL, wxGA_VERTICAL);
- TWxgagStyleItem = (wxGA_SMOOTH);
+ TWxgagStyleItem = (wxGA_SMOOTH, wxGA_MARQUEE);
TWxgagStyleSet = set of TWxgagStyleItem;
TWxsbtnOrientation = (wxSP_HORIZONTAL, wxSP_VERTICAL);
@@ -1155,6 +1155,9 @@
if wxGA_SMOOTH in stdStyle then
strLst.add('wxGA_SMOOTH');
+ if wxGA_MARQUEE in stdStyle then
+ strLst.add('wxGA_MARQUEE');
+
if strLst.Count = 0 then
Result := ''
else
Just a word of caution: my patch does *0* error checking meaning if you have called SetValue accidentally, prepare for a program crash...
I might have to find a way to fix that, though.