using *.xrc in VC2003

Questions about wxWidgets running on MS.NET, mono or Portable.NET ? Ask it here !
saint
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Mar 20, 2006 11:09 am
Location: Ukraine, Dnipropetrovsk

using *.xrc in VC2003

Postby saint » Mon Mar 20, 2006 11:15 am

Hi everybody.

Could anyone help me to solve this problem: how can I use xrc file, generated by wxFormBuilder, in my Visual Studio 2003 C++ solution?

Thanks in advance.

benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Postby benedicte » Mon Mar 20, 2006 12:45 pm

You don't really use it, in the sense that XRC files are not part of the Visual Studio projects.

You can add it to the list of files, but there is nothing special do to with it.

What are you expecting to do with XRC files in Visual Studio?

saint
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Mar 20, 2006 11:09 am
Location: Ukraine, Dnipropetrovsk

Postby saint » Mon Mar 20, 2006 1:21 pm

I want to have a small tutorial of loading xrc files to my app and working with xrc's controls.

benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Postby benedicte » Mon Mar 20, 2006 2:20 pm

Then, you should have a look at the "xrc" sample (in the samples folder).

saint
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Mar 20, 2006 11:09 am
Location: Ukraine, Dnipropetrovsk

Postby saint » Mon Mar 20, 2006 4:28 pm

how can I embed resource files in my *.exe file to not be obliged to copy *.xrc files in the same directory as *.exe file to be able to load them.

when I built xrc example with VC2003 and tried to start xrcdemo.exe - it failed because it couldn't load *.xrc files. And xrcdemo.exe started successfully only when I copied \rc folder in the it's working folder. How can I solve this problem.

Thanks in advance.

benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Postby benedicte » Tue Mar 21, 2006 1:11 pm

the xrc files not found in the samples in a"bug"... in nearly all the samples that load files, because the source code is not written knowing that executables are written in sub-folders (debug/release, ...)

Nothing forces you to embed the XRC files in your app.
For my apps, I install the XRC and icon files (.png) in a ZIP file, near the .exe file, and it works well.

micros
Super wx Problem Solver
Super wx Problem Solver
Posts: 317
Joined: Sat Mar 18, 2006 10:41 am
Location: Ustek, Bohemia

Postby micros » Tue Mar 21, 2006 1:32 pm

You can use wxrc utility (found in wxWidgets/utils) to "compile" xrc into cpp file, which you then add to your project. You'll have to play a bit with dependecies and custom build steps to force the IDE recompile it when the xrc is chaged.


Return to “wx.NET”

Who is online

Users browsing this forum: No registered users and 1 guest