Jump to content
  • Advertisement
Sign in to follow this  
IDandT

SDL on windows PictureBox

This topic is 4105 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
Advertisement
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
Another one that can do it that is based on SDL itself, is Agar. It's written in C and therefore should work on anything SDL would work on. If you want one that is written in C++, GUI Chan will probably do the job.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!