wx.net dont work in c#+sdl

Questions about wxWidgets running on MS.NET, mono or Portable.NET ? Ask it here !
Post Reply
the-morpher
In need of some credit
In need of some credit
Posts: 1
Joined: Sat Oct 19, 2013 8:33 pm

wx.net dont work in c#+sdl

Post by the-morpher »

Hello every body.
as i said in the subject i try to see ANY THING like a control in my screen but i dont succeed.
so here's what i have done.
i lerned somewhere that it must compile my wxwidgets and i tryed to follow the tutorial but NOTHING work :oops: ,
but when i download it i found that it was already built wx.NET.dll in the wx.NET-0.9.2 version for windows.
so shall i rebuild my own or that one should work fine for me ?
what about the wx-c-0-9-0-2.dll, shall i add it to my project ?

when i add that dll in reference to my c# application (console) i can see that i can initialised some stuff like wx.Window or button but i still can't, cause the first argument is not correct, and i don't know how to fix it so here is my code :

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Threading.Tasks;
using SdlDotNet.Core;
using SdlDotNet.Graphics;
using wx;
using wx.Graph;

namespace tmp
{
    class Program
    {
        Window win;

        [STAThread]
        public static void Main(string[] args)
        {
            Program app = new Program();
            app.GO();
            
        }

        public Program()
        {
            Video.SetVideoMode(500, 500);
            Video.WindowCaption = "Hello World!";
        }

        private void GO()
        {
            Events.Quit += new EventHandler<QuitEventArgs>(this.Quit);
            Events.Tick += Events_Tick;
            Events.Run();

             win = new Window(this, new Point(0, 0), new Size(300, 300), WindowStyles.ALIGN_CENTER, "my window");
            // error : impossible to convert 'tmp.Program' to 'wx.Window' (i translate cause i use a fr debugger)

        }

        void Events_Tick(object sender, TickEventArgs e)
        {
            Video.Screen.Blit(win);
            // error : impossible to convert 'wx.Window' to 'SdlDotNet.Graphics.Surface'
        }

        private void Quit(object sender, QuitEventArgs e)
        {
            Events.QuitApplication();
        }
    }
}
i use Visual Studio 2013
i just want to understand how does it work to continue coding my game please
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wx.net dont work in c#+sdl

Post by doublemax »

There are hardly any wx.NET users in this forum and in combination with SDL, the chances to find someone who could help with this are even lower.

Unfortunately i don't see any forum/mailing list on the wx.NET homepage, so i can't even suggest a better place to ask. Sorry.

http://wxnet.sourceforge.net/
http://sourceforge.net/projects/wxnet/
Use the source, Luke!
Post Reply