C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-30-2009, 02:40 AM   #1
Registered User
 
Join Date: Mar 2008
Posts: 57
horizontal scrollbar in listbox

Hello all
im trying to implement horizontal scrollbar in listbox windows
with out any success
this is how my create list box looks like :
Code:
  // Create a child listbox control.
        hWndList = CreateWindowEx(0,
                        "Listbox",
                        "",
                        WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | LBS_NOINTEGRALHEIGHT,
                        0,
                        0,
                        CW_USEDEFAULT,
                        CW_USEDEFAULT,
                        hWndMain,
                        NULL,
                        hinstance,
                        NULL);
and it does create the scroll bar , but when i try to capture the event (WM_HSCROLL)
that looks like this :
Code:
 case WM_HSCROLL:
      {
         int nScrollCode = (int) LOWORD(wParam);  // scroll bar value
         int nPos = (short int) HIWORD(wParam);   // scroll box position
		  
         SetScrollPos(hWndList,
                      nScrollCode,
                      nPos,
                      true);
		  
		 
      }
but the scroll bar does not moving any where when i click or try to move it to the right .
what im missing here ?
umen242 is offline   Reply With Quote
Old 06-30-2009, 07:02 AM   #2
Registered User
 
Join Date: Dec 2007
Posts: 146
I believe you need to send the LB_SETHORIZONTALEXTENT message to the list box.
DaveH is offline   Reply With Quote
Old 06-30-2009, 07:42 AM   #3
Registered User
 
Join Date: Mar 2008
Posts: 57
where do i need to do it ?

And how ?
umen242 is offline   Reply With Quote
Old 06-30-2009, 08:40 AM   #4
Registered User
 
Join Date: Dec 2007
Posts: 146
Google is your friend. Do some research yourself.
DaveH is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to active the scrollbar on ListBox manually ? ralph23 C++ Programming 2 03-10-2006 09:29 PM
CTreeCtrl horizontal scrollbar eXistenZ C++ Programming 0 08-21-2005 11:35 AM
How to cast a ListBox item to an int for a switch statment? Swaine777 C++ Programming 8 09-26-2004 08:52 PM
Listbox control with horizontal scrollbar Ward Windows Programming 1 02-06-2002 10:35 AM
Getting FULL filename from listbox Garfield Windows Programming 8 01-27-2002 08:28 AM


All times are GMT -6. The time now is 07:26 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22