GetScrollBarCtrl( ) alternative api in win32.
-
Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?
-
Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?
What do you mean, exactly (Usually, when using
Win32 API
, you have the window handle of the scrollbar, to deal with)? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?
zakkas2483 wrote:
I wanted to know,that is Edit control's scroll bar enabled from win32 code?
bool IsVScrollEnabled( HWND hEdit ) { return (( ::GetWindowLong(hEdit, GWL_STYLE) & WS_VSCROLL ) == WS_VSCROLL ); }
Same for hscroll, hope this helps?Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com
-
What do you mean, exactly (Usually, when using
Win32 API
, you have the window handle of the scrollbar, to deal with)? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]I am having one Edit Control on my application and edit control having VScroll bar in disable mode. at one stage i need to know that this Vscroll is enabled or not? for that i need handle of VScroll bar. Thank You.
modified on Friday, May 29, 2009 8:13 AM
-
zakkas2483 wrote:
I wanted to know,that is Edit control's scroll bar enabled from win32 code?
bool IsVScrollEnabled( HWND hEdit ) { return (( ::GetWindowLong(hEdit, GWL_STYLE) & WS_VSCROLL ) == WS_VSCROLL ); }
Same for hscroll, hope this helps?Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com
Thank you.. I am having problem with the solution. Initially Edit control having v-scroll in disable mode. Your solution will give true even scroll bar is disable.
-
Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?
I am having code in MFC. DWORD dwStyle = GetStyle(); CScrollBar* pBar = GetScrollBarCtrl(SB_VERT); bool bHasVertBar = ((pBar != NULL) && pBar->IsWindowEnabled()) || (dwStyle & WS_VSCROLL); I need same code in Win32. Probably this MFC code will help other to understand my question. Thank You.
-
I am having code in MFC. DWORD dwStyle = GetStyle(); CScrollBar* pBar = GetScrollBarCtrl(SB_VERT); bool bHasVertBar = ((pBar != NULL) && pBar->IsWindowEnabled()) || (dwStyle & WS_VSCROLL); I need same code in Win32. Probably this MFC code will help other to understand my question. Thank You.
Well, you may have a look at
MFC
source code... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Well, you may have a look at
MFC
source code... :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Thank you... :)