C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 12th, 2004, 06:24 PM
harker harker is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 harker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Newbie - Not sure why this isn't compiling

Hi there,

I have a main piece of code that inlucdes a resource file.

I have followed the tutorials, and tried to make my way from there.

I keep getting a compile error saying that a constant 'ICON_GROUP', define in 'resources.h', is not defined. This is a win32 application by the way.

Here is my resources.h file

Code:
#define ICON_GROUP 1002
#define ICON_LEAF 1003
#define ICON_DL 1004
#define ICON_RIP 1005
#define MY_TREE 1000
#define MAIN_WINDOW 1001


here is my resources.rc file

Code:
#include "resources.h"
 
ICON_GROUP ICON "./resources/collection.ico"
ICON_LEAF ICON "./resources/treble.ico"
ICON_RIP ICON "./resources/rip.ico"
ICON_DL ICON "./resources/download.ico"


this is the code snippet that contains the erroneous code marked in red

Code:
#include <windows.h>
#include <commctrl.h>
#include "resources.h"
#include "MyWinTree.h"
 
.....
 
 
if ((himl = ImageList_Create(16, 16, FALSE, 4, 0)) == NULL) 
		return NULL; 
 
	// Add the open file, closed file, and document bitmaps. 
	hbmp = LoadBitmap(tree.group(), MAKEINTRESOURCE(ICON_GROUP)); 
	g_nOpen = ImageList_Add(himl, hbmp, (HBITMAP)NULL); 
	DeleteObject(hbmp); 
...


Additional info: the MyWinTree.h file contains a class declaration for a wrapper to a windows Tree_View. It also includes 'resources.h'

I am using Bloodshed Dev-C++ to compile with.

Any help would be appreciated

Regards

Steve

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Newbie - Not sure why this isn't compiling


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT