More scrolling work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -552,7 +552,8 @@ private:
|
|||||||
DECLARE_NO_COPY_CLASS(wxWindow);
|
DECLARE_NO_COPY_CLASS(wxWindow);
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
private:
|
private:
|
||||||
HWND m_hWndScrollBar;
|
HWND m_hWndScrollBarHorz;
|
||||||
|
HWND m_hWndScrollBarVert;
|
||||||
|
|
||||||
// Virtual function hiding supression
|
// Virtual function hiding supression
|
||||||
inline virtual bool Reparent(wxWindowBase* pNewParent)
|
inline virtual bool Reparent(wxWindowBase* pNewParent)
|
||||||
|
@@ -273,9 +273,10 @@ void wxWindow::Init()
|
|||||||
//
|
//
|
||||||
// wxWnd
|
// wxWnd
|
||||||
//
|
//
|
||||||
m_hMenu = 0L;
|
m_hMenu = 0L;
|
||||||
m_hWnd = 0L;
|
m_hWnd = 0L;
|
||||||
m_hWndScrollBar = 0L;
|
m_hWndScrollBarHorz = 0L;
|
||||||
|
m_hWndScrollBarVert = 0L;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pass WM_GETDLGCODE to DefWindowProc()
|
// Pass WM_GETDLGCODE to DefWindowProc()
|
||||||
@@ -710,51 +711,99 @@ void wxWindow::SetScrollbar(
|
|||||||
if (nOrient == wxHORIZONTAL )
|
if (nOrient == wxHORIZONTAL )
|
||||||
{
|
{
|
||||||
ulStyle |= SBS_HORZ;
|
ulStyle |= SBS_HORZ;
|
||||||
if (m_hWndScrollBar == 0L)
|
if (m_hWndScrollBarHorz == 0L)
|
||||||
{
|
{
|
||||||
m_hWndScrollBar = ::WinCreateWindow( hWnd
|
m_hWndScrollBarHorz = ::WinCreateWindow( hWnd
|
||||||
,WC_SCROLLBAR
|
,WC_SCROLLBAR
|
||||||
,(PSZ)NULL
|
,(PSZ)NULL
|
||||||
,ulStyle
|
,ulStyle
|
||||||
,vRect.xLeft
|
,vRect.xLeft
|
||||||
,vRect.yBottom
|
,vRect.yBottom
|
||||||
,vRect.xRight - vRect.xLeft
|
,vRect.xRight - vRect.xLeft
|
||||||
,20
|
,20
|
||||||
,hWnd
|
,hWnd
|
||||||
,HWND_TOP
|
,HWND_TOP
|
||||||
,-1
|
,-1
|
||||||
,&vInfo
|
,&vInfo
|
||||||
,NULL
|
,NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
::WinSendMsg(m_hWndScrollBar, SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, (SHORT)nRange1));
|
RECTL vRect2;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Only want to resize the scrollbar if it changes, otherwise
|
||||||
|
// we'd probably end up in a recursive loop until we crash the call stack
|
||||||
|
// because this method is called in a ScrolledWindow OnSize event and SWP_MOVE | SWP_SIZE
|
||||||
|
// generates those events.
|
||||||
|
//
|
||||||
|
::WinQueryWindowRect(m_hWndScrollBarHorz, &vRect2);
|
||||||
|
if (!(vRect2.xLeft == vRect.xLeft &&
|
||||||
|
vRect2.xRight == vRect.xRight &&
|
||||||
|
vRect2.yBottom == vRect.yBottom &&
|
||||||
|
vRect2.yTop == vRect.yTop
|
||||||
|
) )
|
||||||
|
{
|
||||||
|
::WinSetWindowPos( m_hWndScrollBarHorz
|
||||||
|
,HWND_TOP
|
||||||
|
,vRect.xLeft
|
||||||
|
,vRect.yBottom
|
||||||
|
,vRect.xRight - vRect.xLeft
|
||||||
|
,20
|
||||||
|
,SWP_ACTIVATE | SWP_MOVE | SWP_SIZE | SWP_SHOW
|
||||||
|
);
|
||||||
|
}
|
||||||
|
::WinSendMsg(m_hWndScrollBarHorz, SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, (SHORT)nRange1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ulStyle |= SBS_VERT;
|
ulStyle |= SBS_VERT;
|
||||||
if (m_hWndScrollBar == 0L)
|
if (m_hWndScrollBarVert == 0L)
|
||||||
{
|
{
|
||||||
m_hWndScrollBar = ::WinCreateWindow( hWnd
|
m_hWndScrollBarVert = ::WinCreateWindow( hWnd
|
||||||
,WC_SCROLLBAR
|
,WC_SCROLLBAR
|
||||||
,(PSZ)NULL
|
,(PSZ)NULL
|
||||||
,ulStyle
|
,ulStyle
|
||||||
,vRect.xRight - 20
|
,vRect.xRight - 20
|
||||||
,vRect.yBottom
|
,vRect.yBottom
|
||||||
,20
|
,20
|
||||||
,vRect.yTop - vRect.yBottom
|
,vRect.yTop - vRect.yBottom
|
||||||
,hWnd
|
,hWnd
|
||||||
,HWND_TOP
|
,HWND_TOP
|
||||||
,-1
|
,-1
|
||||||
,&vInfo
|
,&vInfo
|
||||||
,NULL
|
,NULL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
::WinSendMsg(m_hWndScrollBar, SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, (SHORT)nRange1));
|
RECTL vRect2;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Only want to resize the scrollbar if it changes, otherwise
|
||||||
|
// we'd probably end up in a recursive loop until we crash the call stack
|
||||||
|
// because this method is called in a ScrolledWindow OnSize event and SWP_MOVE | SWP_SIZE
|
||||||
|
// generates those events.
|
||||||
|
//
|
||||||
|
::WinQueryWindowRect(m_hWndScrollBarVert, &vRect2);
|
||||||
|
if (!(vRect2.xLeft == vRect.xLeft &&
|
||||||
|
vRect2.xRight == vRect.xRight &&
|
||||||
|
vRect2.yBottom == vRect.yBottom &&
|
||||||
|
vRect2.yTop == vRect.yTop
|
||||||
|
) )
|
||||||
|
{
|
||||||
|
::WinSetWindowPos( m_hWndScrollBarVert
|
||||||
|
,HWND_TOP
|
||||||
|
,vRect.xRight - 20
|
||||||
|
,vRect.yBottom
|
||||||
|
,20
|
||||||
|
,vRect.yTop - vRect.yBottom
|
||||||
|
,SWP_ACTIVATE | SWP_MOVE | SWP_SIZE | SWP_SHOW
|
||||||
|
);
|
||||||
|
}
|
||||||
|
::WinSendMsg(m_hWndScrollBarVert, SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, (SHORT)nRange1));
|
||||||
}
|
}
|
||||||
m_nYThumbSize = nThumbVisible;
|
m_nYThumbSize = nThumbVisible;
|
||||||
}
|
}
|
||||||
|
@@ -9527,8 +9527,6 @@ EXPORTS
|
|||||||
Initialize__20wxHtmlHelpControllerFRC8wxString
|
Initialize__20wxHtmlHelpControllerFRC8wxString
|
||||||
;wxHtmlHelpController::SetFrameParameters(const wxString&,const wxSize&,const wxPoint&,unsigned long)
|
;wxHtmlHelpController::SetFrameParameters(const wxString&,const wxSize&,const wxPoint&,unsigned long)
|
||||||
SetFrameParameters__20wxHtmlHelpControllerFRC8wxStringRC6wxSizeRC7wxPointUl
|
SetFrameParameters__20wxHtmlHelpControllerFRC8wxStringRC6wxSizeRC7wxPointUl
|
||||||
;wxHtmlHelpController::SetBookBasePath(const wxString&,int)
|
|
||||||
SetBookBasePath__20wxHtmlHelpControllerFRC8wxStringi
|
|
||||||
;wxConstructorForwxHtmlHelpController()
|
;wxConstructorForwxHtmlHelpController()
|
||||||
wxConstructorForwxHtmlHelpController__Fv
|
wxConstructorForwxHtmlHelpController__Fv
|
||||||
;wxHtmlHelpController::~wxHtmlHelpController()
|
;wxHtmlHelpController::~wxHtmlHelpController()
|
||||||
|
Reference in New Issue
Block a user