HWND hwndBtn = (HWND)hWndBtn;
if ( !s_wndprocRadioBtn )
- s_wndprocRadioBtn = (WXFARPROC)::GetWindowLong(hwndBtn, GWL_WNDPROC);
+ s_wndprocRadioBtn = (WXFARPROC)wxGetWindowProc(hwndBtn);
- ::SetWindowLong(hwndBtn, GWL_WNDPROC, (long)wxRadioBtnWndProc);
- ::SetWindowLong(hwndBtn, GWL_USERDATA, (long)this);
+ wxSetWindowProc(hwndBtn, wxRadioBtnWndProc);
+ wxSetWindowUserData(hwndBtn, this);
}
void wxRadioBox::SendNotificationEvent()
// our window proc
// ----------------------------------------------------------------------------
-long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+WXLRESULT wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
switch ( nMsg )
{
wxBrush *brush = wxTheBrushList->FindOrCreateBrush(colBack, wxSOLID);
- return (WXHBRUSH)brush->GetResourceHandle();
+ return (WXLRESULT)brush->GetResourceHandle();
}
#endif // Win32
NMHDR* hdr = (NMHDR *)lParam;
if ( hdr->code == TTN_NEEDTEXT )
{
- wxRadioBox *radiobox = (wxRadioBox *)
- ::GetWindowLong(hwnd, GWL_USERDATA);
+ wxRadioBox *
+ radiobox = (wxRadioBox *)wxGetWindowUserData(hwnd);
wxCHECK_MSG( radiobox, 0,
wxT("radio button without radio box?") );
case WM_KEYDOWN:
{
- wxRadioBox *radiobox = (wxRadioBox *)
- ::GetWindowLong(hwnd, GWL_USERDATA);
+ wxRadioBox *radiobox = (wxRadioBox *)wxGetWindowUserData(hwnd);
wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );
case WM_SETFOCUS:
case WM_KILLFOCUS:
{
- wxRadioBox *radiobox = (wxRadioBox *)
- ::GetWindowLong(hwnd, GWL_USERDATA);
+ wxRadioBox *radiobox = (wxRadioBox *)wxGetWindowUserData(hwnd);
wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );
#ifdef __WIN32__
case WM_HELP:
{
- wxRadioBox *radiobox = (wxRadioBox *)
- ::GetWindowLong(hwnd, GWL_USERDATA);
+ wxRadioBox *radiobox = (wxRadioBox *)wxGetWindowUserData(hwnd);
wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );