no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -613,55 +613,90 @@ int wxWindow::GetScrollPage(
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (nOrient == wxHORIZONTAL)
|
if (nOrient == wxHORIZONTAL)
|
||||||
return m_xThumbSize;
|
return m_nXThumbSize;
|
||||||
else
|
else
|
||||||
return m_yThumbSize;
|
return m_nYThumbSize;
|
||||||
} // end of wxWindow::GetScrollPage
|
} // end of wxWindow::GetScrollPage
|
||||||
#endif // WXWIN_COMPATIBILITY
|
#endif // WXWIN_COMPATIBILITY
|
||||||
|
|
||||||
int wxWindow::GetScrollPos(int orient) const
|
int wxWindow::GetScrollPos(
|
||||||
|
int nOrient
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
// TODO:
|
return((int)::WinSendMsg(GetHwnd(), SBM_QUERYPOS, (MPARAM)NULL, (MPARAM)NULL));
|
||||||
return(1);
|
} // end of wxWindow::GetScrollPos
|
||||||
}
|
|
||||||
|
|
||||||
int wxWindow::GetScrollRange(int orient) const
|
int wxWindow::GetScrollRange(
|
||||||
|
int nOrient
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
// TODO:
|
MRESULT mr;
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxWindow::GetScrollThumb(int orient) const
|
mr = ::WinSendMsg(GetHwnd(), SBM_QUERYRANGE, (MPARAM)NULL, (MPARAM)NULL);
|
||||||
{
|
return((int)SHORT2FROMMR(mr));
|
||||||
// TODO:
|
} // end of wxWindow::GetScrollRange
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindow::SetScrollPos( int orient
|
int wxWindow::GetScrollThumb(
|
||||||
,int pos
|
int nOrient
|
||||||
,bool refresh
|
) const
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// TODO:
|
WNDPARAMS vWndParams;
|
||||||
}
|
PSBCDATA pSbcd;
|
||||||
|
|
||||||
void wxWindow::SetScrollbar( int orient
|
::WinSendMsg(GetHwnd(), WM_QUERYWINDOWPARAMS, (MPARAM)&vWndParams, (MPARAM)NULL);
|
||||||
,int pos
|
pSbcd = (PSBCDATA)vWndParams.pCtlData;
|
||||||
,int thumbVisible
|
return((int)pSbcd->posThumb);
|
||||||
,int range
|
} // end of wxWindow::GetScrollThumb
|
||||||
,bool refresh
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxWindow::ScrollWindow( int dx
|
void wxWindow::SetScrollPos(
|
||||||
,int dy
|
int nOrient
|
||||||
,const wxRect* rect
|
, int nPos
|
||||||
)
|
, bool bRefresh
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// TODO:
|
::WinSendMsg(GetHwnd(), SBM_SETPOS, (MPARAM)nPos, (MPARAM)NULL);
|
||||||
}
|
} // end of wxWindow::SetScrollPos(
|
||||||
|
|
||||||
|
void wxWindow::SetScrollbar(
|
||||||
|
int nOrient
|
||||||
|
, int nPos
|
||||||
|
, int nThumbVisible
|
||||||
|
, int nRange
|
||||||
|
, bool bRefresh
|
||||||
|
)
|
||||||
|
{
|
||||||
|
::WinSendMsg(GetHwnd(), SBM_SETSCROLLBAR, (MPARAM)nPos, MPFROM2SHORT(0, nRange));
|
||||||
|
if (nOrient == wxHORIZONTAL)
|
||||||
|
{
|
||||||
|
m_nXThumbSize = nThumbVisible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_nYThumbSize = nThumbVisible;
|
||||||
|
}
|
||||||
|
} // end of wxWindow::SetScrollbar
|
||||||
|
|
||||||
|
void wxWindow::ScrollWindow(
|
||||||
|
int nDx
|
||||||
|
, int nDy
|
||||||
|
, const wxRect* pRect
|
||||||
|
)
|
||||||
|
{
|
||||||
|
RECTL vRect2;
|
||||||
|
|
||||||
|
if (pRect)
|
||||||
|
{
|
||||||
|
vRect2.xLeft = pRect->x;
|
||||||
|
vRect2.yTop = pRect->y;
|
||||||
|
vRect2.xRight = pRect->x + pRect->width;
|
||||||
|
vRect2.yBottom = pRect->y + pRect->height;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pRect)
|
||||||
|
::WinScrollWindow(GetHwnd(), (LONG)nDx, (LONG)nDy, &vRect2, NULL, NULLHANDLE, NULL, 0L);
|
||||||
|
else
|
||||||
|
::WinScrollWindow(GetHwnd(), nDx, nDy, NULL, NULL, NULLHANDLE, NULL, 0L);
|
||||||
|
} // end of wxWindow::ScrollWindow
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// subclassing
|
// subclassing
|
||||||
@@ -669,16 +704,18 @@ void wxWindow::ScrollWindow( int dx
|
|||||||
|
|
||||||
void wxWindow::SubclassWin(WXHWND hWnd)
|
void wxWindow::SubclassWin(WXHWND hWnd)
|
||||||
{
|
{
|
||||||
|
HAB hab;
|
||||||
|
HWND hwnd = (HWND)hWnd;
|
||||||
|
|
||||||
wxASSERT_MSG( !m_fnOldWndProc, wxT("subclassing window twice?") );
|
wxASSERT_MSG( !m_fnOldWndProc, wxT("subclassing window twice?") );
|
||||||
|
|
||||||
HWND hwnd = (HWND)hWnd;
|
|
||||||
/*
|
/*
|
||||||
* TODO: implement something like this:
|
* TODO: implement something like this:
|
||||||
* wxCHECK_RET( ::IsWindow(hwnd), wxT("invalid HWND in SubclassWin") );
|
* wxCHECK_RET(::WinIsWindow(hab, hwnd), wxT("invalid HWND in SubclassWin") );
|
||||||
*
|
*
|
||||||
* wxAssociateWinWithHandle(hwnd, this);
|
* wxAssociateWinWithHandle(hwnd, this);
|
||||||
*
|
*
|
||||||
* m_oldWndProc = (WXFARPROC) GetWindowLong(hwnd, GWL_WNDPROC);
|
* m_fnOldWndProc = (WXFARPROC) GetWindowLong(hwnd, GWL_WNDPROC);
|
||||||
* SetWindowLong(hwnd, GWL_WNDPROC, (LONG) wxWndProc);
|
* SetWindowLong(hwnd, GWL_WNDPROC, (LONG) wxWndProc);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
@@ -708,29 +745,20 @@ void wxWindow::UnsubclassWin()
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
// Make a Windows extended style from the given wxWindows window style
|
// Make a Windows extended style from the given wxWindows window style
|
||||||
WXDWORD wxWindow::MakeExtendedStyle(long style, bool eliminateBorders)
|
//
|
||||||
|
WXDWORD wxWindow::MakeExtendedStyle(
|
||||||
|
long lStyle
|
||||||
|
, bool bEliminateBorders
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// TODO:
|
//
|
||||||
WXDWORD exStyle = 0;
|
// PM does not support extended style
|
||||||
/*
|
//
|
||||||
if ( style & wxTRANSPARENT_WINDOW )
|
WXDWORD exStyle = 0;
|
||||||
exStyle |= WS_EX_TRANSPARENT;
|
|
||||||
|
|
||||||
if ( !eliminateBorders )
|
|
||||||
{
|
|
||||||
if ( style & wxSUNKEN_BORDER )
|
|
||||||
exStyle |= WS_EX_CLIENTEDGE;
|
|
||||||
if ( style & wxDOUBLE_BORDER )
|
|
||||||
exStyle |= WS_EX_DLGMODALFRAME;
|
|
||||||
if ( style & wxRAISED_BORDER )
|
|
||||||
exStyle |= WS_EX_WINDOWEDGE;
|
|
||||||
if ( style & wxSTATIC_BORDER )
|
|
||||||
exStyle |= WS_EX_STATICEDGE;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return exStyle;
|
return exStyle;
|
||||||
}
|
} // end of wxWindow::MakeExtendedStyle
|
||||||
|
|
||||||
// Determines whether native 3D effects or CTL3D should be used,
|
// Determines whether native 3D effects or CTL3D should be used,
|
||||||
// applying a default border style if required, and returning an extended
|
// applying a default border style if required, and returning an extended
|
||||||
|
Reference in New Issue
Block a user