Resource Bitmap Size Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
RANEESH
In need of some credit
In need of some credit
Posts: 7
Joined: Thu Mar 05, 2009 11:37 am

Resource Bitmap Size

Post by RANEESH »

Hi...

I am novice in wxwidgets programming. Please help me get through this queries.

Is there any size limit for bitmaps while adding through resource( .rc )file??

also

I want to embed a wave file with my program like its icon and toolbar images.( possibly through resource file )
wxWidgets 2.4.2 / Windows XP / Borland 5.5

.
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
I'm not really sure about this, but I think there is a limit for rc file resources, at least with older VC versions.

To use a wave file in your rc, simply use the WAVE type, like

Code: Select all

SomeSound WAVE "c:\mysound.wav"
However, you'll need to define SomeSound. I think it's easier to simply use a number here:

Code: Select all

123 WAVE "c:\mysound.wav"
Then you can use wxSound like

Code: Select all

wxSound::Play("#123",wxSOUND_ASYNC);
For a cross platform solution the problem is that wxSound doesn't load from wxStreams.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
RANEESH
In need of some credit
In need of some credit
Posts: 7
Joined: Thu Mar 05, 2009 11:37 am

Post by RANEESH »

Thanks.. it works..!! :D
wxWidgets 2.4.2 / Windows XP / Borland 5.5

.