|
-
Feb 27th, 2001, 04:02 PM
#1
Thread Starter
Frenzied Member
I need some help and code with scroll bars using CreateWindowEX. How do I get them to appear? Is there a message I need to catch? How do I make them scroll?
Thanks
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 27th, 2001, 04:26 PM
#2
Make them appear?? Just use the ShowWindow function, or when creating them, set their style to WS_VISIBLE.
-
Feb 27th, 2001, 05:03 PM
#3
Thread Starter
Frenzied Member
They dont.
Code:
m_hWnd_MsgList = CreateWindowEx(WS_EX_NOPARENTNOTIFY, "SysListView32", NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_BORDER | LVS_REPORT| WS_VSCROLL | WS_HSCROLL | WS_CLIPSIBLINGS , 0, 0, 300, 100,hWnd, NULL, m_hInst, NULL);
ListView_SetExtendedListViewStyle(m_hWnd_MsgList, LVS_EX_FULLROWSELECT);
//Shows The Window The ListView Is In
ShowWindow(hWnd,SW_SHOWNORMAL);
UpdateWindow(hWnd);
ShowWindow(m_hWnd_MsgList,SW_SHOWNORMAL);
UpdateWindow(m_hWnd_MsgList);
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Feb 27th, 2001, 07:10 PM
#4
Change the class name to "ScrollBar"
-
Feb 28th, 2001, 12:28 PM
#5
Thread Starter
Frenzied Member
Do you mean add another CreateWindowEX for the scroll bars? Because if I rename it then I would lose my ListView.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Mar 2nd, 2001, 09:28 AM
#6
Frenzied Member
Well, when I create a listview I use:
Code:
m_hWndListCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, NULL, WS_CHILD|WS_VISIBLE|LVS_SHAREIMAGELISTS|WS_TABSTOP|LVS_REPORT|LVS_AUTOARRANGE, 0, 0, 0, 0, m_hWnd, (HMENU)ID_LISTVIEW, g_hInstance, NULL);
In conjunction with InitCommonControlsEx and the needed libraries and includes (something like comctrl.h and .lib)
the listview displays the scrollbars automaticly when there has to be one
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Mar 2nd, 2001, 10:46 AM
#7
Thread Starter
Frenzied Member
There was, after many hours of screaming ***, I figured out that the listview view area was to big and the scroll bars were out side the window.
Thanks for all the help
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|