Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-09-2005, 05:46 AM   #1 (permalink)
dball
Registered User
 
Join Date: Jun 2005
Posts: 5
dball is on a distinguished road
Question What's the Resource script format?

I am trying to make a resource script to load icons and such
I've used VC++6.0 and Quincy99 compilers and I get:

in VC++:
line 6 "missing ';' before "constant""

in Quincy99
line 6 "parse error before 101"

the code looks like this
Code:
#define BIGICON 101
#define LITTLEICON 102
#define MYCURSOR 200


BIGICON ICON eggplant.ico
LITTLEICON ICON nailedimaje.ico
MYCURSOR CURSOR sword.cur
Help!

Last edited by dball; 06-09-2005 at 05:49 AM. Reason: wrong code format
dball is offline   Reply With Quote
Old 06-09-2005, 07:51 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,711
redhead is on a distinguished road
Errr... what are you tryiung to do here ??
if you were to think the way any usual precompiler thinks, then everythign which represents your #defines in teh code will be echanged by teh value you defined it to be, so you'r code will uppon first run through be changed to:
Code:
101 ICON eggplant.ico
102 ICON nailedimaje.ico
200 CURSOR sword.cur
Ofcause no compiler will know what to here, since theres a numeric value befor any operator has been reached.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 06-09-2005, 07:59 AM   #3 (permalink)
dball
Registered User
 
Join Date: Jun 2005
Posts: 5
dball is on a distinguished road
I'm trying to establish a new icon (which is in the project folder) for an application (this may be windows-specific)

Then I can go into my main code and write

Code:
Winclass.hIcon(hinstance, MAKEINTRESOURCE(BIGICON));
Also, I want to import other bitmaps for my gui.

Unfortunately, even using Visual Studio C++ 6.0 Resource Script tool causes the syntax error. This error occurs with a mostly blank main file of

Code:
#define WIN32_LEAN_AND_MEAN
#include "icons.rc"
What am I doing wrong?

Last edited by dball; 06-09-2005 at 08:15 AM. Reason: more information for what I am trying to do
dball is offline   Reply With Quote
Old 06-10-2005, 06:49 AM   #4 (permalink)
dball
Registered User
 
Join Date: Jun 2005
Posts: 5
dball is on a distinguished road
Hah! I solved it. After a blinding flash of the obvious, I realized that instead of

Code:
#include "icons.rc"
I should have included

Code:
#include "resource.h"
dball is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My script isn't reading and inserting the value of a cookie correctly... Logical Demise PHP 1 06-04-2005 11:42 PM
My first Perl script. Admin All Other Coding Languages 2 05-19-2005 11:09 AM
Executing a server script from PHP sde PHP 4 02-05-2005 11:12 AM
running a script at designated time tzarin PHP 5 05-12-2004 07:11 PM


All times are GMT -8. The time now is 10:54 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting