User forums > Using Code::Blocks

Bitmap Buttons not loading.

(1/1)

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:

--- 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.

--- End quote ---

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.

--- End quote ---

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

Navigation

[0] Message Index

Go to full version