wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
wxFLAGS_MEMBER(wxDOUBLE_BORDER)
wxFLAGS_MEMBER(wxRAISED_BORDER)
wxFLAGS_MEMBER(wxSTATIC_BORDER)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
// standard window styles
wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
wxFLAGS_MEMBER(wxCLIP_CHILDREN)
wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
wxFLAGS_MEMBER(wxWANTS_CHARS)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
wxFLAGS_MEMBER(wxVSCROLL)
wxFLAGS_MEMBER(wxHSCROLL)
IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge, wxControl,"wx/gauge.h")
wxBEGIN_PROPERTIES_TABLE(wxGauge95)
IMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge, wxControl,"wx/gauge.h")
wxBEGIN_PROPERTIES_TABLE(wxGauge95)
- wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
- wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
- wxPROPERTY( ShadowWidth , int , SetShadowWidth, GetShadowWidth, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
- wxPROPERTY( BezelFace , int , SetBezelFace, GetBezelFace, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( ShadowWidth , int , SetShadowWidth, GetShadowWidth, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
+ wxPROPERTY( BezelFace , int , SetBezelFace, GetBezelFace, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY_FLAGS( WindowStyle , wxGaugeStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxPROPERTY_FLAGS( WindowStyle , wxGaugeStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
-bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
- int range,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& wxVALIDATOR_PARAM(validator),
- const wxString& name)
-{
- SetName(name);
-#if wxUSE_VALIDATORS
- SetValidator(validator);
-#endif // wxUSE_VALIDATORS
-
- if (parent) parent->AddChild(this);
- m_gaugePos = 0;
-
- m_windowStyle = style;
-
- if ( id == -1 )
- m_windowId = (int)NewControlId();
- else
- m_windowId = id;
-
- int x = pos.x;
- int y = pos.y;
- int width = size.x;
- int height = size.y;
-
- WXDWORD exStyle = 0;
- long msFlags = MSWGetStyle(style, & exStyle) ;
-
- if (m_windowStyle & wxGA_VERTICAL)
- msFlags |= PBS_VERTICAL;
-
- if (m_windowStyle & wxGA_SMOOTH)
- msFlags |= PBS_SMOOTH;
+// ----------------------------------------------------------------------------
+// wxGauge95 creation
+// ----------------------------------------------------------------------------
- HWND wx_button =
- CreateWindowEx(exStyle, PROGRESS_CLASS, NULL, msFlags,
- 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
- wxGetInstance(), NULL);
+bool wxGauge95::Create(wxWindow *parent,
+ wxWindowID id,
+ int range,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ if ( !CreateControl(parent, id, pos, size, style, validator, name) )
+ return false;
- SetBackgroundColour(parent->GetBackgroundColour());
- SetForegroundColour(parent->GetForegroundColour());
+ SetBackgroundColour(parent->GetBackgroundColour());
+ SetForegroundColour(parent->GetForegroundColour());
- SendMessage(GetHwnd(), PBM_SETRANGE32, 0, r);
+ ::SendMessage(GetHwnd(), PBM_SETRANGE32, 0, r);
- // fall back to PBM_SETRANGE (limited to 16 bits)
- SendMessage(GetHwnd(), PBM_SETRANGE, 0, MAKELPARAM(0, r));
+ // fall back to PBM_SETRANGE (limited to 16 bits)
+ ::SendMessage(GetHwnd(), PBM_SETRANGE, 0, MAKELPARAM(0, r));
- m_gaugePos = pos;
-
- SendMessage(GetHwnd(), PBM_SETPOS, pos, 0);
-}
-
-int wxGauge95::GetShadowWidth() const
-{
- return 0;
-}
-
-int wxGauge95::GetBezelFace() const
-{
- return 0;
-}
-
-int wxGauge95::GetRange() const
-{
- return m_rangeMax;
-}
- SendMessage(GetHwnd(), PBM_SETBARCOLOR, 0, (LPARAM)wxColourToRGB(col));
+ ::SendMessage(GetHwnd(), PBM_SETBARCOLOR, 0, (LPARAM)wxColourToRGB(col));
- SendMessage(GetHwnd(), PBM_SETBKCOLOR, 0, (LPARAM)wxColourToRGB(col));
+ ::SendMessage(GetHwnd(), PBM_SETBKCOLOR, 0, (LPARAM)wxColourToRGB(col));