Author Topic: Bitmap Buttons not loading.  (Read 5018 times)

Offline papayrus

  • Single posting newcomer
  • *
  • Posts: 6
Bitmap Buttons not loading.
« 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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Bitmap Buttons not loading.
« Reply #1 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.

Offline papayrus

  • Single posting newcomer
  • *
  • Posts: 6
Re: Bitmap Buttons not loading.
« Reply #2 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.
« Last Edit: February 12, 2011, 03:52:48 pm by papayrus »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Bitmap Buttons not loading.
« Reply #3 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.

Offline papayrus

  • Single posting newcomer
  • *
  • Posts: 6
Re: Bitmap Buttons not loading.
« Reply #4 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.