Sign in to follow this  

SDL on windows PictureBox

This topic is 3734 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi to all. My question is very simple. It's possible to use SDL for drawing on a control like a PictureBox? I need create a application, but i need only to draw on a region of the interface, with other tools in the window, like a level editor for a game, where you have a property window for values of object etc.., all in the main window, and a view of ingame redendered with SDL on a region. If isn't possible. What other options can i use? Thanks.

Share this post


Link to post
Share on other sites
Well it doesn't use sdl, but if you know how to use OpenGL I think the IUP gui library should be able to do what you want (it's for both win32 and linux):

http://www.tecgraf.puc-rio.br/iup/

(but don't ask me to explain how to use it with opengl, I've only just started using IUP myself and haven't gotten that far yet)

Share this post


Link to post
Share on other sites

Hello.

I have found a method to draw with SDL on a form region, in this example with C# Windows Forms using Tao.Sdl (a .NET bind for SDL library).

The example uses a Panel control as a container for a SDL window, that is created with SDL_NOFRAME flag to eliminate the borders, title bar etc. Only the client area.

With a simple code we can set the panel as a container of SDL window:
SetParent(SDLWindowHwnd, Panel.Handle);

Complete example on:

http://www.geocities.com/egon_rath/sdl_inside_winform.html

And a screenshot of my first test:

SDL on a panel

Share this post


Link to post
Share on other sites

This topic is 3734 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this