// Created: 29.07.2004
// RCS-ID: $Id$
// Copyright: (c) Wlodzimierz Skiba
-// License: wxWindows licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/spinbutt.h" // for wxSpinnerBestSize
-#if wxUSE_EXTENDED_RTTI
-// TODO
-#else
-IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
-#endif
-
#define GetBuddyHwnd() (HWND)(m_hwndBuddy)
#define IsVertical(wxStyle) ( (wxStyle & wxSP_HORIZONTAL) != wxSP_HORIZONTAL )
// sanity check
wxASSERT_MSG( choice->m_hwndBuddy == hwndBuddy,
- _T("wxChoice has incorrect buddy HWND!") );
+ wxT("wxChoice has incorrect buddy HWND!") );
return choice;
}
sizeText.x -= sizeBtn.x + MARGIN_BETWEEN;
if ( sizeText.x <= 0 )
{
- wxLogDebug(_T("not enough space for wxSpinCtrl!"));
+ wxLogDebug(wxT("not enough space for wxSpinCtrl!"));
}
wxPoint posBtn(pos);
m_hwndBuddy = (WXHWND)::CreateWindowEx
(
exStyle, // sunken border
- _T("LISTBOX"), // window class
+ wxT("LISTBOX"), // window class
NULL, // no window title
msStyle, // style (will be shown later)
pos.x, pos.y, // position
(void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)GetBuddyHwnd(), 0);
// do it after finishing with m_hwndBuddy creation to avoid generating
- // initial wxEVT_COMMAND_TEXT_UPDATED message
+ // initial wxEVT_TEXT message
ms_allChoiceSpins.Add(this);
// initialize the controls contents
int n = GetSelection();
if (n > -1)
{
- wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId);
+ wxCommandEvent event(wxEVT_CHOICE, m_windowId);
event.SetInt(n);
event.SetEventObject(this);
event.SetString(GetStringSelection());
int widthText = width - widthBtn - MARGIN_BETWEEN;
if ( widthText <= 0 )
{
- wxLogDebug(_T("not enough space for wxSpinCtrl!"));
+ wxLogDebug(wxT("not enough space for wxSpinCtrl!"));
}
if ( !::MoveWindow(GetBuddyHwnd(), x, y, widthText, height, TRUE) )