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
Printable View
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
Make them appear?? Just use the ShowWindow function, or when creating them, set their style to WS_VISIBLE.
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);
Change the class name to "ScrollBar"
Do you mean add another CreateWindowEX for the scroll bars? Because if I rename it then I would lose my ListView.
Well, when I create a listview I use:
In conjunction with InitCommonControlsEx and the needed libraries and includes (something like comctrl.h and .lib)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);
the listview displays the scrollbars automaticly when there has to be one
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