使用CEdit的成员函数SetWindowText()设置文本框的内容时,滚动条都会跳回到原点,有没有什么办法能让滚动条不跳回原点,而保持在上一次的位置,使用LineScroll函数只能控制行,不能控制列,效果不太好,有什么高人指点指点!谢谢
解决方案 »
- 请问Schur分解与奇异值分解有什么关系?
- CMFCLinkCtrl和CLinkCtrl刷背景
- C++连接数据库
- 同时生成两个视的问题,谁能帮我侃侃,谢谢!
- 发现一个memcpy的问题,大家看看是不是MS的BUG!!!!!!
- 请问一些软件中的测试是否为最新版本的功能是如何实现的。
- CString Append 的奇怪问题
- 那里有电子版的MFC类库下载
- 在windowns98下,怎样用VC编程直接访问计算机的物理内存? 急!!!
- 当一个机器中有多个cpu是,如何取的cpu的序列号(cpuid)?急急急!3x
- ado调用sql server
- CPen对象如何销毁,为何DeleteObject之后内存没有被释放
SetWindowText()后,通过SetScrollInfo重新设置滚动条的位置GetScrollInfo Function--------------------------------------------------------------------------------The GetScrollInfo function retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).SyntaxBOOL GetScrollInfo( HWND hwnd,
int fnBar,
LPSCROLLINFO lpsi
);
Parametershwnd
[in] Handle to a scroll bar control or a window with a standard scroll bar, depending on the value of the fnBar parameter.
fnBar
[in] Specifies the type of scroll bar for which to retrieve parameters. This parameter can be one of the following values.
SB_CTL
Retrieves the parameters for a scroll bar control. The hwnd parameter must be the handle to the scroll bar control.
SB_HORZ
Retrieves the parameters for the window's standard horizontal scroll bar.
SB_VERT
Retrieves the parameters for the window's standard vertical scroll bar.
lpsi
[in, out] Pointer to a SCROLLINFO structure. Before calling GetScrollInfo, set the cbSize member to sizeof(SCROLLINFO), and set the fMask member to specify the scroll bar parameters to retrieve. Before returning, the function copies the specified parameters to the appropriate members of the structure.
The fMask member can be one or more of the following values.SIF_PAGE
Copies the scroll page to the nPage member of the SCROLLINFO structure pointed to by lpsi.
SIF_POS
Copies the scroll position to the nPos member of the SCROLLINFO structure pointed to by lpsi.
SIF_RANGE
Copies the scroll range to the nMin and nMax members of the SCROLLINFO structure pointed to by lpsi.
SIF_TRACKPOS
Copies the current scroll box tracking position to the nTrackPos member of the SCROLLINFO structure pointed to by lpsi.
Return ValueIf the function retrieved any values, the return value is nonzero.If the function does not retrieve any values, the return value is zero. To get extended error information, call GetLastError.