wxAcceleratorTable m_vAccelTable;
#endif // wxUSE_ACCEL
- wxFrame* m_pMenuBarFrame;
-
private:
//
// Virtual function hiding suppression
#endif // wxUSE_TOOLTIPS
//
- // We must relay Timer events to wxTimer's processing function
+ // Pass non-system timer messages to the wxTimerProc
//
- if (pMsg->msg == WM_TIMER)
+ if (pMsg->msg == WM_TIMER &&
+ (SHORT1FROMMP(pMsg->mp1) != TID_CURSOR &&
+ SHORT1FROMMP(pMsg->mp1) != TID_FLASHWINDOW &&
+ SHORT1FROMMP(pMsg->mp1) != TID_SCROLL
+ ))
wxTimerProc(NULL, 0, (int)pMsg->mp1, 0);
//
// Subclass again for purposes of dialog editing mode
//
SubclassWin(m_hWnd);
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
SetSize( rPos.x
,rPos.y
,rSize.x
,(PVOID)&lColor
);
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
SetSize( nX
,nY
//
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
int i;
,rsName
))
return FALSE;
- SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
wxModelessWindows.Append(this);
return TRUE;
} // end of wxFrame::Create
{
Append(asChoices[lUi]);
}
- SetFont(pParent->GetFont());
-
+ SetFont(*wxSMALL_FONT);
+
//
// Set standard wxWindows colors for Listbox items and highlighting
//
void wxMenuBar::Init()
{
m_eventHandler = this;
- m_pMenuBarFrame = NULL;
+ m_menuBarFrame = NULL;
m_hMenu = 0;
} // end of wxMenuBar::Init
{
wxCHECK_RET( IsAttached(), wxT("can't refresh unatteched menubar") );
- WinSendMsg(GetWinHwnd(m_pMenuBarFrame), WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0);
+ WinSendMsg(GetWinHwnd(m_menuBarFrame), WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0);
} // end of wxMenuBar::Refresh
WXHMENU wxMenuBar::Create()
//
// Menubars should be associated with a frame otherwise they are popups
//
- if (m_pMenuBarFrame != NULL)
- hFrame = GetWinHwnd(m_pMenuBarFrame);
+ if (m_menuBarFrame != NULL)
+ hFrame = GetWinHwnd(m_menuBarFrame);
else
hFrame = HWND_DESKTOP;
//
,nPos
);
- pMenu->Attach(this);
-
if (IsAttached())
{
::WinSendMsg((HWND)m_hMenu, MM_INSERTITEM, (MPARAM)&pMenu->m_vMenuData, (MPARAM)Title.c_str());
)
{
wxASSERT_MSG( !IsAttached(), wxT("menubar already attached!") );
- m_pMenuBarFrame = pFrame;
+ m_menuBarFrame = pFrame;
#if wxUSE_ACCEL
RebuildAccelTable();
{
::WinDestroyWindow((HWND)m_hMenu);
m_hMenu = (WXHMENU)NULL;
- m_pMenuBarFrame = NULL;
+ m_menuBarFrame = NULL;
} // end of wxMenuBar::Detach
// ---------------------------------------------------------------------------
m_hWnd = (WXHWND)hScrollBar;
SubclassWin(GetHWND());
::WinSetWindowText((HWND)m_hWnd, "");
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
if (m_windowStyle & wxSL_LABELS)
{
//
::WinQueryWindowPos(m_hWnd, &vSwp);
SetXComp(vSwp.x);
SetYComp(vSwp.y);
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
//
// For OS/2 we want to hide the text portion so we can substitute an
// independent text ctrl in its place. 10 device units does this
m_hWndBuddy = m_hWnd; // One in the same for OS/2
if(pParent)
pParent->AddChild((wxSpinButton *)this);
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
::WinQueryWindowPos(m_hWnd, &vSwp);
SetXComp(vSwp.x);
SetYComp(vSwp.y);
// Subclass again for purposes of dialog editing mode
SubclassWin(m_hWnd);
- SetFont(GetParent()->GetFont());
+ SetFont(*wxSMALL_FONT);
SetSize(nX, nY, nWidth, nHeight);
return(FALSE);
}
,sizeof(LONG)
,(PVOID)&lColor
);
- SetFont(pParent->GetFont());
+ SetFont(*wxSMALL_FONT);
SetSize( rPos.x
,rPos.y
,rSize.x
);
SubclassWin(m_hWnd);
- wxControl::SetFont(pParent->GetFont());
+ wxControl::SetFont(*wxSMALL_FONT);
SetSize( nX
,nY
,nWidth
//
// Set font, position, size and initial value
//
- wxFont& vFontParent = pParent->GetFont();
-
- if (vFontParent.Ok())
- {
- SetFont(vFontParent);
- }
- else
- {
- SetFont(wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT));
- }
+ SetFont(*wxSMALL_FONT);
if (!rsValue.IsEmpty())
{
SetValue(rsValue);
wxAssociateWinWithHandle(m_hWnd, this);
wxAssociateWinWithHandle(m_hFrame, this);
- m_backgroundColour.Set(wxString("DARK GREY"));
+ m_backgroundColour.Set(wxString("MEDIUM GREY"));
LONG lColor = (LONG)m_backgroundColour.GetPixel();
{
HWND hwnd = (HWND)hWnd;
- wxASSERT_MSG( !m_fnOldWndProc, wxT("subclassing window twice?") );
wxCHECK_RET(::WinIsWindow(vHabmain, hwnd), wxT("invalid HWND in SubclassWin") );
- m_fnOldWndProc = (WXFARPROC) ::WinSubclassWindow(hwnd, (PFNWP)wxWndProc);
+ wxAssociateWinWithHandle( hWnd
+ ,(wxWindow*)this
+ );
+ if (!wxCheckWindowWndProc( hWnd
+ ,(WXFARPROC)wxWndProc
+ ))
+ {
+ m_fnOldWndProc = (WXFARPROC) ::WinSubclassWindow(hwnd, (PFNWP)wxWndProc);
+ }
+ else
+ {
+ m_fnOldWndProc = (WXFARPROC)NULL;
+ }
} // end of wxWindowOS2::SubclassWin
void wxWindowOS2::UnsubclassWin()
//
if (pParent)
{
- if (IsKindOf(CLASSINFO(wxStatusBar)) &&
- pParent->IsKindOf(CLASSINFO(wxFrame)))
+ if ( pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)) ||
+ pParent->IsKindOf(CLASSINFO(wxScrolledWindow))
+ )
{
- RECTL vRect;
- wxFrame* pFrame = wxDynamicCast(pParent, wxFrame);
+ if (IsKindOf(CLASSINFO(wxStatusBar)) &&
+ pParent->IsKindOf(CLASSINFO(wxFrame)))
+ {
+ RECTL vRect;
+ wxFrame* pFrame = wxDynamicCast(pParent, wxFrame);
- ::WinQueryWindowRect((HWND)pFrame->GetFrame(), &vRect);
- nY = vRect.yTop - (nY + nHeight);
+ ::WinQueryWindowRect((HWND)pFrame->GetFrame(), &vRect);
+ nY = vRect.yTop - (nY + nHeight);
+ }
+ else
+ nY = pParent->GetSize().y - (nY + nHeight);
}
- else
- nY = pParent->GetSize().y - (nY + nHeight);
}
else
{