Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 savail   Members   -  Reputation: 333

Like
0Likes
Like

Posted 16 April 2012 - 12:39 PM

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?

Sponsor:

#2 Endurion   Crossbones+   -  Reputation: 3650

Like
0Likes
Like

Posted 30 April 2012 - 11:23 PM

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>




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS