wndclass2.cbWndExtra = sizeof( DWORD ); // was 4
wndclass2.hInstance = wxhInstance;
wndclass2.hIcon = (HICON) NULL;
- wndclass2.hCursor = (HCURSOR) NULL;
+ wndclass2.hCursor = LoadCursor( (HINSTANCE) NULL, IDC_ARROW );
// wndclass2.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1) ;
wndclass2.hbrBackground = (HBRUSH) GetStockObject( LTGRAY_BRUSH );
wndclass2.lpszMenuName = NULL;
wndclass3.cbWndExtra = sizeof( DWORD ); // was 4
wndclass3.hInstance = wxhInstance;
wndclass3.hIcon = (HICON) NULL;
- wndclass3.hCursor = (HCURSOR) NULL;
+ wndclass3.hCursor = LoadCursor( (HINSTANCE) NULL, IDC_ARROW );
// wndclass3.hbrBackground = (HBRUSH)(COLOR_WINDOW+1) ;
wndclass3.hbrBackground = (HBRUSH) NULL;
wndclass3.lpszMenuName = NULL;
// It's a labelled toggle
textRadioButton = wxGetWindowText(m_radioButtons[i]);
GetTextExtent(textRadioButton, ¤t_width, &cyf,
- NULL,NULL, & this->GetFont());
+ NULL, NULL, &GetFont());
if ( calcWidth )
- eachWidth = (int)(current_width + RADIO_SIZE);
+ eachWidth = current_width + RADIO_SIZE;
if ( calcHeight )
- eachHeight = (int)((3*cyf)/2);
+ eachHeight = (3*cyf)/2;
}
else
{
totHeight = nbVer * (maxHeight+cy1/2) ;
totWidth = nbHor * (maxWidth+cx1) ;
-#if (!wxUSE_CTL3D)
+#if !defined(__WIN32__) && (!wxUSE_CTL3D)
// Requires a bigger group box in plain Windows
MoveWindow((HWND) m_hWnd,x_offset,y_offset,totWidth+cx1,totHeight+(3*cy1)/2,TRUE) ;
#else
y_offset += cy1;
}
-#if (!wxUSE_CTL3D)
+#if !defined(__WIN32__) && (!wxUSE_CTL3D)
y_offset += (int)(cy1/2); // Fudge factor since buttons overlapped label
// JACS 2/12/93. CTL3D draws group label quite high.
#endif
y_offset += cy1/2 ;
}
}
- int eachWidth ;
- int eachHeight ;
- if (m_radioWidth[i]<0)
+
+ int eachWidth;
+ int eachHeight;
+
+ if ( m_radioWidth[i] < 0 )
{
// It's a labeled item
textRadioButton = wxGetWindowText(m_radioButtons[i]);
GetTextExtent(textRadioButton, ¤t_width, &cyf,
NULL,NULL, & this->GetFont());
- // How do we find out radio button bitmap size!!
- // By adjusting them carefully, manually :-)
- eachWidth = (int)(current_width + RADIO_SIZE);
- eachHeight = (int)((3*cyf)/2);
+ eachWidth = current_width + RADIO_SIZE;
+ eachHeight = (3*cyf)/2;
}
else
{
eachHeight = m_radioHeight[i] ;
}
- MoveWindow((HWND) m_radioButtons[i],x_offset,y_offset,eachWidth,eachHeight,TRUE);
+ MoveWindow((HWND)m_radioButtons[i], x_offset, y_offset,
+ eachWidth,eachHeight,TRUE);
+ if ( m_windowStyle & wxRA_VERTICAL )
if (m_windowStyle & wxRA_SPECIFY_ROWS)
{
y_offset += maxHeight;
- if (m_radioWidth[0]>0)
+ if ( m_radioWidth[0] > 0 )
y_offset += cy1/2 ;
}
else
+ {
x_offset += maxWidth + cx1;
+ }
}
}
#endif
wxCHECK_RET( gs_wxBusyCursorCount > 0,
"no matching wxBeginBusyCursor() for wxEndBusyCursor()" );
- gs_wxBusyCursorCount--;
if ( --gs_wxBusyCursorCount == 0 )
{
::SetCursor(gs_wxBusyCursorOld);
m_windowStyle = 0;
m_windowParent = NULL;
m_windowEventHandler = this;
- m_windowCursor = *wxSTANDARD_CURSOR;
m_children = new wxList;
m_doubleClickAllowed = 0 ;
m_winCaptured = FALSE;
case WM_SETCURSOR:
{
- HCURSOR hcursor = 0;
- if ( wxIsBusy() )
+ // don't set cursor when the mouse is not in the client part
+ short nHitTest = LOWORD(lParam);
+ if ( nHitTest == HTCLIENT || nHitTest == HTERROR )
{
- extern HCURSOR gs_wxBusyCursor; // from msw\utils.cpp
+ HCURSOR hcursor = 0;
+ if ( wxIsBusy() )
+ {
+ extern HCURSOR gs_wxBusyCursor; // from msw\utils.cpp
- hcursor = gs_wxBusyCursor;
- }
- else
- {
- extern wxCursor *g_globalCursor; // from msw\data.cpp
+ hcursor = gs_wxBusyCursor;
+ }
+ else if ( m_windowCursor.Ok() )
+ {
+ hcursor = (HCURSOR)m_windowCursor.GetHCURSOR();
+ }
+ else
+ {
+ extern wxCursor *g_globalCursor; // from msw\data.cpp
- if ( g_globalCursor && g_globalCursor->Ok() )
- hcursor = (HCURSOR)g_globalCursor->GetHCURSOR();
- }
+ if ( g_globalCursor && g_globalCursor->Ok() )
+ hcursor = (HCURSOR)g_globalCursor->GetHCURSOR();
+ }
- if ( hcursor )
- {
- ::SetCursor(hcursor);
+ if ( hcursor )
+ {
+ ::SetCursor(hcursor);
- // returning TRUE stops the DefWindowProc() from further
- // processing this message - exactly what we need because we've
- // just set the cursor
- return TRUE;
+ // returning TRUE stops the DefWindowProc() from further
+ // processing this message - exactly what we need because
+ // we've just set the cursor
+ return TRUE;
+ }
}
}
- break; // leave it to DefWindowProc()
+ return MSWDefWindowProc(message, wParam, lParam );
default:
return MSWDefWindowProc(message, wParam, lParam );
void wxWindow::MSWOnMouseMove(int x, int y, WXUINT flags)
{
// 'normal' move event...
- // Set cursor, but only if we're not in 'busy' mode
-
- // Trouble with this is that it sets the cursor for controls too :-(
- if (m_windowCursor.Ok() && !wxIsBusy())
- ::SetCursor((HCURSOR) m_windowCursor.GetHCURSOR());
if (!m_mouseInWindow)
{