SetFont(* parent->GetFont());
- // Subclass again for purposes of dialog editing mode
SubclassWin((WXHWND)m_hWnd);
-/* Label will be the same as button font now.
- if (labelFont)
- {
- labelFont->RealizeResource();
- if (labelFont->GetResourceHandle())
- SendMessage(ms_handle,WM_SETFONT,
- (WPARAM)labelFont->GetResourceHandle(),0L);
- }
-*/
-
// Some radio boxes test consecutive id.
(void)NewControlId() ;
m_radioButtons = new WXHWND[n];
0,0,0,0,
(HWND) parent->GetHWND(), (HMENU) m_windowId, wxGetInstance(), NULL) ;
-/*
- if (labelFont)
- {
- labelFont->RealizeResource();
- if (labelFont->GetResourceHandle())
- SendMessage(ms_handle,WM_SETFONT,
- (WPARAM)labelFont->GetResourceHandle(),0L);
- }
-*/
the_handle = (HWND) parent->GetHWND();
#if CTL3D
void wxRadioBox::SetFocus(void)
{
-/*
- if (m_noItems > 0)
- ::SetFocus((HWND) m_radioButtons[0]);
-*/
-/* Begin Alberts Patch 26. 5. 1997*/
if (m_noItems > 0)
{
if (m_selectedButton == -1)
else
::SetFocus((HWND) m_radioButtons[m_selectedButton]);
}
-/* Ende Alberts Patch*/
}
return FALSE;
}
-/*
-void wxRadioBox::SetLabelFont(wxFont *font)
-{
- // Decrement the usage count of the old label font
- // (we may be able to free it up)
- if (labelFont)
- labelFont->ReleaseResource();
-
- labelFont = font;
-
- // Increment usage count
- if (font)
- font->UseResource();
-
- HWND hWnd = GetHWND();
- if (hWnd != 0)
- {
- if (font)
- {
- font->RealizeResource();
-
- if (font->GetResourceHandle())
- SendMessage(hWnd, WM_SETFONT,
- (WPARAM)font->GetResourceHandle(),TRUE);
- }
- }
-}
-
-*/
-
bool wxRadioBox::ContainsHWND(WXHWND hWnd) const
{
int i;
ProcessCommand (event);
}
+long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+{
+ if (nMsg == WM_NCHITTEST)
+ {
+ int xPos = LOWORD(lParam); // horizontal position of cursor
+ int yPos = HIWORD(lParam); // vertical position of cursor
+
+ ScreenToClient(&xPos, &yPos);
+
+ // Make sure you can drag by the top of the groupbox, but let
+ // other (enclosed) controls get mouse events also
+ if (yPos < 10)
+ return (long)HTCLIENT;
+ }
+
+ return wxControl::MSWWindowProc(nMsg, wParam, lParam);
+}