Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / wxBITMAP_STD_COLOURS

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxBITMAP_STD_COLOURS
#2982
Posted by: 2003-11-25 22:56:17
I added toolbar to my program and now I am getting this message when window with this toolbar is opend for the first time:

"Can't load bitmap 'wxBITMAP_STD_COLOURS' from resources! Check .rc file.'"

Here is my code:

  wxToolBar *toolbar=new wxToolBar(this,-1); 
  wxBitmap *bitmap=new wxBitmap();
  toolbar->SetToolBitmapSize(wxSize(16,16));
  bitmap->LoadFile("icon\\file_open.xpm",wxBITMAP_TYPE_XPM);
  toolbar->AddTool(ID_TOOLBAR_OPEN,"",*bitmap,"Add Layer");

Can anyone advice how can I fix this ?
I don't use resources.
Thx and sorry for my 'english' 8)
Message2. Re: wxBITMAP_STD_COLOURS
#2993
Posted by: upCASE 2003-11-27 01:08:55
Hi!
Include the file include/wx/msw/wx.rc in your project.

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: wxBITMAP_STD_COLOURS
#3010
Posted by: 2003-11-28 15:01:21
Unfortunately, this don't work, I got this error message:

"43 c:dev-cppincludewxmswwx.rc parse error before `BEGIN'"
Message4. Re: wxBITMAP_STD_COLOURS
#3012
Posted by: 2003-11-28 15:06:02
I get same error message like gecko.
Message5. Re: wxBITMAP_STD_COLOURS
#3013
Posted by: 2003-11-28 15:07:25
I get same error message like gecko.
Message6. Re: wxBITMAP_STD_COLOURS
#3028
Posted by: 2003-11-30 08:08:01
I have the same problem. I load bitmaps to toolbar from xpm.
I also use these bitmaps to draw them on dialogs, but only adding toolbar with bitmaps to project make this error......
Message7. Re: wxBITMAP_STD_COLOURS
#3056
Posted by: 2003-12-09 17:37:25
How should I include this file ?
Include by "#include" dont work for me or I dont know where to write this.
Adding file to project dont work too, I am still getting errors.
Message8. Re: wxBITMAP_STD_COLOURS
#3057
Posted by: 2003-12-09 17:58:09
lol ... what a sucker am I ... :o)

Add file "wx.rc" to your project:

  Project -> Add to Project
  "wx/msw/wx.rc"

  Add path to your project resource directories:

  Project -> Project Options -> Directories -> Resource Directories
  "C:Dev-Cppinclude" ... this depends on wx directory placement
Message9. Re: wxBITMAP_STD_COLOURS
#3075
Posted by: 2003-12-13 23:33:37
Hey
THANKS A LOT. I've been strangling with problem since last night . You saved my life.
THANKS.
Message10. Re: wxBITMAP_STD_COLOURS
#3091
Posted by: upCASE 2003-12-15 21:19:08
Hi!
Yep, that's the way to do it :)
But I find it a bit irritating... I never specify the resource and never had any problems. Everything works fine without it.

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message11. Re: wxBITMAP_STD_COLOURS
#3930
Posted by: bobmorton 2004-04-27 01:19:54
I have this problem too, but when I add the wx.rc file to my project I get this error message :

Compilateur: Default compiler
Building Makefile: "G:\devtest Interface 2\Makefile.win"
Exécution de  make...
make.exe -f "G:\devtest Interface 2\Makefile.win" all
windres.exe -i Interface_private.rc -I rc -o Interface_private.res -O coff  --include-dir  --include-dir C:/UTILIT~1/PROGRA~1/Dev-Cpp/include

Usage: windres.exe [option(s)] [input-file] [output-file]
 The options are:
  -i --input=<file>            Name input file
  -o --output=<file>           Name output file
  -I --input-format=<format>   Specify input format
  -O --output-format=<format>  Specify output format
  -F --target=<target>         Specify COFF target
     --preprocessor=<program>  Program to use to preprocess rc file
     --include-dir=<dir>       Include directory when preprocessing rc file

  -D --define <sym>[=<val>]    Define SYM when preprocessing rc file
  -v --verbose                 Verbose - tells you what it's doing
     --language=<val>          Set language when reading rc file
     --use-temp-file           Use a temporary file instead of popen to read
                               the preprocessor output
     --no-use-temp-file        Use popen (default)
  -h --help                    Print this help message
  -V --version                 Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified.  A single file name is an input file.
No input-file is stdin, default rc.  No output-file is stdout, default rc.
windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec tekhex binary ihex

make.exe: *** [Interface_private.res] Error 1

Exécution terminée

Here is the content of my Interface_private.rc file which I didn't modify :


#include "C:/Utilitaires/Programmation/Dev-Cpp/include/wx/msw/wx.rc"

If anyone has a solution please tell me! Thanks by advance
Message12. Re: wxBITMAP_STD_COLOURS
#3933
Posted by: 2004-04-27 14:34:23
I posted this on "04/14/04 03:35PM" named :

[resolved] "wx_Bitmap_STD_Colours" and "HAND.CUR"

try..maybe it will resolve the problem for you too...
Message13. Re: wxBITMAP_STD_COLOURS
#3934
Posted by: 2004-04-27 14:39:08
OOooops i just realize my post came too late....Sorry :o)
Message14. Re: wxBITMAP_STD_COLOURS
#3936
Posted by: bobmorton 2004-04-27 16:37:36
Thanks for your message but i'd already seen what was writen on th thread you're talking about.
Message15. Re: wxBITMAP_STD_COLOURS
#4840
Posted by: 2004-07-17 01:55:40
it works, thanks :D
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥880.00 ·
 
 
¥1,390.00 ·
 
 
¥1,380.00 ·
 
 
¥287.00 ·
 
 
¥918.00 ·
 
 
¥860.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0