News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Bitmap Buttons not loading.

Started by papayrus, February 12, 2011, 03:30:22 PM

Previous topic - Next topic

papayrus

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.

Jenna

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.

papayrus

#2
Quote from: jens 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.

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.

Jenna

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.

papayrus

Quote from: jens 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.

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