Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: papayrus on February 12, 2011, 03:30:22 pm

Title: Bitmap Buttons not loading.
Post by: papayrus on February 12, 2011, 03:30:22 pm
I am using wxwidgets in code blocks and I think it is an issue with code blocks. When I build and run my project if the paths to the bitmap button images are full paths it loads fine but if I make the paths to the current directory it gets an error saying cannot load the file and the bitmap button dont get there images loaded.

If I launch the program directly it does load the images fine.
So if i make the paths for the bitmap button images to the exe. directory my layout in code blocks looks messed up because all the images are missing.
Title: Re: Bitmap Buttons not loading.
Post by: Jenna on February 12, 2011, 03:45:22 pm
Check the execution working directory in your projects properties.
That's the directory your program is started in, so it's also the startpoint for your exe to search the images.
Title: Re: Bitmap Buttons not loading.
Post by: papayrus on February 12, 2011, 03:50:53 pm
Check the execution working directory in your projects properties.
That's the directory your program is started in, so it's also the startpoint for your exe to search the images.

OK I right click my project and choose properties. I am in the general tab.

In the box IN PROJECT IT says this
MYPROJECT
D:\Code&Script\C++\C++ wxWidgets

In File name Absolute it says
D:\Code&Script\C++\C++ wxWidgets\MYPROJECT\MYPROJECTMain.cpp

In File name Relative it says
MYPROJECTMain.cpp


Is this where I need to change something and what do I need to change?
I don't see where it says execution working directory.
Title: Re: Bitmap Buttons not loading.
Post by: Jenna on February 12, 2011, 04:14:10 pm
Either "Project -> Properties" from the menu or right click your project in the management pane and chose properties.
Go to build-targtes, there you find an execution working directory for every target you have.
Title: Re: Bitmap Buttons not loading.
Post by: papayrus on February 12, 2011, 04:46:46 pm
Either "Project -> Properties" from the menu or right click your project in the management pane and chose properties.
Go to build-targtes, there you find an execution working directory for every target you have.

Thank you very much I see now how to do it master.