[WIN API]How to create a static control with a scrollbar?

Started by
0 comments, last by Endurion 11 years, 11 months ago
Hey,
I need to create a static area on my window(that you can't move) with a horizontal scrollbar. I've tried this way:
hStatic = CreateWindowEx( WS_EX_CLIENTEDGE, "STATIC", NULL, WS_CHILD | WS_VISIBLE | WS_HSCROLL |
SS_LEFT, 150, 200, 150, 200, hwnd, NULL, hInstance, NULL );

The problem is that the scrollbar can't be moved/rolled etc.

Edit:
Actually I'm creating a map editor for my game and I wonder how to create an area where map should be designed. It must have a scrollbar as well. But is a static control really a good solution? How to do this?
Advertisement
Static does inherently not listen to mouse events (or get focus). Just create your own class and make a window with it.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

This topic is closed to new replies.

Advertisement