-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_rangeMax = range;
- 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;
-
- HWND wx_button =
- CreateWindowEx(exStyle, PROGRESS_CLASS, NULL, msFlags,
- 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId,
- wxGetInstance(), NULL);
-
- m_hWnd = (WXHWND)wx_button;
-
- SetBackgroundColour(parent->GetBackgroundColour());
- SetForegroundColour(parent->GetForegroundColour());
-
- // Subclass again for purposes of dialog editing mode
- SubclassWin((WXHWND) wx_button);
-
- SendMessage((HWND) GetHWND(), PBM_SETRANGE, 0, MAKELPARAM(0, range));